about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-05-29 13:49:23 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-05-30 16:15:46 +1000
commit4af4ba2391c81eb1db6290e6197a4a91478abfac (patch)
treeefba01317d731c5a8199b936cae9fc31c97bf3f9
parentcaa187f3bc9604c78dfbc3ffabbe1372cb528639 (diff)
downloadrust-4af4ba2391c81eb1db6290e6197a4a91478abfac.tar.gz
rust-4af4ba2391c81eb1db6290e6197a4a91478abfac.zip
List all `tests/` subdirs explicitly in `rustfmt.toml`.
So we can gradually remove the ones where rustfmt can be used.
-rw-r--r--rustfmt.toml29
1 files changed, 26 insertions, 3 deletions
diff --git a/rustfmt.toml b/rustfmt.toml
index b78e96d5872..90de42072d7 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -10,9 +10,32 @@ ignore = [
     "/build-*/",
     "/vendor/",
 
-    # Tests for now are not formatted, as they are sometimes pretty-printing constrained
-    # (and generally rustfmt can move around comments in UI-testing incompatible ways).
-    "/tests/",
+    # Some tests are not formatted, for multiple reasons:
+    # - some contain syntax errors that cause rustfmt to give an error
+    # - some UI tests are broken by different formatting
+    # - some require special comments in a particular position (e.g. `EMIT_MIR` comments)
+    "/tests/assembly/",
+    "/tests/auxiliary/",
+    "/tests/codegen/",
+    "/tests/codegen-units/",
+    "/tests/coverage/",
+    "/tests/coverage-run-rustdoc/",
+    "/tests/crashes/",
+    "/tests/debuginfo/",
+    "/tests/incremental/",
+    "/tests/mir-opt/",
+    "/tests/pretty/",
+    "/tests/run-make/",
+    "/tests/run-make-fulldeps/",
+    "/tests/run-pass-valgrind/",
+    "/tests/rustdoc/",
+    "/tests/rustdoc-gui/",
+    "/tests/rustdoc-js/",
+    "/tests/rustdoc-json/",
+    "/tests/rustdoc-js-std/",
+    "/tests/rustdoc-ui/",
+    "/tests/ui/",
+    "/tests/ui-fulldeps/",
 
     # Do not format submodules.
     # FIXME: sync submodule list with tidy/bootstrap/etc