fmt: ignore the target dir when formatting (#4145)

Signed-off-by: hi-rustin <[email protected]>
This commit is contained in:
我就像屎的倒影
2021-10-04 08:36:17 +02:00
committed by GitHub
parent d39c9ed9dc
commit 7f26ad85c2
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -264,8 +264,8 @@ jobs:
- name: "rustfmt --check"
# Workaround for rust-lang/cargo#7732
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
if ! rustfmt --check --edition 2018 $(git ls-files '*.rs'); then
printf "Please run \`rustfmt --edition 2018 \$(git ls-files '*.rs')\` to fix rustfmt errors.\nSee CONTRIBUTING.md for more details.\n" >&2
exit 1
fi