Conceptual
Login

Linting Kernel Rust Code with Clippy

Clippy is a tool that reads correct-but-questionable Rust and suggests a better way to write it, catching sloppy patterns the compiler happily accepts. The kernel build can run it over your code by setting one option. The kernel's Rust code is expected to be clippy-clean, so running it before you show anyone your work removes a round of review comments. Skipping it means a reviewer does its job by hand.

Questions this Concept answers

  • What does Clippy add beyond what the Rust compiler already reports?