Skip to content
CAI
Software that uses CAICheck a score

rust-lang/rust-clippy

63.7

Adequate · 29 September 2026

153.5k

lines of production code

Rust

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is Clippy, a static analysis tool for the Rust programming language that enforces coding standards and identifies potential errors. It provides a comprehensive suite of lints covering code style, correctness, performance, and documentation, while also validating Cargo project metadata. The system includes robust configuration management via TOML files and developer tooling for lint creation, testing, and automated fixes.

How it got here

2014–2020 — Stabilization and test expansion

41 changes.

This period focused on stabilizing the \cargo clippy --fix\ feature and refactoring internal lint registration to use diagnostic items for improved reliability. It also involved a massive expansion of the test suite, adding comprehensive UI and regression tests for configuration parsing, crash prevention, and lint behavior across various Rust editions and contexts.

2021–2022 — lint expansion and tooling modernization

43 changes.

This period focused on significantly expanding Clippy's diagnostic coverage by introducing numerous new lints for loops, transmutes, operators, and Cargo metadata, while refactoring internal lint modules for better organization. Concurrently, the project modernized its developer tooling by restructuring the lintcheck utility and adding setup commands for IDEs and git hooks, alongside extensive test coverage for new configuration options and behavioral changes.

2023–2024 — configuration refactoring and documentation lints

40 changes.

This period focused on restructuring Clippy's configuration management by extracting it into a dedicated crate with an improved TOML parser, while simultaneously introducing a comprehensive suite of new lints for doc comments. Extensive test coverage was added to validate the new configuration system, verify the behavior of numerous existing lints against custom thresholds, and ensure the correctness of the new documentation checks.

2025–2026 — lint modularization and test expansion

25 changes.

This period focused on refactoring Clippy's linting logic into modular, maintainable structures across several categories, including returns, ifs, writes, pointers, and floating-point arithmetic. Concurrently, extensive test coverage was added to validate configuration options, edge cases, and new lint behaviors, ensuring robustness for both internal consistency and user-facing features.

Features

Introduce type certainty heuristic in clippy\_utils

Added a new \type\_certainty\ module to \clippy\_utils\ that provides a heuristic to determine whether an expression's type can be resolved purely from its subexpressions without relying on surrounding context. This includes the \expr\_type\_is\_certain\ function and supporting logic for handling literals, paths, and generic arguments, serving as a counterpart to existing inference-needed checks.

_clippy\_utils/src/ty/type\certainty · high confidence

New AST utility module for semantic equality and identifier extraction

A new \ast\_utils\ module has been added to \clippy\utils\, providing utilities for manipulating and extracting information from the Rust AST. This includes an \IdentIter\ type that collects identifiers from expressions and attributes, and a suite of \eq\\*\ functions (such as \eq\_pat\, \eq\_expr\, and \eq\_path\) that perform semantic equality checks on AST nodes while ignoring node IDs and spans. These tools enable lints to compare AST structures for structural equivalence without being affected by source location or internal compiler identifiers.

_clippy\_utils/src/ast\utils · high confidence

New MIR analysis utilities for borrow checking

Added \clippy\_utils/src/mir\ with utilities to analyze MIR for borrow relationships and local usage. \PossibleBorrowerMap\ tracks which locals may borrow from others (including transitive borrows), while \visit\_local\_usage\ collects read, consume, and mutation locations for specific locals within live storage ranges. These helpers support lints like \redundant\_clone\ and \needless\_borrow\ by providing precise MIR-level data on borrowing and usage.

_clippy\utils/src/mir · high confidence

New and improved documentation lints for Clippy

Clippy now includes a comprehensive suite of new lints for doc comments, all located in the \clippy\_lints/src/doc\ module. These lints detect broken links (\doc\_broken\_link\), double-space line breaks (\doc\_comment\_double\_space\_linebreaks\), missing terminal punctuation in paragraphs (\doc\_paragraphs\_missing\_punctuation\), suspicious footnote references (\doc\_suspicious\_footnotes\), unconditional file includes in docs (\doc\_include\_without\_cfg\), lazy paragraph continuations in lists and blockquotes (\doc\_lazy\_continuation\), links using quotes instead of backticks (\doc\_link\_with\_quotes\), bare URLs and missing backticks in markdown (\doc\_markdown\), missing safety/panic/error headers (\missing\_headers\), needless \fn main\ in doctests (\needless\_doctest\_main\), suspicious outer doc comments on modules (\suspicious\_doc\_comments\), unit tests inside doctests (\test\_attr\_in\_doctest\), and overly long first doc paragraphs (\too\_long\_first\_doc\_paragraph\).

_clippy\lints/src/doc · high confidence

New and updated loop lints in clippy\_lints/src/loops

