blob: 88700779e87beb7e9f761c9b1202af3233532368 [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
6# by default we ignore everything in the repository
7# tidy only checks files which are not ignored, each entry follows gitignore style
8ignore = [
Mark Rousskovd5b760b2021-01-09 17:00:459 "/build/",
Rich Kadel79020a82021-04-24 21:12:2210 "/*-build/",
11 "/build-*/",
Eric Huss6575abc2020-02-11 03:08:2412 "/vendor/",
Jonas Schievink08e85aa2020-01-31 16:09:3413
Mark Rousskov8eb7c582019-12-22 21:43:5414 # tests for now are not formatted, as they are sometimes pretty-printing constrained
15 # (and generally rustfmt can move around comments in UI-testing incompatible ways)
Albert Larsan40ba0e82023-01-05 08:45:4416 "tests",
Mark Rousskov8eb7c582019-12-22 21:43:5417
Adam Perry8369a1a2019-10-29 15:33:1118 # do not format submodules
klensyf3d92482023-06-23 07:34:0619 # FIXME: sync submodule list with tidy/bootstrap/etc
20 # tidy/src/walk.rs:filter_dirs
Alex Crichton06d565c2020-05-13 21:22:3721 "library/backtrace",
Jubilee Young39cb8632021-10-22 07:12:0022 "library/portable-simd",
mark2c31b452020-06-12 02:31:4923 "library/stdarch",
Antoni Boucher8841e9e2021-07-19 23:08:0824 "compiler/rustc_codegen_gcc",
Adam Perry8369a1a2019-10-29 15:33:1125 "src/doc/book",
26 "src/doc/edition-guide",
27 "src/doc/embedded-book",
28 "src/doc/nomicon",
29 "src/doc/reference",
30 "src/doc/rust-by-example",
Santiago Pastorino4387a8b2020-03-10 20:22:2531 "src/doc/rustc-dev-guide",
Adam Perry8369a1a2019-10-29 15:33:1132 "src/llvm-project",
Adam Perry8369a1a2019-10-29 15:33:1133 "src/tools/cargo",
34 "src/tools/clippy",
35 "src/tools/miri",
Aleksey Kladov058c1b62020-06-04 11:11:1536 "src/tools/rust-analyzer",
Adam Perry8369a1a2019-10-29 15:33:1137 "src/tools/rustfmt",
bjorn3bffe8802021-12-30 14:04:4738
39 # these are ignored by a standard cargo fmt run
40 "compiler/rustc_codegen_cranelift/y.rs", # running rustfmt breaks this file
bjorn3bffe8802021-12-30 14:04:4741 "compiler/rustc_codegen_cranelift/scripts",
Adam Perry8369a1a2019-10-29 15:33:1142]