diff --git a/.config/hooks/pre-push b/.config/hooks/pre-push index 9a91001b3..0d717c7d7 100755 --- a/.config/hooks/pre-push +++ b/.config/hooks/pre-push @@ -87,10 +87,12 @@ elif command -v cargo >/dev/null 2>&1 && [ -d "$REPO_ROOT/server" ]; then echo "pre-push: fmt — OK" fi - # clippy needs a build — skip if target/ doesn't exist (cold worktree) + # clippy needs a build — skip if target/ doesn't exist (cold worktree). + # --all-targets lints tests + examples too (#967 closed the gap where test + # code accumulated clippy debt unchecked). if [ -d "$REPO_ROOT/server/target" ]; then echo "pre-push: checking Rust (clippy)..." - if ! (cd "$REPO_ROOT/server" && cargo clippy -- -D warnings 2>&1); then + if ! (cd "$REPO_ROOT/server" && cargo clippy --all-targets -- -D warnings 2>&1); then ERRORS=$((ERRORS + 1)) else echo "pre-push: clippy — OK"