Add clippy to pre-commit githook

We have a `pre-commit` githook, add to it a call to `cargo clippy`.
This commit is contained in:
Tobin C. Harding 2022-06-23 14:10:20 +10:00
parent 820adc0de0
commit e2e465056c
1 changed files with 4 additions and 1 deletions

View File

@ -43,4 +43,7 @@ EOF
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
git diff-index --check --cached $against -- || exit 1
# Check that code lints cleanly.
cargo clippy --all-features -- -D warnings || exit 1