X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=rustfmt.toml;h=480b19a5e933685cde31dddb4c6076b1169c2174;hb=66ba81059e15b3466c71fe5b5bf2418702dd1fd1;hp=2bd8f7d1bc15d7a6690a34aad18f968f7af9bd3c;hpb=7f020206e8f57dbf31b4ef3f7066d49e1bd19fbb;p=rust.git diff --git a/rustfmt.toml b/rustfmt.toml index 2bd8f7d1bc1..480b19a5e93 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,4 +1,37 @@ -# 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) + "src/test", + + # do not format submodules + "library/backtrace", + "library/stdarch", + "compiler/rustc_codegen_cranelift", + "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", +]