ci: add information to the rustfmt check, hinting at the necessary fix (#2673)

This commit is contained in:
Jeb Rosen 2020-07-28 13:30:33 -07:00 committed by GitHub
parent 027351dd3a
commit 51e7933c35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,7 +184,11 @@ jobs:
# Check fmt
- name: "rustfmt --check"
# Workaround for rust-lang/cargo#7732
run: rustfmt --check --edition 2018 $(find . -name '*.rs' -print)
run: |
if ! rustfmt --check --edition 2018 $(find . -name '*.rs' -print); then
printf "Please run \`rustfmt --edition 2018 \$(find . -name '*.rs' -print)\` to fix rustfmt errors.\nSee CONTRIBUTING.md for more details.\n" >&2
exit 1
fi
clippy:
name: clippy