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 | 4af4ba2 | 2024-05-29 03:49:23 | [diff] [blame] | 18 | "/tests/pretty/", |
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 | 4af4ba2 | 2024-05-29 03:49:23 | [diff] [blame] | 20 | "/tests/run-make-fulldeps/", |
| 21 | "/tests/run-pass-valgrind/", |
| 22 | "/tests/rustdoc/", |
| 23 | "/tests/rustdoc-gui/", |
| 24 | "/tests/rustdoc-js/", |
| 25 | "/tests/rustdoc-json/", |
| 26 | "/tests/rustdoc-js-std/", |
| 27 | "/tests/rustdoc-ui/", |
| 28 | "/tests/ui/", |
| 29 | "/tests/ui-fulldeps/", |
Mark Rousskov | 8eb7c58 | 2019-12-22 21:43:54 | [diff] [blame] | 30 | |
Nicholas Nethercote | 4702a1c | 2024-05-28 00:36:37 | [diff] [blame] | 31 | # Do not format submodules. |
klensy | f3d9248 | 2023-06-23 07:34:06 | [diff] [blame] | 32 | # FIXME: sync submodule list with tidy/bootstrap/etc |
| 33 | # tidy/src/walk.rs:filter_dirs |
Alex Crichton | 06d565c | 2020-05-13 21:22:37 | [diff] [blame] | 34 | "library/backtrace", |
Jubilee Young | 39cb863 | 2021-10-22 07:12:00 | [diff] [blame] | 35 | "library/portable-simd", |
mark | 2c31b45 | 2020-06-12 02:31:49 | [diff] [blame] | 36 | "library/stdarch", |
Antoni Boucher | 8841e9e | 2021-07-19 23:08:08 | [diff] [blame] | 37 | "compiler/rustc_codegen_gcc", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 38 | "src/doc/book", |
| 39 | "src/doc/edition-guide", |
| 40 | "src/doc/embedded-book", |
| 41 | "src/doc/nomicon", |
| 42 | "src/doc/reference", |
| 43 | "src/doc/rust-by-example", |
Santiago Pastorino | 4387a8b | 2020-03-10 20:22:25 | [diff] [blame] | 44 | "src/doc/rustc-dev-guide", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 45 | "src/llvm-project", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 46 | "src/tools/cargo", |
| 47 | "src/tools/clippy", |
| 48 | "src/tools/miri", |
Aleksey Kladov | 058c1b6 | 2020-06-04 11:11:15 | [diff] [blame] | 49 | "src/tools/rust-analyzer", |
Bernardo Meurer Costa | e287044 | 2024-05-14 18:47:15 | [diff] [blame] | 50 | "src/tools/rustc-perf", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 51 | "src/tools/rustfmt", |
bjorn3 | bffe880 | 2021-12-30 14:04:47 | [diff] [blame] | 52 | |
Nicholas Nethercote | 4702a1c | 2024-05-28 00:36:37 | [diff] [blame] | 53 | # These are ignored by a standard cargo fmt run. |
bjorn3 | bffe880 | 2021-12-30 14:04:47 | [diff] [blame] | 54 | "compiler/rustc_codegen_cranelift/scripts", |
bjorn3 | b7bc8d5 | 2023-11-23 20:02:45 | [diff] [blame] | 55 | "compiler/rustc_codegen_cranelift/example/gen_block_iterate.rs", # uses edition 2024 |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 56 | ] |