Skip to content

Commit e4dd9ed

Browse files
committed
Auto merge of #107704 - jyn514:tidy-ci, r=Mark-Simulacrum
Run `expand-yaml-anchors` in `x test tidy` Previously, the pre-commit hook which runs `x test tidy` could pass only to have CI fail within the first 30 seconds. This adds about 30 seconds to `test tidy` (for an initial run, much less after the tool is built the first time) in exchange for catching errors in `.github/workflows/ci.yml` before they're pushed.
2 parents dffea43 + 13588cc commit e4dd9ed

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/bootstrap/test.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1114,9 +1114,6 @@ impl Step for Tidy {
11141114
cmd.arg("--bless");
11151115
}
11161116

1117-
builder.info("tidy check");
1118-
try_run(builder, &mut cmd);
1119-
11201117
if builder.config.channel == "dev" || builder.config.channel == "nightly" {
11211118
builder.info("fmt check");
11221119
if builder.initial_rustfmt().is_none() {
@@ -1134,6 +1131,11 @@ help: to skip test's attempt to check tidiness, pass `--exclude src/tools/tidy`
11341131
}
11351132
crate::format::format(&builder, !builder.config.cmd.bless(), &[]);
11361133
}
1134+
1135+
builder.info("tidy check");
1136+
try_run(builder, &mut cmd);
1137+
1138+
builder.ensure(ExpandYamlAnchors {});
11371139
}
11381140

11391141
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {

src/tools/expand-yaml-anchors/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl App {
5151
["generate", ref base] => (Mode::Generate, PathBuf::from(base)),
5252
["check", ref base] => (Mode::Check, PathBuf::from(base)),
5353
_ => {
54-
eprintln!("usage: expand-yaml-anchors <source-dir> <dest-dir>");
54+
eprintln!("usage: expand-yaml-anchors <generate|check> <base-dir>");
5555
std::process::exit(1);
5656
}
5757
};

0 commit comments

Comments
 (0)