X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=rustfmt.toml;h=828d492a3d19c892b53168bbe8f280641f6b28bd;hb=8e2f57094fff3dd684ef3d1ff743e50befb374c0;hp=ebeca8662a5195c6408e8707a06248c189ffab99;hpb=e0ba71e39ad68e58a32e88367271e8d5eda38550;p=rust.git diff --git a/rustfmt.toml b/rustfmt.toml index ebeca8662a5..828d492a3d1 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,6 +1,43 @@ -ignore = ["y.rs"] - -# Matches rustfmt.toml of rustc +# Run rustfmt with this config (it should be picked up automatically). version = "Two" use_small_heuristics = "Max" merge_derives = false + +# by default we ignore everything in the repository +# tidy only checks files which are not ignored, each entry follows gitignore style +ignore = [ + "/build/", + "/*-build/", + "/build-*/", + "/vendor/", + + # tests for now are not formatted, as they are sometimes pretty-printing constrained + # (and generally rustfmt can move around comments in UI-testing incompatible ways) + "tests", + + # do not format submodules + "library/backtrace", + "library/portable-simd", + "library/stdarch", + "compiler/rustc_codegen_gcc", + "src/doc/book", + "src/doc/edition-guide", + "src/doc/embedded-book", + "src/doc/nomicon", + "src/doc/reference", + "src/doc/rust-by-example", + "src/doc/rustc-dev-guide", + "src/llvm-project", + "src/tools/cargo", + "src/tools/clippy", + "src/tools/miri", + "src/tools/rls", + "src/tools/rust-analyzer", + "src/tools/rustfmt", + "src/tools/rust-installer", + + # these are ignored by a standard cargo fmt run + "compiler/rustc_codegen_cranelift/y.rs", # running rustfmt breaks this file + "compiler/rustc_codegen_cranelift/example", + "compiler/rustc_codegen_cranelift/scripts", +]