mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
79020a8d63
I need to have multiple `build` directories, such as `build`, `build-fuchsia`, and `build-test`. But when I'm uploading a change, I run `./x.py test tidy`, and if I have a `build-something` directory with Rust sources, I git a bunch of formatting errors. `rustfmt.toml` only ignores the directory named `build`. This change extends the patterns to also ignore `build-*` and `*-build`. As a rustc contributor, I not only build the rust compiler to develop new features, but I also build alternative "distributions" (using secondary `*-config.toml` files with different configurations), including: * To occasionally rebuild a version of the compiler that `rust-analyzer` can use to `check` source (which fixes issues in the VS Code UI, so changing and rebuilding the compiler does not break VS Code editing Rust code). * To build custom distributions for Fuchsia * To build test distributions when working on changes to `bootstrap` (e.g., when I recently added `rust-demangler` to distributions)
38 lines
1.0 KiB
TOML
38 lines
1.0 KiB
TOML
# 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",
|
|
]
|