File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -27,3 +27,16 @@ cd clippy_dev && cargo test && cd ..
27
27
# Perform various checks for lint registration
28
28
./util/dev update_lints --check
29
29
cargo +nightly fmt --all -- --check
30
+
31
+ # make sure tests are formatted
32
+
33
+ # some lints are sensitive to formatting, exclude some files
34
+ needs_formatting=false
35
+ for file in ` find tests -not -path " tests/ui/methods.rs" -not -path " tests/ui/format.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
36
+ rustfmt ${file} --check || echo " ${file} needs reformatting!" ; needs_formatting=true
37
+ done
38
+
39
+ if $needs_reformatting
40
+ " Tests need reformatting!"
41
+ exit 2
42
+ fi
You can’t perform that action at this time.
0 commit comments