From 4af4ba2391c81eb1db6290e6197a4a91478abfac Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 29 May 2024 13:49:23 +1000 Subject: [PATCH] List all `tests/` subdirs explicitly in `rustfmt.toml`. So we can gradually remove the ones where rustfmt can be used. --- rustfmt.toml | 29 ++++++++++++++++++++++++++--- 1 file 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