Skip to content

Commit

Permalink
Merge pull request #218 from dominic-mulligan-arm/fix-rustfmt-githook
Browse files Browse the repository at this point in the history
Force rustfmt to use 2018 Rust edition in pre-commit hook
  • Loading branch information
dominic-mulligan-arm authored Sep 27, 2021
2 parents e16ed3f + f602560 commit 59ddcdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ HAS_ISSUES=0
echo "Checking code formatting of files staged for commit."

for file in $(git diff --name-only --staged \*.rs); do
RUSTFMT="$(rustfmt --check --skip-children --unstable-features $file)"
RUSTFMT="$(rustfmt --edition=2018 --check --skip-children --unstable-features $file)"
if [ "$RUSTFMT" != "" ]; then
printf "[ERROR]: $file\n"
HAS_ISSUES=1
Expand Down

0 comments on commit 59ddcdc

Please sign in to comment.