File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -779,6 +779,9 @@ impl Step for Tidy {
779779 /// This tool in `src/tools` checks up on various bits and pieces of style and
780780 /// otherwise just implements a few lint-like checks that are specific to the
781781 /// compiler itself.
782+ ///
783+ /// Once tidy passes, this step also runs `fmt --check` if tests are being run
784+ /// for the `dev` or `nightly` channels.
782785 fn run ( self , builder : & Builder < ' _ > ) {
783786 let mut cmd = builder. tool_cmd ( Tool :: Tidy ) ;
784787 cmd. arg ( builder. src . join ( "src" ) ) ;
@@ -792,6 +795,11 @@ impl Step for Tidy {
792795
793796 builder. info ( "tidy check" ) ;
794797 try_run ( builder, & mut cmd) ;
798+
799+ if builder. config . channel == "dev" || builder. config . channel == "nightly" {
800+ builder. info ( "fmt check" ) ;
801+ crate :: format:: format ( & builder. build , true ) ;
802+ }
795803 }
796804
797805 fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
You can’t perform that action at this time.
0 commit comments