Mark Rousskov | 8eb7c58 | 2019-12-22 21:43:54 | [diff] [blame] | 1 | # Run rustfmt with this config (it should be picked up automatically). |
Aleksey Kladov | ce39461 | 2019-05-03 18:35:21 | [diff] [blame] | 2 | version = "Two" |
| 3 | use_small_heuristics = "Max" |
Mark Rousskov | 8eb7c58 | 2019-12-22 21:43:54 | [diff] [blame] | 4 | merge_derives = false |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 5 | |
Nicholas Nethercote | f1b0ca0 | 2024-05-28 00:03:00 | [diff] [blame] | 6 | # Files to ignore. Each entry uses gitignore syntax, but `!` prefixes aren't allowed. |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 7 | ignore = [ |
Mark Rousskov | d5b760b | 2021-01-09 17:00:45 | [diff] [blame] | 8 | "/build/", |
Rich Kadel | 79020a8 | 2021-04-24 21:12:22 | [diff] [blame] | 9 | "/*-build/", |
| 10 | "/build-*/", |
Eric Huss | 6575abc | 2020-02-11 03:08:24 | [diff] [blame] | 11 | "/vendor/", |
Jonas Schievink | 08e85aa | 2020-01-31 16:09:34 | [diff] [blame] | 12 | |
Nicholas Nethercote | c9c80d2 | 2024-06-03 00:18:33 | [diff] [blame] | 13 | # Some tests are not formatted, for various reasons. |
Nicholas Nethercote | 72800d3 | 2024-05-29 04:11:20 | [diff] [blame] | 14 | "/tests/codegen/simd-intrinsic/", # Many types like `u8x64` are better hand-formatted. |
Nicholas Nethercote | c9c80d2 | 2024-06-03 00:18:33 | [diff] [blame] | 15 | "/tests/crashes/", # Many of these tests contain syntax errors. |
| 16 | "/tests/debuginfo/", # These tests are somewhat sensitive to source code layout. |
| 17 | "/tests/incremental/", # These tests are somewhat sensitive to source code layout. |
Nicholas Nethercote | 5875f3f | 2024-06-03 05:59:31 | [diff] [blame] | 18 | "/tests/pretty/", # These tests are very sensitive to source code layout. |
Nicholas Nethercote | c9c80d2 | 2024-06-03 00:18:33 | [diff] [blame] | 19 | "/tests/run-make/translation/test.rs", # This test contains syntax errors. |
Nicholas Nethercote | e372bf8 | 2024-06-03 07:30:09 | [diff] [blame] | 20 | "/tests/rustdoc/", # Some have syntax errors, some are whitespace-sensitive. |
Nicholas Nethercote | 98d65d6 | 2024-06-03 07:34:39 | [diff] [blame] | 21 | "/tests/rustdoc-gui/", # Some tests are sensitive to source code layout. |
Nicholas Nethercote | 1be6592 | 2024-06-04 00:17:58 | [diff] [blame] | 22 | "/tests/rustdoc-ui/", # Some have syntax errors, some are whitespace-sensitive. |
Nicholas Nethercote | 758d49e | 2024-06-04 00:22:43 | [diff] [blame] | 23 | "/tests/ui/", # Some have syntax errors, some are whitespace-sensitive. |
Nicholas Nethercote | d2ea692 | 2024-06-04 00:27:30 | [diff] [blame] | 24 | "/tests/ui-fulldeps/", # Some are whitespace-sensitive (e.g. `// ~ERROR` comments). |
Michael Goulet | bd135e4 | 2024-07-11 23:50:03 | [diff] [blame] | 25 | # #[cfg(bootstrap)] so that t-release sees this when they search for it |
| 26 | "/tests/rustdoc-json/impl-trait-precise-capturing.rs", |
Mark Rousskov | 8eb7c58 | 2019-12-22 21:43:54 | [diff] [blame] | 27 | |
Nicholas Nethercote | 4702a1c | 2024-05-28 00:36:37 | [diff] [blame] | 28 | # Do not format submodules. |
klensy | f3d9248 | 2023-06-23 07:34:06 | [diff] [blame] | 29 | # FIXME: sync submodule list with tidy/bootstrap/etc |
| 30 | # tidy/src/walk.rs:filter_dirs |
Alex Crichton | 06d565c | 2020-05-13 21:22:37 | [diff] [blame] | 31 | "library/backtrace", |
Jubilee Young | 39cb863 | 2021-10-22 07:12:00 | [diff] [blame] | 32 | "library/portable-simd", |
mark | 2c31b45 | 2020-06-12 02:31:49 | [diff] [blame] | 33 | "library/stdarch", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 34 | "src/doc/book", |
| 35 | "src/doc/edition-guide", |
| 36 | "src/doc/embedded-book", |
| 37 | "src/doc/nomicon", |
| 38 | "src/doc/reference", |
| 39 | "src/doc/rust-by-example", |
Santiago Pastorino | 4387a8b | 2020-03-10 20:22:25 | [diff] [blame] | 40 | "src/doc/rustc-dev-guide", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 41 | "src/llvm-project", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 42 | "src/tools/cargo", |
| 43 | "src/tools/clippy", |
| 44 | "src/tools/miri", |
Aleksey Kladov | 058c1b6 | 2020-06-04 11:11:15 | [diff] [blame] | 45 | "src/tools/rust-analyzer", |
Bernardo Meurer Costa | e287044 | 2024-05-14 18:47:15 | [diff] [blame] | 46 | "src/tools/rustc-perf", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 47 | "src/tools/rustfmt", |
bjorn3 | bffe880 | 2021-12-30 14:04:47 | [diff] [blame] | 48 | |
Nicholas Nethercote | 4702a1c | 2024-05-28 00:36:37 | [diff] [blame] | 49 | # These are ignored by a standard cargo fmt run. |
bjorn3 | bffe880 | 2021-12-30 14:04:47 | [diff] [blame] | 50 | "compiler/rustc_codegen_cranelift/scripts", |
bjorn3 | b7bc8d5 | 2023-11-23 20:02:45 | [diff] [blame] | 51 | "compiler/rustc_codegen_cranelift/example/gen_block_iterate.rs", # uses edition 2024 |
Guillaume Gomez | e1852d0 | 2024-07-12 12:25:31 | [diff] [blame] | 52 | "compiler/rustc_codegen_gcc/tests", |
| 53 | # Code automatically generated and included. |
| 54 | "compiler/rustc_codegen_gcc/src/intrinsic/archs.rs", |
Guillaume Gomez | 12bedc3 | 2024-07-17 18:21:52 | [diff] [blame^] | 55 | "compiler/rustc_codegen_gcc/example", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 56 | ] |