Skip to content

Commit 5e38351

Browse files
committed
Add clippy to pre-commit githook
We have a `pre-commit` githook, add to it a call to `cargo clippy`.
1 parent 1ce2750 commit 5e38351

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

githooks/pre-commit

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,7 @@ EOF
4343
fi
4444

4545
# If there are whitespace errors, print the offending file names and fail.
46-
exec git diff-index --check --cached $against --
46+
git diff-index --check --cached $against -- || exit 1
47+
48+
# Check that code lints cleanly.
49+
cargo clippy --all-features -- -D warnings || exit 1

0 commit comments

Comments
 (0)