Skip to content

Commit

Permalink
Add clippy to pre-commit githook
Browse files Browse the repository at this point in the history
We have a `pre-commit` githook, add to it a call to `cargo clippy`.
  • Loading branch information
tcharding committed Jun 23, 2022
1 parent 24f5c99 commit 702aea8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion githooks/pre-commit
Expand Up @@ -46,4 +46,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

0 comments on commit 702aea8

Please sign in to comment.