The \clippy\_lints/src/loops\ module has been reorganized into individual lint files, introducing several new checks and updating existing ones. New lints include \char\_indices\_as\_byte\_indices\ (detects using character positions as byte indices on strings), \empty\_loop\ (warns on empty \loop {}\ blocks), \for\_unbounded\_range\ (flags \for\ loops over unbounded ranges like \0..\), \iter\_next\_loop\ (flags iterating over \Iterator::next()\), \manual\_find\ (suggests \Iterator::find\ for manual search loops), and \manual\_flatten\ (suggests \.flatten()\ for unnecessary \if let\ on \Option\/\Result\ in loops). Existing lints such as \explicit\_counter\_loop\, \explicit\_into\_iter\_loop\, \explicit\_iter\_loop\, and \for\_kv\_map\ have been refactored and updated to provide more accurate suggestions and handle edge cases like mutable references and MSRV constraints.

_clippy\lints/src/loops · high confidence

New developer utilities and Clippy lints page assets

This change introduces several new utility scripts and assets for the Clippy project. It adds a pre-commit hook (\util/etc/pre-commit.sh\) that automatically formats Rust code and updates lint sources before committing. It also provides a \fetch\_prs\_between.sh\ script to generate changelog entries from merge commits and a \vscode-tasks.json\ file to simplify common development tasks like checking, testing, and formatting within VS Code. Additionally, it includes the source files for the Clippy lints documentation page (\util/gh-pages/\), containing the HTML template, CSS styles, and JavaScript logic for filtering and searching lints, as well as a Python script (\util/versions.py\) to generate version-specific documentation pages.

util · high confidence

New internal debugging and lint-authoring utilities

Added internal utilities to \clippy\_lints/src/utils\ to aid in lint development and debugging: \attr\_collector\ and \format\_args\_collector\ gather crate-level attribute and format-argument spans for internal lints, \dump\_hir\ provides a \\#\[clippy::dump\]\ attribute to print HIR nodes for debugging, and \author\ offers a \\#\[clippy::author\]\ attribute that generates pattern-matching code scaffolding to help developers write new lints.

_clippy\lints/src/utils · high confidence

New internal lints for Clippy source consistency and performance

The \clippy\_lints\_internal\ crate now includes several new internal lints to enforce coding standards and improve performance within Clippy's own source code. These include \ALMOST\_STANDARD\_LINT\_FORMULATION\ to enforce standardized documentation phrasing, \COLLAPSIBLE\_SPAN\_LINT\_CALLS\ to simplify verbose lint reporting, \REPEATED\_IS\_DIAGNOSTIC\_ITEM\ to optimize repeated diagnostic item checks, \INTERNING\_LITERALS\ and \SYMBOL\_AS\_STR\ to encourage the use of preinterned symbols, \UNUSUAL\_NAMES\ to standardize variable naming for common types, and \UNSORTED\_CLIPPY\_UTILS\_PATHS\ to maintain lexical ordering in path definitions.

_clippy\_lints\internal · high confidence

New lints for Cargo.toml metadata, feature naming, and lint group priorities

Clippy now includes several new lints to improve Cargo.toml quality. The \cargo\_common\_metadata\ lint warns when essential fields like description, license, repository, keywords, or categories are missing. The \negative\_feature\_names\ and \redundant\_feature\_names\ lints flag feature names using prefixes like \no-\/\not-\ or suffixes like \-support\, suggesting cleaner names. The \lint\_groups\_priority\ lint detects conflicts where a lint group and an individual lint share the same priority, which can lead to undefined behavior since Cargo ignores lint order. Additionally, \multiple\_crate\_versions\ warns when the same dependency is pulled in at different versions, and \wildcard\dependencies\ flags the use of \\\ version requirements.

_clippy\lints/src/cargo · high confidence

New lints for eager transmutes, missing annotations, and cross-pointer transmutes

Clippy now detects several new transmute patterns to help prevent undefined behavior and improve code clarity. The new \eager\_transmute\ lint warns when \transmute\ is evaluated eagerly inside \bool::then\_some\, suggesting \bool::then\ for lazy evaluation to avoid unsoundness. The \missing\_transmute\_annotations\ lint requires explicit type parameters on \transmute\ calls to prevent unexpected type inference. Additionally, \crosspointer\_transmute\ flags transmutes between a type and a pointer to that type, while existing lints like \transmute\_int\_to\_bool\ and \transmute\_int\_to\_non\_zero\ now offer specific safe alternatives like \!= 0\ or \NonZero::new\_unchecked\.

_clippy\lints/src/transmute · high confidence

New lints for function signatures and parameter naming

The \clippy\_lints/src/functions\ module now includes three new lints: \duplicate\_underscore\_argument\ flags function arguments whose names differ only by a leading underscore, \impl\_trait\_in\_params\ restricts the use of \impl Trait\ in public function parameters to encourage explicit generic type parameters, and \misnamed\_getters\ detects getter methods that return a field with a different name than the method itself.

_clippy\lints/src/functions · high confidence

New lints for operator misuse and side effects

