Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- for FILE in `git diff --cached --name-only`; do
- if [[ $FILE == *.rs ]] && ! rustfmt --write-mode diff --skip-children $FILE; then
- echo "Commit rejected due to invalid formatting of \"$FILE\" file."
- exit 1
- fi
- done
Add Comment
Please, Sign In to add comment