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.
This commit is contained in:
Matthias Krüger 2025-10-12 19:07:47 +02:00 committed by GitHub
commit 13ef05d52f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 0 deletions

View file

@ -833,3 +833,8 @@ tool_check_step!(BumpStage0 {
mode: Mode::ToolBootstrap,
default: false
});
// Tidy is implicitly checked when `./x test tidy` is executed
// (if you set a pre-push hook, the command is called).
// So this is mainly for people working on tidy.
tool_check_step!(Tidy { path: "src/tools/tidy", mode: Mode::ToolBootstrap, default: false });

View file

@ -1076,6 +1076,7 @@ impl<'a> Builder<'a> {
check::CoverageDump,
check::Linkchecker,
check::BumpStage0,
check::Tidy,
// This has special staging logic, it may run on stage 1 while others run on stage 0.
// It takes quite some time to build stage 1, so put this at the end.
//

View file

@ -50,6 +50,7 @@ ENV SCRIPT \
linkchecker \
run-make-support \
rustdoc-gui-test \
tidy \
&& \
/scripts/check-default-config-profiles.sh && \
python3 ../x.py build src/tools/build-manifest && \