The \clippy\_lints/src/operators\ module now includes several new lints to detect common operator pitfalls: \absurd\_extreme\_comparisons\ flags comparisons against minimum/maximum values that are always true or false; \arithmetic\_side\_effects\ warns about integer operations that may overflow or panic; \decimal\_bitwise\_operands\ suggests using binary, hex, or octal literals for bitwise operations; \manual\_is\_multiple\_of\ and \manual\_midpoint\ suggest idiomatic alternatives for manual calculations; and \const\_comparisons\ (renamed from \impossible\_double\_const\_comparisons\ and \ineffective\_double\_const\_comparisons\) detects redundant or impossible boolean expressions involving constants.

_clippy\lints/src/operators · high confidence

New lints for simplifying Option/Result patterns

Clippy now includes several new lints in the \matches\ module to suggest more idiomatic alternatives for common \Option\ and \Result\ handling patterns. The \manual\_filter\ lint detects manual \and\_then\ implementations that can be replaced with \filter\. The \manual\_map\ lint suggests using \map\ instead of manual \Some\/\None\ branching. The \manual\_ok\_err\ lint identifies manual \ok()\ or \err()\ conversions. The \manual\_unwrap\_or\ and \manual\_unwrap\_or\_default\ lints suggest replacing manual \None\ fallbacks with the corresponding standard library methods. Additionally, \infallible\_destructuring\_match\ suggests replacing single-arm matches with simple \let\ bindings, and \match\_as\_ref\ suggests using \as\_ref\ or \as\_mut\ when matching references.

_clippy\lints/src/matches · high confidence

New rustc\_tools\_util library for build-time version string generation

This change introduces the \rustc\_tools\_util\ crate, providing a \build.rs\ macro (\setup\_version\_info\) and a runtime \VersionInfo\ struct to automatically embed version details (major/minor/patch, crate name, git commit hash, commit date, and host compiler channel) into compiled binaries. The utility detects the git commit hash and date, determines the Rust release channel (defaulting to stable if not explicitly set via \CFG\_RELEASE\_CHANNEL\), and ensures the build reruns when git state changes. It also implements \Display\ and \Debug\ traits for the version info struct to facilitate user-facing output.

_rustc\_tools\util/src · high confidence

New setup commands for git hooks, IDEs, and toolchains

The \cargo dev setup\ command now includes dedicated subcommands to streamline local development: \git-hook\ installs a pre-commit hook to enforce formatting, \vscode-tasks\ copies VS Code task definitions for convenient linting, \intellij\ configures IntelliJ IDEA by injecting local paths to the Rust compiler sources into Clippy's Cargo manifests, and \toolchain\ creates a custom Rust toolchain containing Clippy binaries for use in other projects. Corresponding \cargo dev remove\ commands are also available to undo these configurations.

_clippy\dev/src/setup · high confidence

New utility module for type analysis in clippy\_utils

A new \clippy\_utils::ty\ module has been introduced to centralize type-related helper functions for Clippy lints. This module exposes utilities such as \ty\_from\_hir\_ty\ for lowering HIR types, \is\_copy\ for checking copyability, and \has\_debug\_impl\ for verifying Debug trait implementations. It also includes logic for detecting iterator items, handling opaque type predicates (\impl Trait\), and determining if \Clone\ should be called as a function. This refactoring consolidates scattered type-checking logic into a single, reusable location.

_clippy\utils/src/ty · high confidence

