meli/scripts/pre-commit

9 lines
273 B
Bash
Executable File

#!/bin/zsh
#
exec git diff --name-only HEAD | grep ".*\.rs" | xargs rustfmt
#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 --