diff --git a/githooks/pre-commit b/githooks/pre-commit index 4d6dde6b..dc0fa1bf 100755 --- a/githooks/pre-commit +++ b/githooks/pre-commit @@ -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