summary refs log tree commit diff
path: root/rustfmt.toml
diff options
context:
space:
mode:
authorRich Kadel <richkadel@google.com>2021-04-24 14:12:22 -0700
committerRich Kadel <richkadel@google.com>2021-04-24 14:12:22 -0700
commit79020a8d638697dfb9362c2a1a4fc73aa864232b (patch)
tree595e51b7c0966688d78ee1b8510882d06b82114a /rustfmt.toml
parent2b68027841af952d624a5ce509834237f8eda7e3 (diff)
downloadrust-79020a8d638697dfb9362c2a1a4fc73aa864232b.tar.gz
rust-79020a8d638697dfb9362c2a1a4fc73aa864232b.zip
`test tidy` should ignore alternative `build` dir patterns
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)
Diffstat (limited to 'rustfmt.toml')
-rw-r--r--rustfmt.toml2
1 files changed, 2 insertions, 0 deletions
diff --git a/rustfmt.toml b/rustfmt.toml
index af807aa6f73..480b19a5e93 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -7,6 +7,8 @@ merge_derives = false
 # 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