Skip to content

Commit

Permalink
Remove --check from rustfmt invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
martinthomson committed Jul 20, 2019
1 parent 1834c91 commit 8c06fcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks/pre-commit
Expand Up @@ -31,7 +31,7 @@ trap 'rm -f "$tmp"' ERR EXIT
for f in "${files[@]}"; do
if [[ "${f##*.}" == "rs" ]]; then
git show :"$f" > "$tmp"
if ! cat "$tmp" | rustfmt --check | diff -q "$tmp" - >/dev/null; then
if ! cat "$tmp" | rustfmt | diff -q "$tmp" - >/dev/null; then
[ "$err" -eq 0 ] && echo "Formatting errors found in:" 1>&2
echo " $f" 1>&2
err=1
Expand Down

0 comments on commit 8c06fcc

Please sign in to comment.