diff options
Diffstat (limited to 'scripts/pre-commit')
-rw-r--r-- | scripts/pre-commit | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/pre-commit b/scripts/pre-commit new file mode 100644 index 00000000..b6bc60a9 --- /dev/null +++ b/scripts/pre-commit @@ -0,0 +1,7 @@ +#!/bin/zsh +# + +exec find . -name "*rs" -exec rustfmt {} \; +exec cargo +nightly clippy +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- |