chore(config): lint tests + examples in pre-push clippy (#967)
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user