fix: drop double screenpipe- prefix in lefthook clippy hook#4001
Merged
louis030195 merged 1 commit intoJun 11, 2026
Merged
Conversation
Crate directories under crates/ are already named screenpipe-*, so the
sed in the rust-clippy hook already yields the full package name
(e.g. screenpipe-core). Re-prefixing it produced nonexistent package
ids like screenpipe-screenpipe-core, so cargo clippy exited 101
("did not match any packages") on every commit that staged a crate
.rs file — the clippy gate could never pass.
Use the bare extracted name instead. Verified: cargo pkgid -p
screenpipe-screenpipe-core fails, cargo pkgid -p screenpipe-core
resolves, and the corrected hook command runs clippy cleanly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
description
The
rust-clippypre-commit hook inlefthook.ymlnever passes: crate directories undercrates/are already namedscreenpipe-*, so the hook'ssed 's|crates/||'already yields the full package name (e.g.screenpipe-core). The loop then re-prefixes it, producing nonexistent package ids likescreenpipe-screenpipe-core, andcargo clippyexits 101 ("did not match any packages") on every commit that stages a crate.rsfile.One-line fix: pass the bare extracted name to
-p.related issue: none open — found while setting up the local dev loop (hooks installed via
bunx lefthook install).before
(terminal output instead of a recording — this is a git-hook config change, no app UI involved)
after
how to test
bunx lefthook installtouch crates/screenpipe-core/src/lib.rs && git add crates/screenpipe-core/src/lib.rsbunx lefthook run pre-commit— on main, rust-clippy fails with exit 101 ("did not match any packages"); with this patch it resolves the real package and runs clippydesktop app checklist (if applicable)
n/a — no tauri commands or exported Rust types touched (git-hook config only).