Rust 110 🦀 Custom Lints and Static Analysis with Clippy Plugin Architecture
Clippy is not a separate linter that happens to understand Rust. It is a collection of lint passes that run inside the compiler, using the same HIR and type information that the rest of rustc uses. Adding a custom lint means writing a pass that implements EarlyLintPass or LateLintPass, registering it with the compiler’s lint…