From cdd702b901d085dd88c77bcffa91996c30715d22 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 23 May 2026 11:03:23 +0200 Subject: [PATCH] chore(config): lint tests + examples in pre-push clippy (#967) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pre-push clippy invocation ran without --all-targets, so it only checked lib + bins — test and example targets were never clippy-linted, which is how the cfg(test)/test-target debt cleared in the previous commit accumulated unflagged. Add --all-targets now that the debt is clean. Co-Authored-By: Claude Opus 4.7 (1M context) --- .config/hooks/pre-push | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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"