]> git.lizzy.rs Git - rust.git/blob - rustfmt.toml
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / rustfmt.toml
1 # Run rustfmt with this config (it should be picked up automatically).
2 version = "Two"
3 use_small_heuristics = "Max"
4 merge_derives = false
5
6 # by default we ignore everything in the repository
7 # tidy only checks files which are not ignored, each entry follows gitignore style
8 ignore = [
9     "/build/",
10     "/*-build/",
11     "/build-*/",
12     "/vendor/",
13
14     # 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)
16     "tests",
17
18     # do not format submodules
19     "library/backtrace",
20     "library/portable-simd",
21     "library/stdarch",
22     "compiler/rustc_codegen_gcc",
23     "src/doc/book",
24     "src/doc/edition-guide",
25     "src/doc/embedded-book",
26     "src/doc/nomicon",
27     "src/doc/reference",
28     "src/doc/rust-by-example",
29     "src/doc/rustc-dev-guide",
30     "src/llvm-project",
31     "src/tools/cargo",
32     "src/tools/clippy",
33     "src/tools/miri",
34     "src/tools/rls",
35     "src/tools/rust-analyzer",
36     "src/tools/rustfmt",
37     "src/tools/rust-installer",
38
39     # these are ignored by a standard cargo fmt run
40     "compiler/rustc_codegen_cranelift/y.rs", # running rustfmt breaks this file
41     "compiler/rustc_codegen_cranelift/example",
42     "compiler/rustc_codegen_cranelift/scripts",
43 ]