blob: 1f914964e2410c815077bd1e6cc2fa6dace47c1a [file] [log] [blame]
Mark Rousskov8eb7c582019-12-22 21:43:541# Run rustfmt with this config (it should be picked up automatically).
Aleksey Kladovce394612019-05-03 18:35:212version = "Two"
3use_small_heuristics = "Max"
Mark Rousskov8eb7c582019-12-22 21:43:544merge_derives = false
Adam Perry8369a1a2019-10-29 15:33:115
Adam Perry8369a1a2019-10-29 15:33:116# tidy only checks files which are not ignored, each entry follows gitignore style
7ignore = [
Mark Rousskovd5b760b2021-01-09 17:00:458 "/build/",
Rich Kadel79020a82021-04-24 21:12:229 "/*-build/",
10 "/build-*/",
Eric Huss6575abc2020-02-11 03:08:2411 "/vendor/",
Jonas Schievink08e85aa2020-01-31 16:09:3412
Mark Rousskov8eb7c582019-12-22 21:43:5413 # 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)
Urgauf43e3e22024-05-04 10:37:3015 "/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 Gomez8f47f972024-05-02 10:37:1321 "!/tests/run-make/*/rmake.rs",
Mark Rousskov8eb7c582019-12-22 21:43:5422
Adam Perry8369a1a2019-10-29 15:33:1123 # do not format submodules
klensyf3d92482023-06-23 07:34:0624 # FIXME: sync submodule list with tidy/bootstrap/etc
25 # tidy/src/walk.rs:filter_dirs
Alex Crichton06d565c2020-05-13 21:22:3726 "library/backtrace",
Jubilee Young39cb8632021-10-22 07:12:0027 "library/portable-simd",
mark2c31b452020-06-12 02:31:4928 "library/stdarch",
Antoni Boucher8841e9e2021-07-19 23:08:0829 "compiler/rustc_codegen_gcc",
Adam Perry8369a1a2019-10-29 15:33:1130 "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 Pastorino4387a8b2020-03-10 20:22:2536 "src/doc/rustc-dev-guide",
Adam Perry8369a1a2019-10-29 15:33:1137 "src/llvm-project",
Adam Perry8369a1a2019-10-29 15:33:1138 "src/tools/cargo",
39 "src/tools/clippy",
40 "src/tools/miri",
Aleksey Kladov058c1b62020-06-04 11:11:1541 "src/tools/rust-analyzer",
Bernardo Meurer Costae2870442024-05-14 18:47:1542 "src/tools/rustc-perf",
Adam Perry8369a1a2019-10-29 15:33:1143 "src/tools/rustfmt",
bjorn3bffe8802021-12-30 14:04:4744
45 # these are ignored by a standard cargo fmt run
bjorn3bffe8802021-12-30 14:04:4746 "compiler/rustc_codegen_cranelift/scripts",
bjorn3b7bc8d52023-11-23 20:02:4547 "compiler/rustc_codegen_cranelift/example/gen_block_iterate.rs", # uses edition 2024
Adam Perry8369a1a2019-10-29 15:33:1148]