Replace lefthook with prek for pre-commit hooks#279
Conversation
- dxvk/dxvk-gplasync: use_max_tag selects the max across all tags in the repo before prefix stripping is applied, so unrelated tags could outrank the real release and cause a reported downgrade. Add include_regex to restrict candidates to the DXVK-GPLALL-* release line. - update-alternatives: the repo's default branch is master, not main, so git ls-remote returned nothing; also add use_commit since the repo has no tags at all. - zlib-ng/lib32-zlib-ng: include_regex is matched with re.fullmatch, so "^2\." only matched the literal string "2." and never any real tag; fix to "^2\..*". - mesa-git: verified the reported gitlab 500 was a transient upstream outage, not a config issue; no change needed. Verified locally by installing nvchecker and running it against the config (mesa-git and update-alternatives resolve correctly now; the GitHub-sourced entries can't be tested from this sandbox due to the environment's own API proxy restrictions, but the underlying bugs are confirmed by reading nvchecker's source). Also update README's Git Hooks Setup section to document prek instead of lefthook, since no lefthook config exists in the repo (only docs) and mise.toml already tracks prek as the intended tool; .pre-commit-config.yaml is the actual hook definition file prek will use.
ELECTRON_DISABLE_SECURITY_WARNINGS=true masked all Electron security warnings unconditionally, including ones unrelated to what it was meant to silence. No specific warnings needed a targeted replacement. T002 (gitoxide optimize.patch) turned out to be unactionable: there is no gitoxide/ directory, PKGBUILD, or patch in the repo — only mentions in README.md and TODO.md. Recorded as blocked in PLAN.md rather than fabricating a fix.
✅MegaLinter analysis: Success
Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts
|
pkgbuild-lint (filen-desktop) was failing in CI with "SRCINFO file is required but missing". Hand-generated by matching the field order/format of other single-package, non-split PKGBUILDs already in the repo (code, nvidia_oc, smartdns-rs) since makepkg wasn't available to run directly in this environment; CI's own byte-exact diff against makepkg --printsrcinfo will confirm or flag any mismatch.
There was a problem hiding this comment.
Code Review
This pull request replaces the lefthook git hook runner with prek, updating the repository's documentation and configuration accordingly. It also removes the blanket ELECTRON_DISABLE_SECURITY_WARNINGS environment variable from filen-desktop and resolves several nvchecker configuration issues for dxvk-gplasync, zlib-ng, and update-alternatives. The feedback suggests avoiding the use of <hook-id> as a placeholder in the shell command block within README.md to prevent accidental shell redirection issues if copied directly by a user.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| # Skip hooks temporarily | ||
| LEFTHOOK=0 git commit -m "message" | ||
| SKIP=<hook-id> git commit -m "message" |
There was a problem hiding this comment.
Using <hook-id> as a placeholder in a shell command block can cause unexpected behavior or syntax errors because the < and > characters are interpreted as input/output redirection operators by Bash. Consider using a safe placeholder format like hook-id or quoting it as "hook-id" to prevent shell redirection issues if a user copies and runs the command.
| SKIP=<hook-id> git commit -m "message" | |
| SKIP=hook-id git commit -m "message" |
|
|
||
| ### T001 · Remove ELECTRON_DISABLE_SECURITY_WARNINGS from filen-desktop | ||
| `filen-desktop/filen-desktop.sh:11` · medium · security · S · needs:— · blocks:— | ||
| `filen-desktop/filen-desktop.sh:11` · medium · security · S · needs:— · blocks:— · **done** |
There was a problem hiding this comment.
SUGGESTION: Stale line reference after line removal
The backtick reference filen-desktop/filen-desktop.sh:11 points to a line that was removed in this PR. Line 11 now contains export ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@" instead of the removed security warning. Consider updating the reference to filen-desktop/filen-desktop.sh (line removed) or similar to avoid confusion when reviewing the current file.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Incremental Review NotesThe only change since the previously reviewed commit ( Previous Review Summaries (2 snapshots, latest commit 1349125)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 1349125)Status: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Previous review (commit f887460)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (6 files)
Reviewed by hy3-20260706:free · Input: 161.1K · Output: 1.4K · Cached: 34K |
The pkgbuild-lint composite action's Dockerfile never installed pacman-contrib, so updpkgsums was unavailable whenever validateChecksums: true is set (which lint.yml sets unconditionally for the whole matrix) — every package hitting that check would fail with "updpkgsums: command not found", not just filen-desktop. Also addresses review feedback on this PR: - README.md: SKIP=<hook-id> uses characters Bash interprets as redirection operators; drop the angle brackets (Gemini Code Assist). - PLAN.md: T001's line-11 reference is stale now that the referenced line was removed (Gemini Code Assist, Kilo Code).
archlinux:base-devel no longer bundles git, so updpkgsums couldn't clone
filen-desktop's git+ source to compute checksums ("git: command not
found"). Same root cause class as the missing pacman-contrib fix: any
git+-sourced package hitting validateChecksums would fail the same way.

Summary
Migrate from lefthook to prek, a faster pre-commit-compatible hook runner. This change updates documentation, configuration references, and removes the blanket Electron security warning suppression that was masking real misconfiguration signals.
Key Changes
Git hooks migration: Replace lefthook with prek throughout documentation
lefthook run pre-committoprek run --all-filesLEFTHOOK=0toSKIP=<hook-id>.pre-commit-config.yamlSecurity fix: Remove
ELECTRON_DISABLE_SECURITY_WARNINGS=truefromfilen-desktop/filen-desktop.sh--disable-features=flagsnvchecker.toml fixes: Resolve version tracking issues that were blocking automated updates
include_regex = "^DXVK-GPLALL-.*"to filter candidates beforeuse_max_tagcomparison (prefix-only stripping doesn't filter pre-selection)maintomaster(repo's actual default) and addeduse_commit = truesince the repo has no tagsinclude_regexfrom^2\.to^2\..*(fullmatch requires matching the entire tag string, not just 2 characters)Documentation updates: Mark completed tasks in TODO.md and PLAN.md with explanations of fixes applied
Implementation Details
https://claude.ai/code/session_01X7pjimgiitGZb2Jx7KfZqm