rust-lang/rust-clippy

Created Dec 23, 2020 · View the rust-lang/rust-clippy repository page

A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

Contributors

557

Lines of Code

34,208

From

Nov 19, 2014

To

Dec 22, 2020

About rust-lang/rust-clippy

Clippy is a collection of over 800 lints for the Rust programming language designed to catch common mistakes and encourage idiomatic code. The lints are organized into categories with configurable severity levels, ranging from strict correctness checks to optional pedantic suggestions. By default, Clippy enables lints across correctness, suspicious code patterns, style, complexity, and performance—with correctness-related warnings set to deny level to prevent outright bugs. Users can customize which lints apply to their projects through code attributes, command-line flags, or a `clippy.toml` configuration file.

Clippy integrates directly into Rust's build toolchain as a cargo subcommand and can be invoked with `cargo clippy` on most platforms. It also functions as a standalone `clippy-driver` tool for projects that don't use cargo. The tool can automatically apply suggestions to code in many cases, similar to the Rust compiler's own `--fix` capability. Configuration options allow developers to fine-tune lint behavior, set minimum Rust versions to avoid lints for newer language features, and enable or disable specific rules on a per-crate or per-module basis.

The project serves Rust developers of all experience levels who want to improve code quality and learn idiomatic Rust patterns. Contributions are welcomed, and the project is licensed under either Apache 2.0 or MIT, consistent with the broader Rust ecosystem.

Share this video

More from rust-lang

See all →