Skip to content

Commit 13ef05d

Browse files
authored
Rollup merge of #147592 - Shunpoco:add-tidy-to-check, r=Zalathar
Add tidy to the target of ./x check ## Context Discussion: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/tidy.20isn't.20in.20.2E.2Fx.20check/with/544323712 Currently `tidy` (src/tools/tidy) is not included in the list of `./x check`. It means that rust-analyzer doesn't work for codes in the directory if you use `./x check` as the analyzer on your IDE. ## Change This PR adds src/tools/tidy into the target of `./x check`. It enables rust-analyzer highlight errors/warns on all codes in the directory. Note that since tidy is implicitly checked by `./x test tidy`, this new check is off by default.
2 parents 6c71fcb + d70857a commit 13ef05d

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
@@ -833,3 +833,8 @@ tool_check_step!(BumpStage0 {
833833
mode: Mode::ToolBootstrap,
834834
default: false
835835
});
836+
837+
// Tidy is implicitly checked when `./x test tidy` is executed
838+
// (if you set a pre-push hook, the command is called).
839+
// So this is mainly for people working on tidy.
840+
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)