X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=rustfmt.toml;h=73f8cc1ff68c68bbbbfe6216f4b0f00626701672;hb=95318f8d859dc55cc5e06722c96f6e492529d6ca;hp=df230cde9b7130a94e69f4e15f2cdd4d40bf5430;hpb=bf54251f907c0979f14e955e0b4f3760ccba5317;p=rust.git diff --git a/rustfmt.toml b/rustfmt.toml index df230cde9b7..73f8cc1ff68 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,6 +1,32 @@ -# Currently, most of the code in the compiler uses historical style. -# -# For new code, consider running rustfmt with this config (it should -# be picked up automatically). +# 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 = [ + # 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 + "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-guide", + "src/llvm-project", + "src/stdarch", + "src/tools/cargo", + "src/tools/clippy", + "src/tools/miri", + "src/tools/rls", + "src/tools/rust-installer", + "src/tools/rustfmt", + + # We do not format this file as it is externally sourced and auto-generated. + "src/libstd/sys/cloudabi/abi/cloudabi.rs", +]