mrkeyoor.com_
Tue 15 Sept 19:20 UTC
Dev Toolsevaluationupdated 14 Sept 2026

rust-clippy review

Clippy checks Rust code for common mistakes, suspicious constructs, slow patterns, and needlessly complex code. It ships through rustup and runs as a Cargo subcommand, giving most Rust projects access to more than 800 documented lints without a separate service.

trackingstars / 7d
Verdict

Our Clippy build succeeded in 108 seconds and all 38 tests passed in 297 seconds, making it the sensible default linter for a Rust team that accepts some policy work. Use its default groups in local development and CI, then add pedantic or restriction lints one at a time. Review --fix changes like code written by a colleague, since a current issue shows that a plausible suggestion can still produce an error.

We ran it

Lab card: what happened when we ran rust-clippyScreenshot of rust-clippy (rust-lang.github.io/rust-clippy)
Install✓ · 90s100 packages
Build✓ · 108s
Tests✓ · 297s38 passed · 0 failed of 38 (cargo test)
Repo4637 files~298,149 lines of source · 15.9 MB · 8 CI workflows · tests dir

Answers from our run

Does rust-clippy build from source?

Dependencies installed in 90 seconds (100 packages), and the build succeeded in 108 seconds. We cloned commit 47e8223 into a clean Debian container with 3 CPUs and no project-specific setup.

Do rust-clippy's tests pass?

Yes: 38 of 38 passed when we ran the project's own test command (cargo test). Some failures need services or credentials a bare container does not have.

Who should not use rust-clippy?

Teams that plan to apply every suggested edit without review: open issue #17730 shows a redundant_closure_for_method_calls suggestion producing a compiler error on Rust 1.100.0 nightly.

What are the alternatives to rust-clippy?

rustc built-in lints, rust-analyzer, cargo-deny. Our Clippy build succeeded in 108 seconds and all 38 tests passed in 297 seconds, making it the sensible default linter for a Rust team that accepts some policy work.

Setup4/590-second install; source build and tests take longer
Docs5/5Lint groups, CI, MSRV, fixes, and configuration are explained
Community5/5Same-day push with active issue and pull request triage
Maturity5/538 tests passed; false-positive reports still need review

Who it’s for

Rust teams that want correctness, suspicious-code, style, complexity, and performance checks in Cargo.
Maintainers who need lint behavior to respect a declared minimum supported Rust version.
CI owners willing to choose warning levels and review each automatic fix before merging it.
Compiler contributors prepared to work in a 298,149-line codebase tied closely to rustc internals.

Who it’s NOT for

Teams that plan to apply every suggested edit without review: open issue #17730 shows a redundant_closure_for_method_calls suggestion producing a compiler error on Rust 1.100.0 nightly.
Projects that want to enable the entire restriction group: the README says those lints can reject reasonable code, lack replacement suggestions, and contradict one another.
Developers seeking a drop-in replacement for rustc: the README says clippy-driver is only for running Clippy and may emit artifacts that are not properly optimized.
CI teams unwilling to triage false positives: the README warns that pedantic lints can misfire, and open issue #17718 reports disallowed_types firing on code generated by an external macro.

Setup reality

Our sandbox installed commit 47e8223 in 90 seconds and added 100 packages. The build succeeded in 108 seconds. Cargo test then passed all 38 tests in 297 seconds, with 0 failures.

Ordinary use needs a Rust toolchain plus the Clippy rustup component, not a hosted account, API key, or database. Teams still have to choose lint groups, warning levels, MSRV settings, and any per-lint values in clippy.toml.

Building the source is a larger job than running cargo clippy on an application. The repository has 4,637 files and about 298,149 source lines. Also note that cargo clippy --fix implies --all-targets, and the restriction group should be enabled lint by lint rather than as one block.

Cargo users get compiler-aware checks without a server

The 4,637-file Clippy checkout exposes more than 800 lints for mistakes, suspicious expressions, style, complexity, and performance. Most developers meet it through rustup component add clippy and cargo clippy, so there is no server to operate and no separate rule engine to wire into a project. Lint levels use the familiar allow, warn, and deny controls, and a denied finding makes the command exit with an error that CI can act on.

The contributor view is much larger than that simple command suggests. Our checkout held about 298,149 lines of source. Clippy combines early passes over syntax with late passes that can use type information from rustc, according to its contribution guide. Application teams do not need to understand those internals, but anyone writing a lint or diagnosing a compiler interaction is working inside a compiler-adjacent project rather than a small Cargo utility.

The default groups are safer than pedantic and restriction

Across the 15.9 MB checkout, the README divides Clippy's collection into 10 groups. Correctness lints are denied by default, while suspicious, style, complexity, and performance findings warn. Pedantic, restriction, nursery, and Cargo-manifest groups are opt-in. That split is one of Clippy's best decisions: a team can get useful feedback immediately, then make stricter taste and policy choices without pretending that every available rule has the same certainty.

