about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2019-12-30 14:07:56 +0900
committerGitHub <noreply@github.com>2019-12-30 14:07:56 +0900
commitb6244af566d173ac266df937a5608dddce182ab0 (patch)
tree4a8d0282b603b3e6af5fe9f999ca968975b70ad9
parent88e322c4f110206b73e01064d837adc7588c32c5 (diff)
parent5b80a99a9f72d0f95641b9ab9358fa3801d68be0 (diff)
downloadrust-b6244af566d173ac266df937a5608dddce182ab0.tar.gz
rust-b6244af566d173ac266df937a5608dddce182ab0.zip
Rollup merge of #67701 - petrochenkov:tidybless, r=Mark-Simulacrum
tidy: Enforce formatting rather than just check it if `--bless` is specified

Ensuring the "tidy"-ness currently requires running `rustfmt` twice:
```sh
./x.py fmt && ./x.py test tidy
```
, once to actually format code and the second time as a part of tidy to check that the code is formatted.

Running `rustfmt` is slow, so we don't want to run it twice.

With this PR tidy enforces the formatting rather than just checks it if `--bless` was passed to it:
```sh
./x.py test tidy --bless
```

r? @Mark-Simulacrum
-rw-r--r--src/bootstrap/test.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index f2a7d1d00cf..b5c8de057d0 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -736,7 +736,7 @@ impl Step for Tidy {
 
         if builder.config.channel == "dev" || builder.config.channel == "nightly" {
             builder.info("fmt check");
-            crate::format::format(&builder.build, true);
+            crate::format::format(&builder.build, !builder.config.cmd.bless());
         }
     }