Stabilize \`cargo clippy --fix\` and add \`--no-deps\` flag

The \--fix\ command-line argument is now stable, allowing users to automatically apply lint suggestions. This flag now implies \--no-deps\, ensuring that Clippy only lints and fixes the current crate rather than its dependencies. A new \--no-deps\ flag has also been added, enabling users to run Clippy exclusively on the target crate and skip linting dependencies entirely.

src · high confidence

Architecture

Refactor pointer lints into modular files

The pointer-related lints (\cmp\_null\, \mut\_from\_ref\, \ptr\_arg\, \ptr\_eq\) have been extracted from a single \ptr.rs\ file into their own individual modules within the \clippy\_lints/src/ptr\ directory. This change improves code organization and maintainability by separating the distinct linting logic for each rule into dedicated files, while the \mod.rs\ file now serves as the central registration point for these lints.

_clippy\lints/src/ptr · high confidence

Refactor type lints into a dedicated module

The type-related lints (including \borrowed\_box\, \box\_collection\, \linked\_list\, \option\_option\, \owned\_cow\, \rc\_buffer\, \rc\_mutex\, \redundant\_allocation\, \type\_complexity\, and \vec\_box\) have been extracted from the main \types\ module into their own individual files within the \clippy\_lints/src/types\ directory. This structural change improves code organization and maintainability without altering the linting behavior or output for users.

_clippy\lints/src/types · high confidence

Refactored attribute lints into dedicated submodules

The attribute-related lints in \clippy\_lints/src/attrs\ have been reorganized from a single large file into separate, dedicated source files (e.g., \allow\_attributes.rs\, \duplicated\_attributes.rs\, \useless\_attribute.rs\). This structural change improves code maintainability and clarity without altering the linting behavior or output for users.

_clippy\lints/src/attrs · high confidence

Behavioural changes

428 commits (46 fixes) modifying clippy\_lints/src/casts

A change to existing behaviour in clippy\_lints/src/casts — 428 commits (46 fixs), 29 files.

_clippy\lints/src/casts · medium confidence · unverified

Add empty clippy\_test\_deps binary

A new empty Rust binary (clippy\_test\_deps) has been added to the repository, containing only a main function that does nothing. This appears to be a placeholder or structural addition related to the clippy test dependencies setup, likely supporting the use of a ui\_test dependency builder for non-internal test dependencies as mentioned in the commit messages.

_clippy\_test\deps · medium confidence

Added dummy crate to redirect users from crates.io to rustup

A new \clippy\_dummy\ crate has been added to crates.io to handle installation attempts from that source. When users try to install Clippy via \cargo install\, this dummy package triggers a build script that displays a colored error message instructing them to use \rustup component add clippy\ instead. The crate's documentation and README also explicitly state that installation via crates.io is deprecated and guide users toward the rustup method.

_clippy\dummy · high confidence

Clippy configuration is now managed via a dedicated \`clippy\_config\` crate

Clippy's lint configuration has been moved from the main crate into a new \clippy\_config\ crate. This change introduces a rewritten TOML configuration parser that provides improved error reporting, including suggestions for typos in configuration keys and better formatting of allowed values in diagnostic messages. The new structure also supports configuration field renaming and allows for more robust validation of disallowed paths and types.

_clippy\config · high confidence

Clippy lints in \`clippy\_lints/src/methods\` now use diagnostic items instead of string paths

The \methods\ lint pass has been refactored to replace string-based path checks (e.g., \paths::ITERATOR\) with compiler diagnostic items (e.g., \sym::iter\_mut\). This change improves the reliability of lint detection by using stable compiler identifiers rather than fragile string comparisons, ensuring that lints correctly identify standard library methods even if internal path names change.

_clippy\lints/src/methods · high confidence

Clippy lints no longer trigger on attributes from proc macros

Clippy will no longer lint \allow\_attributes\ on attributes that originate from proc macros. This change prevents false positives where attributes generated by external macro expansions were incorrectly flagged, ensuring that linting remains focused on user-written code rather than macro-generated syntax.

_clippy\utils/src · high confidence

Clippy lints now use \`register\_renamed\` for uplifted lints

When lints are uplifted from the Clippy repository to the Rust compiler, they are now registered using \register\_renamed\ instead of \register\_removed\. This ensures that the old lint names remain available as aliases, allowing existing code that suppresses or references the previous lint names to continue compiling without errors after the uplift.

(repo-wide) · high confidence

Clippy lints updated for Rust nightly

The \clippy\_lints\ source files have been updated to track the latest Rust nightly compiler changes. This maintenance ensures that the linter continues to function correctly and accurately analyzes Rust code against the current language version.

_clippy\lints/src · high confidence

Derive lints now respect allow/expect attributes

The derive-related lints (such as \DERIVE\_ORD\_XOR\_PARTIAL\_ORD\, \DERIVE\_PARTIAL\_EQ\_WITHOUT\_EQ\, \DERIVED\_HASH\_WITH\_MANUAL\_EQ\, \EXPL\_IMPL\_CLONE\_ON\_COPY\, and \UNSAFE\_DERIVE\_DESERIALIZE\) now correctly honor \\#\[allow\]\ and \\#\[expect\]\ attributes placed on the ADT definition and on \impl Clone\ nodes. This means users can suppress these warnings at the type level without needing to annotate every individual derive or impl block, and the lints will no longer fire when the attribute is present.

_clippy\lints/src/derive · high confidence

Expanded floating-point linting for accuracy and performance

The \floating\_point\_arithmetic\ lint module has been refactored into separate sub-modules to detect and suggest more precise or efficient floating-point operations. Users will now see suggestions for replacing manual absolute value implementations with \.abs()\, \x.exp() - 1\ with \.exp\_m1()\, \ln(1 + x)\ with \.ln\_1p()\, and \hypot\-like expressions (\sqrt(x\*x + y\*y)\) with \.hypot()\. Additionally, the lints now recommend specialized methods for logarithms (\log2\, \log10\, \ln\), square/cube roots (\sqrt\, \cbrt\), and integer powers (\powi\), as well as converting degree/radian expressions to \.to\_degrees()\ or \.to\_radians()\. The \mul\_add\ lint has also been improved to handle assignment operators and provide better type handling for unsuffixed literals.

_clippy\_lints/src/floating\_point\arithmetic · high confidence

Lint registration and grouping logic moved to a dedicated crate

The logic for registering Clippy lints and managing lint groups has been extracted into the new \declare\_clippy\_lint\ crate. This change introduces a \LintListBuilder\ that automatically categorizes lints (e.g., correctness, style, complexity) and registers them under specific groups like \clippy::default\ (with an alias to \clippy::all\). The \declare\_clippy\_lint\ macro now generates metadata for each lint, including its category and source location, enabling centralized management of lint groups and categories.

_declare\_clippy\lint · high confidence

Lintcheck tooling is restructured with new CLI, output formats, and recursive checking

The lintcheck utility has been refactored into a standalone crate with a new command-line interface built on clap, supporting subcommands like \diff\ to compare JSON lint logs and \popular\ to fetch top crates. Users can now choose between Text, Markdown, and JSON output formats, and the tool supports recursive checking of crate dependencies via a new \--recursive\ mode that uses a background server to collect warnings from dependencies. The tool also introduces a \--perf\ flag for benchmarking, configurable parallelism (defaulting to all cores unless \--fix\ or \--recursive\ is used), and improved handling of source links and crate sources (crates.io, git, local paths).

lintcheck/src · high confidence

Refactor if/else lints into dedicated modules

The linting logic for \if\/\else\ and \match\ expressions has been reorganized from a single file into separate modules (\branches\_sharing\_code.rs\, \if\_same\_then\_else.rs\, \ifs\_same\_cond.rs\, and \same\_functions\_in\_if\_cond.rs\). This change improves code maintainability and clarity by isolating the implementation of each specific lint—such as detecting shared code in branches, identical \then\/\else\ blocks, or duplicate conditions—into its own file, while the main \mod.rs\ continues to orchestrate the \CopyAndPaste\ lint pass.

_clippy\lints/src/ifs · high confidence

Refactor unit\_types lints into a dedicated module

The \let\_unit\_value\, \unit\_arg\, and \unit\_cmp\ lints have been extracted from the general \types\ group into a new, dedicated \unit\_types\ module. This change reorganizes the internal structure of Clippy by moving the lint implementations and their shared utilities into their own files, while preserving the existing behavior and diagnostic messages for users.

_clippy\_lints/src/unit\types · high confidence

The \returns\ lint module has been split into separate files (\let\_and\_return.rs\, \needless\_return.rs\, \needless\_return\_with\_question\_mark.rs\) to improve maintainability. This change refines the \let\_and\_return\ lint to no longer trigger on \let else\ bindings and to correctly handle lint-level attributes on the return expression, preventing false positives when attributes are present. The \needless\_return\ lint now better handles \\#\[expect\]\ attributes and avoids false positives in code following \cfg\-gated returns. Additionally, the \needless\_return\_with\_question\_mark\ lint has been fixed to correctly trigger in async functions by properly peeling the async body wrapper.

_clippy\lints/src/returns · high confidence

Refactored write lints into modular components with improved suggestions

The \clippy\_lints/src/write\ module has been restructured by extracting individual lint checks into separate files (\empty\_string.rs\, \literal.rs\, \use\_debug.rs\, \with\_newline.rs\) to improve maintainability. This change includes fixes for the \println\_empty\_string\ lint, ensuring that auto-fix suggestions correctly handle cases with commas or non-parenthesis delimiters, and refines the \with\_newline\ lint to provide accurate multi-part suggestions for converting \print!\/\write!\ to \println!\/\writeln!\. The \literal\ lint now more robustly handles literal argument removal and index relocalization in format strings.

_clippy\lints/src/write · high confidence

Restructure misc\_early lints into dedicated modules

The miscellaneous early lints in \clippy\_lints/src/misc\_early\ have been refactored from a single monolithic file into separate modules (\builtin\_type\_shadow\, \literal\_suffix\, \mixed\_case\_hex\_literals\, \redundant\_at\_rest\_pattern\, \redundant\_pattern\, \unneeded\_field\_pattern\, \unneeded\_wildcard\_pattern\, and \zero\_prefixed\_literal\). This change improves code organization and maintainability without altering the behavior of the lints themselves.

_clippy\_lints/src/misc\early · high confidence

Rewrite of \`clippy\_dev\` with new lint management and formatting commands

The \clippy\_dev\ tool has been rewritten in Rust to improve reliability and performance. It now includes dedicated commands for managing lints: \cargo dev deprecate\ to mark lints as deprecated, \cargo dev rename\_lint\ to rename them while updating all references, and \cargo dev uplift\ to remove a lint's deprecation. The \cargo dev update\_lints\ command has been reimplemented to regenerate lint declarations, changelog links, and module registrations. Additionally, \cargo dev fmt\ provides a faster, token-aware formatter for Clippy's configuration and source files, and \cargo dev lint\ allows running Clippy on specific files or directories.

_clippy\dev/src · high confidence

rustc\_tools\_util 0.4.0 release with improved git handling and build integration

The rustc\_tools\_util crate has been updated to version 0.4.0, introducing several behavioral improvements for build-time version information generation. The \get\_commit\_date\ and \get\_commit\_hash\ functions now return \None\ when the \git\ command fails, rather than returning an empty string, providing more accurate error signaling. A new \rerun\_if\_git\_changes\ function has been added to ensure build scripts re-run when the git commit changes, improving build cache reliability. Additionally, commit hashes are now consistently truncated to 10 characters in output. The crate also includes updated documentation and license symlinks to clarify usage for packages installed from git repositories.

_rustc\_tools\util · high confidence

Test coverage

Add tests for ref\_option lint configuration; Added UI tests for Cargo rust-version field handling; Added UI tests for Cargo rust-version field handling; Added UI tests for MSRV-aware linting behavior; Added UI tests for clippy.toml configuration handling; Added UI tests for const\_trait\_impl compatibility in needless\_borrows\_for\_generic\_args; Added UI tests for doc comment lints; Added UI tests for empty\_line\_after\_doc\_comments and empty\_line\_after\_outer\_attr lints; Added UI tests for main recursion and no\_std swap lints; Added UI tests for semicolon placement lints; Added UI tests for the \non\_std\_lazy\_statics\ lint; Added UI tests for the clippy::author lint; Added UI tests for undocumented\_unsafe\_blocks configuration options; Added UI tests for unwrap lints in complex and nested conditionals; Added auxiliary test fixtures for crash regression testing; Added auxiliary test fixtures for external macro and crate testing; Added comprehensive test suite for Clippy; Added configuration tests for Clippy lint thresholds; Added internal lint tests for clippy development checks; Added test auxiliary file for const function stability testing; Added test cases for lint\_groups\_priority; Added test coverage for \impl\_trait\_in\_params\ lint with \avoid-breaking-exported-api\ config; Added test coverage for \result\_large\_err\ configuration options; Added test coverage for \unnecessary\_safety\_comment\ lint in Cargo projects; Added test coverage for array-size-threshold configuration; Added test coverage for duplicate module and negative feature name diagnostics; Added test coverage for lint group priority conflicts; Added test coverage for mutable key type lint configuration; Added test coverage for private item documentation lints; Added test coverage for private module inception configuration; Added test coverage for the \allow-one-hash-in-raw-strings\ configuration option; Added test coverage for the \extra\_unused\_type\_parameters\ lint with exported API protection; Added test coverage for the large\_stack\_frames lint with custom threshold configuration; Added test coverage for vec-box-size-threshold configuration; Added test for \publish = true\ metadata validation; Added test for allowing dev and build dependencies in multiple crate versions check; Added test for allowing duplicate crate versions; Added test for cargo\_common\_metadata lint with \_cargo\_ignore\_publish; Added test for configurable trivial-copy size limit; Added test for crate names with dashes; Added test for custom too-many-arguments threshold; Added test for invalid MSRV configuration; Added test for invalid \disallowed-names\ configuration type; Added test for invalid \replacement\ key in \await-holding-invalid-types\ config; Added test for invalid clippy.toml configuration; Added test for missing package metadata warnings; Added test for module-style lint with remapped paths; Added test for multiple config file warnings; Added test for multiple\_inherent\_impl config failure; Added test for needless\_pass\_by\_ref\_mut with avoid-breaking-exported-api; Added test for path\_ends\_with\_ext lint with allowed-dotfiles config; Added test for suppressing restriction lints in const contexts; Added test for type\_repetition\_in\_bounds lint with custom max-trait-bounds; Added test for unknown TOML config struct fields; Added test for wildcard dependency lint failure; Added test for zero single-char names threshold; Added tests for Clippy module style linting rules; Added tests for TOML-based disallowed types configuration; Added tests for arithmetic side-effects allowlist configuration; Added tests for clippy.toml unknown key validation; Added tests for clippy::use\_self lint with recursive-self-in-type-definitions config; Added tests for collapsible\_if and collapsible\_else\_if lint behavior; Added tests for configurable struct constructor field order lint; Added tests for configurable trait item ordering modes; Added tests for decimal literal readability lints; Added tests for deprecated TOML key duplication; Added tests for deprecated configuration keys and TOML validation; Added tests for disallowed methods with replacements; Added tests for disallowed names configuration; Added tests for disallowed-methods configuration with unloaded crates; Added tests for disallowed-names append and replace modes; Added tests for excessive precision lint with custom threshold; Added tests for extending vs replacing doc-valid-idents configuration; Added tests for ifs\_same\_cond lint with ignore-interior-mutability config; Added tests for ignore-interior-mutability configuration; Added tests for invalid path validation in disallowed configurations; Added tests for large\_stack\_frames lint on macros and special targets; Added tests for linting incompatible MSRV in test code; Added tests for module style lint rules; Added tests for module style linting rules; Added tests for module-style lint false positives; Added tests for module\_name\_repetitions lint configuration options; Added tests for multiple Clippy configuration file handling; Added tests for multiple\_inherent\_impl lint scope configuration; Added tests for multiple\_inherent\_impl lint scope handling; Added tests for negative and redundant feature name lints; Added tests for publish metadata handling; Added tests for strict non-Send field checking in Send types; Added tests for the \definition\_in\_module\_root\ lint edge cases; Added tests for the \too\_many\_lines\ lint configuration; Added tests for the \useless\_vec\ lint's test-allow configuration; Added tests for the aggressive upper\_case\_acronyms lint mode; Added tests for the allow-mixed-uninlined-format-args configuration; Added tests for the allow-print-in-tests configuration option; Added tests for the allow-unwrap-types configuration; Added tests for the disallowed\_methods lint configuration; Added tests for the missing\_enforced\_import\_renames lint configuration; Added tests for the new \index\_refutable\_slice\ lint; Added tests for unwrap\_used lint configuration in test and const contexts; Added tests for wildcard\_imports configuration precedence; Added workspace test structure for linting verification; Deprecation of update-all-references script; Expanded UI test coverage for Clippy lints; Expanded UI test coverage for the \should\_implement\_trait\ lint; Expanded UI tests for size\_of\_in\_element\_count lint; Expanded crash regression test coverage for Clippy lints; Expanded test coverage for the branches\_sharing\_code lint; Updated UI tests for missing\_const\_for\_fn lint; Updated \cmp\_owned\ lint tests for asymmetric equality and macro edge cases.

Dependencies

Clippy toolchain dependencies updated to latest versions

The Clippy toolchain's Cargo manifests and lockfiles have been updated to use newer versions of key dependencies, including \cargo\_metadata\ 0.23, \itertools\ 0.15, \pulldown-cmark\ 0.11, \askama\ 0.16.1, \clap\ 4.4, \toml\ 1.1, and \ui\_test\ 0.30.7. These updates ensure compatibility with the latest Rust tooling and provide access to new features and bug fixes in the underlying libraries used by Clippy's driver, configuration, and test infrastructure.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 69 → 64 (-4.8)
  • Rubric changed (rubric-2026.09.8 → rubric-2026.09.17) — scores are not directly comparable.

Lenses

  • Code Health 76 → 76 (-0.1)
  • Architecture 99 → 95 (-4.1)
  • Maturity 62 → 62 (-0.0)
  • Readiness 68 → 56 (-12.3)
  • Security 71 → 77 (+5.8)

Resolved (109)

  • Duplicated block (13 lines × 2) (clippy_lints/src/functions/must_use.rs)
  • Hotspot: clippy_dev/src/fmt.rs (clippy_dev/src/fmt.rs)
  • Hotspot: clippy_dev/src/parse/cursor.rs (clippy_dev/src/parse/cursor.rs)
  • Hotspot: clippy_lints/src/attrs/useless_attribute.rs (clippy_lints/src/attrs/useless_attribute.rs)
  • Hotspot: clippy_lints/src/booleans.rs (clippy_lints/src/booleans.rs)
  • Hotspot: clippy_lints/src/casts/cast_possible_truncation.rs (clippy_lints/src/casts/cast_possible_truncation.rs)
  • Hotspot: clippy_lints/src/casts/cast_possible_wrap.rs (clippy_lints/src/casts/cast_possible_wrap.rs)
  • Hotspot: clippy_lints/src/casts/needless_type_cast.rs (clippy_lints/src/casts/needless_type_cast.rs)
  • Hotspot: clippy_lints/src/casts/unnecessary_cast.rs (clippy_lints/src/casts/unnecessary_cast.rs)
  • Hotspot: clippy_lints/src/default.rs (clippy_lints/src/default.rs)
  • Hotspot: clippy_lints/src/default_numeric_fallback.rs (clippy_lints/src/default_numeric_fallback.rs)
  • Hotspot: clippy_lints/src/dereference.rs (clippy_lints/src/dereference.rs)
  • Hotspot: clippy_lints/src/doc/markdown.rs (clippy_lints/src/doc/markdown.rs)
  • Hotspot: clippy_lints/src/doc/mod.rs (clippy_lints/src/doc/mod.rs)
  • Hotspot: clippy_lints/src/doc/too_long_first_doc_paragraph.rs (clippy_lints/src/doc/too_long_first_doc_paragraph.rs)
  • Hotspot: clippy_lints/src/entry.rs (clippy_lints/src/entry.rs)
  • Hotspot: clippy_lints/src/eta_reduction.rs (clippy_lints/src/eta_reduction.rs)
  • Hotspot: clippy_lints/src/float_literal.rs (clippy_lints/src/float_literal.rs)
  • Hotspot: clippy_lints/src/floating_point_arithmetic/mul_add.rs (clippy_lints/src/floating_point_arithmetic/mul_add.rs)
  • Hotspot: clippy_lints/src/ifs/branches_sharing_code.rs (clippy_lints/src/ifs/branches_sharing_code.rs)
  • …and 89 more

New (20)

  • Dependency hygiene PARTLY measured — Cargo dependencies read, no committed lock to grade for currency
  • Duplicate equality checking logic with different entry points. SpanlessEq is a builder-pattern wrapper that eventually delegates to or exposes HirEqInterExpr methods. Users can call SpanlessEq.eq_expr or instantiate HirEqInterExpr and call eq_expr directly. The signatures are nearly identical, leading to confusion about which API to use.
  • Duplicate hashing logic. hir_utils.hash_expr is a free function that likely wraps SpanlessHash. SpanlessHash.hash_expr is the method on the struct. This creates two ways to achieve the same result with different signatures (one taking cx and e, the other requiring a builder instance).
  • Duplicated block (14 lines × 3) (clippy_lints/src/functions/must_use.rs)
  • FunctionTooLong: clippy_lints::needless_borrows_for_generic_args::needless_borrow_count (clippy_lints/src/needless_borrows_for_generic_args.rs)
  • Inverted test pyramid
  • Off the main sequence: clippy_utils
  • Off the main sequence: declare_clippy_lint
  • Off the main sequence: rustc_tools_util
  • Off-boarding risk: anonymized user #1
  • Overlapping functionality for dereferencing types. peel_and_count_ty_refs returns the peeled type, count, and mutability. peel_n_ty_refs takes a specific count n and returns the peeled type and mutability. While signatures differ, the intent is very similar, and peel_n_ty_refs could be implemented via peel_and_count_ty_refs. It is unclear why both are exposed publicly.
  • Repeated repair: clippy_lints/src/collection_is_never_read.rs (clippy_lints/src/collection_is_never_read.rs)
  • Repeated repair: clippy_lints/src/four_forward_slashes.rs (clippy_lints/src/four_forward_slashes.rs)
  • Repeated repair: clippy_lints/src/matches/match_str_case_mismatch.rs (clippy_lints/src/matches/match_str_case_mismatch.rs)
  • Repeated repair: clippy_lints/src/missing_fields_in_debug.rs (clippy_lints/src/missing_fields_in_debug.rs)
  • Repeated repair: clippy_lints/src/missing_inline.rs (clippy_lints/src/missing_inline.rs)
  • Split clippy_lints
  • TodoComment (clippy_lints/src/needless_borrows_for_generic_args.rs)
  • clippy_lints::floating_point_arithmetic::mul_add::check (cyclomatic 17) (clippy_lints/src/floating_point_arithmetic/mul_add.rs)
  • clippy_lints::matches::match_str_case_mismatch::verify_case (cognitive 18) (clippy_lints/src/matches/match_str_case_mismatch.rs)

Changes since last survey

  • 53 commits — 43 feature/other, 10 fixes

By area

  • (repo) — 26 commits
  • clippy_lints/src — 11 commits
  • tests/ui — 8 commits
  • clippy_utils/src — 6 commits
  • (root) — 1 commit
  • book/src — 1 commit

Notable commits

  • fix: Fix collapsible_match suggests wrongly for conditional compiled code (#16942)
  • fix: Fix tools
  • fix: Fix: match_str_case matching str inside or patterns (#17759)
  • fix: Fix: match_str_case not matching str in or pattern (|)
  • fix: Rollup merge of #162787 - chenyukang:yukang-fix-105520-format-captured-fields, r=estebank
  • fix: fix(while_let_loop): detect the pattern when the loop has a label
  • fix: fix(while_let_loop): detect the pattern when the loop has a label (#17614)
  • fix: fix: [collapsible_match] consuming/mutation checking (#16951)
  • fix: fix: const_trait_impl related infinite loop in needless_borrows_for_generic_args (#17731)
  • fix: fix: add guard checking.
  • change: Add must_use_without_reason lint
  • change: Add must_use_without_reason lint (#16592)
  • change: Add documentation for clippy_utils::mir (#17754)
  • change: Add documentation for clippy_utils::ty (#17761)
  • change: Add new try_from_instead_of_from_str lint
  • change: Add new try_from_instead_of_from_str lint (#17030)
  • change: Auto merge of #162853 - Zalathar:rollup-7nlu8K9, r=Zalathar
  • change: Bump nightly version -> 2026-09-17
  • change: Don't suggest Box::leak in nonnull_unchecked_on_box_ptr (#17752)
  • change: Don't suggest Box::leak in nonnull_unchecked_on_box_ptr as unleaking isn't well defined.
  • …and 33 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

rust-lang/rust-clippy was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit e81a99be8ecd125fd00c73cafa74d30df186fd18 — the exact code this score is about.
  • Scored under rubric-2026.09.17 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-70910855e4b4.