Description
It's not possible to run x clippy
only on certain paths. When running x clippy $tool
, clippy starts giving warnings on the entire compiler and library tree as well. Therefore we are unable to run clippy with different set of rules indivudually for each tool/path.
The root cause of this problem is that bootstrap overrides all the commands before invocations with clippy as seen here:
rust/src/bootstrap/src/core/builder.rs
Lines 1291 to 1300 in df8ac8f
And that is because clippy is sharing the same logic with x check
:
rust/src/bootstrap/src/core/builder.rs
Lines 770 to 783 in df8ac8f
To prevent this problem we can create a new build step for clippy and then remove clippy-specific conditions from the core bootstrap flow.