Clippy's own README says the restriction group should emphatically never be switched on wholesale because individual rules may reject reasonable code, offer no alternative, or conflict with other lints. Rules such as banning todo!, forbidding unwrap, or limiting floating-point arithmetic can make sense in a particular module or CI job. They need a written reason and a narrow scope, even though the entire source checkout occupies only 15.9 MB.

One reported fix produced a Rust 1.100.0 compiler error

Open issue #17730 reports that a redundant_closure_for_method_calls edit failed to compile on Rust 1.100.0 nightly. cargo clippy --fix applies machine-applicable suggestions and implies --all-targets, which can bring examples, benches, and tests into the diff. In the reported case, Clippy suggested Option::copied, and the replacement failed because multiple applicable methods were in scope. Automatic application still needs a clean compile and an ordinary code review afterward.

Our source run used 3 CPUs and 12 GB of RAM, which was enough to complete installation, compilation, and the available tests. That successful run says the checked-out commit was buildable in the stated Debian container. It does not turn every lint suggestion into a safe rewrite for every generic type or macro expansion. Keep fixes in a separate diff, compile afterward, and allow a specific lint near code where the rule does not understand the surrounding constraints.

What happened when we ran it

Our sandbox installed commit 47e8223 in 90 seconds, adding 100 packages. The build then succeeded in 108 seconds. Our measurement setup was a fresh, unprivileged container with no secrets. For an end user, the README's rustup route is far less work; these measurements describe a source checkout, which is the path a contributor or distributor has to care about.

Cargo test succeeded in 297 seconds, reporting 38 passed and 0 failed out of 38. The repository occupied 15.9 MB before installed packages, and our scan counted 8 CI workflow files plus a tests directory. We found no Dockerfile, which is unsurprising for a rustup component but matters if a team expects the repository itself to supply a container build. Nothing in the supplied run log showed an install, compiler, or test failure.

clippy.toml cannot set allow, warn, or deny

Clippy's 15.9 MB source checkout reads per-lint values from clippy.toml or .clippy.toml, including disallowed names and the minimum supported Rust version. It can also take MSRV from the rust-version field in Cargo.toml or a crate attribute. The configuration file cannot allow or deny a lint; those levels belong in source attributes or command-line flags. That separation is easy to miss, especially when a team expects one TOML file to hold its entire policy.

All 38 tests passing in our no-secrets container also confirms that the checked-out test command did not depend on an external account or hosted service. A real project still needs a deliberate CI invocation. --no-deps limits checks to the selected crate, while workspace and feature flags decide which targets Clippy sees. On Cargo 1.97 and later, the README prefers CARGO_BUILD_WARNINGS=deny over -D warnings because the environment setting does not invalidate build caches.

September activity outweighs a 2,879-item queue

GitHub recorded a push on September 14, 2026, and 13,504 stars when we fetched the repository. It also listed 2,879 combined open issues and pull requests. The queue is large, but it is moving: pull requests were updated on September 14, and issue #17730 was opened on September 13. The contribution guide explains that volunteers handle new lints, fixes, reviews, and triage, so response time can vary even in an active project.

Clippy has 8 CI workflow files, a test directory, and a clean 38-test result in our sandbox. GitHub returned no latest release object, while the README directs users to the Clippy component shipped through rustup. That release shape is not a sign of abandonment when code and issue activity are current. The source is available under MIT or Apache-2.0 terms. For Rust code, start with Clippy before shopping for another source linter, but keep dependency policy in cargo-deny and editor assistance in rust-analyzer.

Alternatives

ProjectWhat it isPick it when
rustc built-in lints gh↗Compiler diagnostics and lint groups that arrive with Rust itself.pick this instead when compiler errors and the smaller built-in lint set cover your policy.
rust-analyzer gh↗An editor-focused Rust front end with live diagnostics, navigation, and code actions.pick this instead when interactive IDE feedback matters more than a lint gate in Cargo CI.
cargo-denyA Cargo plugin for dependency advisories, licenses, bans, and source rules.pick this instead when dependency policy is the problem rather than patterns inside Rust source.
SemgrepA multi-language static analyzer driven by source-pattern rules.pick this instead when one custom rule system must scan Rust alongside several other languages.

What people are saying

  1. [github-trending] rust-lang/rust-clippy

Sources

  1. Clippy README
  2. Clippy lint list
  3. Clippy lint configuration
  4. Clippy contributing guide
  5. Issue 17730: suggestion causes compiler error
  6. Issue 17718: disallowed_types macro false positive

More dev tools reviews

ASC · BrewUI · moment · gotohp · marktext · happy · the whole board →