Skip to content

Commit d70857a

Browse files
committed
Add tidy into ./x check
This commit adds src/tools/tidy into `./x check`. It enables rust-analyzer hightlights errors/warns on all codes in src/tools/tidy. Since tidy is implicitly checked by `./x test tidy`, this new check is off by default.
1 parent 9725c4b commit d70857a

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/bootstrap/src/core/build_steps/check.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,3 +841,8 @@ tool_check_step!(BumpStage0 {
841841
mode: Mode::ToolBootstrap,
842842
default: false
843843
});
844+
845+
// Tidy is implicitly checked when `./x test tidy` is executed
846+
// (if you set a pre-push hook, the command is called).
847+
// So this is mainly for people working on tidy.
848+
tool_check_step!(Tidy { path: "src/tools/tidy", mode: Mode::ToolBootstrap, default: false });

src/bootstrap/src/core/builder/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,7 @@ impl<'a> Builder<'a> {
10761076
check::CoverageDump,
10771077
check::Linkchecker,
10781078
check::BumpStage0,
1079+
check::Tidy,
10791080
// This has special staging logic, it may run on stage 1 while others run on stage 0.
10801081
// It takes quite some time to build stage 1, so put this at the end.
10811082
//

src/ci/docker/host-x86_64/pr-check-1/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ ENV SCRIPT \
5050
linkchecker \
5151
run-make-support \
5252
rustdoc-gui-test \
53+
tidy \
5354
&& \
5455
/scripts/check-default-config-profiles.sh && \
5556
python3 ../x.py build src/tools/build-manifest && \

0 commit comments

Comments
 (0)