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 | |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 6 | # tidy only checks files which are not ignored, each entry follows gitignore style |
| 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 | |
Mark Rousskov | 8eb7c58 | 2019-12-22 21:43:54 | [diff] [blame] | 13 | # tests for now are not formatted, as they are sometimes pretty-printing constrained |
| 14 | # (and generally rustfmt can move around comments in UI-testing incompatible ways) |
Urgau | f43e3e2 | 2024-05-04 10:37:30 | [diff] [blame] | 15 | "/tests/*", |
| 16 | |
| 17 | # but we still want to format rmake.rs files in tests/run-make/ so we need to do this |
| 18 | # dance to avoid the parent directory from being excluded |
| 19 | "!/tests/run-make/", |
| 20 | "/tests/run-make/*/*.rs", |
Guillaume Gomez | 8f47f97 | 2024-05-02 10:37:13 | [diff] [blame] | 21 | "!/tests/run-make/*/rmake.rs", |
Mark Rousskov | 8eb7c58 | 2019-12-22 21:43:54 | [diff] [blame] | 22 | |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 23 | # do not format submodules |
klensy | f3d9248 | 2023-06-23 07:34:06 | [diff] [blame] | 24 | # FIXME: sync submodule list with tidy/bootstrap/etc |
| 25 | # tidy/src/walk.rs:filter_dirs |
Alex Crichton | 06d565c | 2020-05-13 21:22:37 | [diff] [blame] | 26 | "library/backtrace", |
Jubilee Young | 39cb863 | 2021-10-22 07:12:00 | [diff] [blame] | 27 | "library/portable-simd", |
mark | 2c31b45 | 2020-06-12 02:31:49 | [diff] [blame] | 28 | "library/stdarch", |
Antoni Boucher | 8841e9e | 2021-07-19 23:08:08 | [diff] [blame] | 29 | "compiler/rustc_codegen_gcc", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 30 | "src/doc/book", |
| 31 | "src/doc/edition-guide", |
| 32 | "src/doc/embedded-book", |
| 33 | "src/doc/nomicon", |
| 34 | "src/doc/reference", |
| 35 | "src/doc/rust-by-example", |
Santiago Pastorino | 4387a8b | 2020-03-10 20:22:25 | [diff] [blame] | 36 | "src/doc/rustc-dev-guide", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 37 | "src/llvm-project", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 38 | "src/tools/cargo", |
| 39 | "src/tools/clippy", |
| 40 | "src/tools/miri", |
Aleksey Kladov | 058c1b6 | 2020-06-04 11:11:15 | [diff] [blame] | 41 | "src/tools/rust-analyzer", |
Bernardo Meurer Costa | e287044 | 2024-05-14 18:47:15 | [diff] [blame] | 42 | "src/tools/rustc-perf", |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 43 | "src/tools/rustfmt", |
bjorn3 | bffe880 | 2021-12-30 14:04:47 | [diff] [blame] | 44 | |
| 45 | # these are ignored by a standard cargo fmt run |
bjorn3 | bffe880 | 2021-12-30 14:04:47 | [diff] [blame] | 46 | "compiler/rustc_codegen_cranelift/scripts", |
bjorn3 | b7bc8d5 | 2023-11-23 20:02:45 | [diff] [blame] | 47 | "compiler/rustc_codegen_cranelift/example/gen_block_iterate.rs", # uses edition 2024 |
Adam Perry | 8369a1a | 2019-10-29 15:33:11 | [diff] [blame] | 48 | ] |