File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ cargo +nightly fmt --all -- --check
38
38
39
39
# avoid loop spam
40
40
set +x
41
+
41
42
# make sure tests are formatted
42
43
43
44
# some lints are sensitive to formatting, exclude some files
@@ -47,11 +48,13 @@ rustup default nightly
47
48
for file in ` find tests -not -path " tests/ui/methods.rs" -not -path " tests/ui/format.rs" -not -path " tests/ui/formatting.rs" -not -path " tests/ui/empty_line_after_outer_attribute.rs" -not -path " tests/ui/double_parens.rs" -not -path " tests/ui/doc.rs" -not -path " tests/ui/unused_unit.rs" | grep " \.rs$" ` ; do
48
49
rustfmt ${file} --check || echo " ${file} needs reformatting!" ; needs_formatting=true
49
50
done
51
+
52
+ set -x
53
+
50
54
# switch back to master
51
55
rustup default master
52
56
53
- if [ " ${needs_reformatting} " = true ] ; then
57
+ if [[ ${needs_reformatting} == true ] ] ; then
54
58
echo " Tests need reformatting!"
55
59
exit 2
56
60
fi
57
- set -x
You can’t perform that action at this time.
0 commit comments