Expand description
Implementation of running clippy on the compiler, standard library and various tools.
This serves a double purpose:
- The first is to run Clippy itself on in-tree code, in order to test and dogfood it.
- The second is to actually lint the in-tree codebase on CI, with a hard-coded set of rules,
which is performed by the
x clippy ci
command.
In order to prepare a build compiler for running clippy, use the
prepare_compiler_for_check function. That prepares a
compiler and a standard library
for running Clippy. The second part (actually building Clippy) is performed inside
Builder::cargo_clippy_cmd. It would be nice if this was more explicit, and we actually had
to pass a prebuilt Clippy from the outside when running cargo clippy
, but that would be
(as usual) a massive undertaking/refactoring.
Macros§
- lint_
any 🔒
Structs§
- Bootstrap
- Build
Helper - Build
Manifest - CI
- Runs Clippy on in-tree sources of selected projects using in-tree CLippy.
- Cargo
Miri - Clippy
- Codegen
Gcc - Collect
License Metadata - Compiletest
- Coverage
Dump - Jsondocck
- Jsondoclint
- Lint
Config - Lint
Docs - Llvm
Bitcode Linker - Miri
- Miropt
Test Tools - OptDist
- Remote
Test Client - Remote
Test Server - Rust
Analyzer - Rust
Installer - Rustc
- Lints the compiler.
- Rustdoc
- Rustfmt
- Std
- Test
Float Parse - Tidy
Constants§
- IGNORED_
RULES_ 🔒FOR_ STD_ AND_ RUSTC - Disable the most spammy clippy lints
Functions§
- get_
clippy_ rules_ in_ order - We need to keep the order of the given clippy lint rules before passing them. Since clap doesn’t offer any useful interface for this purpose out of the box, we have to handle it manually.
- lint_
args 🔒