about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdam Perry <adam.n.perry@gmail.com>2019-10-30 19:23:50 -0700
committerMark Rousskov <mark.simulacrum@gmail.com>2019-12-21 20:23:39 -0500
commit2b081abe944a7915013e15ae602ac8cfe9f52a77 (patch)
tree813073c395e083cf92cd7e6e8e0e7786f7ffda05
parent5f17b63dacabc45620d9021a033e064ccffa30c7 (diff)
downloadrust-2b081abe944a7915013e15ae602ac8cfe9f52a77.tar.gz
rust-2b081abe944a7915013e15ae602ac8cfe9f52a77.zip
Include formatting check in the test step for tidy.
-rw-r--r--src/bootstrap/test.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index f3b2a73d3c5..17aea17e69e 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -779,6 +779,9 @@ impl Step for Tidy {
     /// This tool in `src/tools` checks up on various bits and pieces of style and
     /// otherwise just implements a few lint-like checks that are specific to the
     /// compiler itself.
+    ///
+    /// Once tidy passes, this step also runs `fmt --check` if tests are being run
+    /// for the `dev` or `nightly` channels.
     fn run(self, builder: &Builder<'_>) {
         let mut cmd = builder.tool_cmd(Tool::Tidy);
         cmd.arg(builder.src.join("src"));
@@ -792,6 +795,11 @@ impl Step for Tidy {
 
         builder.info("tidy check");
         try_run(builder, &mut cmd);
+
+        if builder.config.channel == "dev" || builder.config.channel == "nightly" {
+            builder.info("fmt check");
+            crate::format::format(&builder.build, true);
+        }
     }
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {