A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
This report summarizes scanner evidence for rust-lang/rust-clippy, a Rust project with 13,573 GitHub stars. SynthScan examined 321,486 lines of code across 2683 source files, recording 1622 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 4.6 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 1599 finding(s).
Are imports declared and package/API names verified? 23 finding(s).
Are wrappers, guards, and repeated structures necessary? 0 finding(s).
Which changes need focused human review? 1622 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 1622 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | clippy_utils/src/consts.rs | 41 | /// A single `char` (e.g., `'a'`). | COMMENT |
| LOW | clippy_utils/src/diagnostics.rs | 81 | /// | COMMENT |
| LOW | clippy_utils/src/diagnostics.rs | 101 | /// | | COMMENT |
| LOW | clippy_utils/src/diagnostics.rs | 121 | /// For the `span_lint_and_help` function, the node that was passed into the `LintPass::check_*` | COMMENT |
| LOW | clippy_utils/src/diagnostics.rs | 161 | COMMENT | |
| LOW | clippy_utils/src/diagnostics.rs | 181 | /// If it doesn't, you likely need to use [`span_lint_hir_and_then`] instead. | COMMENT |
| LOW | clippy_utils/src/diagnostics.rs | 221 | /// | COMMENT |
| LOW | clippy_utils/src/diagnostics.rs | 261 | f(diag); | COMMENT |
| LOW | clippy_utils/src/diagnostics.rs | 281 | /// | COMMENT |
| LOW | clippy_utils/src/diagnostics.rs | 301 | /// This is in contrast to [`span_lint_and_then`], which always emits the lint at the node that was | COMMENT |
| LOW | clippy_utils/src/diagnostics.rs | 341 | COMMENT | |
| LOW | clippy_utils/src/diagnostics.rs | 361 | /// If you're emitting the lint at the span of a different node than the one provided by the | COMMENT |
| LOW | clippy_utils/src/lib.rs | 141 | let sess = rustc_lint::LintContext::sess(cx); | COMMENT |
| LOW | clippy_utils/src/lib.rs | 441 | COMMENT | |
| LOW | clippy_utils/src/lib.rs | 721 | /// Checks if the top level expression can be moved into a closure as is. | COMMENT |
| LOW | clippy_utils/src/lib.rs | 741 | /// ``` | COMMENT |
| LOW | clippy_utils/src/lib.rs | 1381 | COMMENT | |
| LOW | clippy_utils/src/lib.rs | 1801 | } | COMMENT |
| LOW | clippy_utils/src/lib.rs | 1901 | /// * `x` is the identity representation of `x` | COMMENT |
| LOW | clippy_utils/src/lib.rs | 2081 | /// For example, `f` in | COMMENT |
| LOW | clippy_utils/src/lib.rs | 2481 | COMMENT | |
| LOW | clippy_utils/src/lib.rs | 2921 | COMMENT | |
| LOW | clippy_utils/src/lib.rs | 3041 | self.break_targets.push(BreakTarget { id, unused: true }); | COMMENT |
| LOW | clippy_utils/src/lib.rs | 3301 | let caller_path = tcx.def_path(from.to_def_id()); | COMMENT |
| LOW | clippy_utils/src/lib.rs | 3341 | // consider: | COMMENT |
| LOW | clippy_utils/src/lib.rs | 3621 | /// - then or else part of a `if` in return position | COMMENT |
| LOW | clippy_utils/src/check_proc_macro.rs | 1 | //! This module handles checking if the span given is from a proc-macro or not. | COMMENT |
| LOW | clippy_utils/src/paths.rs | 21 | COMMENT | |
| LOW | clippy_utils/src/res.rs | 261 | COMMENT | |
| LOW | clippy_utils/src/res.rs | 341 | } | COMMENT |
| LOW | clippy_utils/src/str_utils.rs | 1 | //! Utilities for analyzing and transforming strings. | COMMENT |
| LOW | clippy_utils/src/str_utils.rs | 21 | pub byte_index: usize, | COMMENT |
| LOW | clippy_utils/src/str_utils.rs | 81 | /// assert_eq!(camel_case_start("ABCD"), StrIndex::new(4, 4)); | COMMENT |
| LOW | clippy_utils/src/str_utils.rs | 141 | /// ```no_run | COMMENT |
| LOW | clippy_utils/src/str_utils.rs | 201 | } | COMMENT |
| LOW | clippy_utils/src/source.rs | 161 | } | COMMENT |
| LOW | clippy_utils/src/source.rs | 421 | /// Extends the span to the beginning of the spans line, incl. whitespaces. | COMMENT |
| LOW | clippy_utils/src/source.rs | 461 | // expansion and we want to ignore those, because they could come from external | COMMENT |
| LOW | clippy_utils/src/source.rs | 541 | /// This is useful if you want to provide suggestions for your lint or more generally, if you want | COMMENT |
| LOW | clippy_utils/src/source.rs | 601 | } | COMMENT |
| LOW | clippy_utils/src/source.rs | 621 | /// y; | COMMENT |
| LOW | clippy_utils/src/source.rs | 721 | snippet_with_applicability_sm(sm, span, default, applicability), | COMMENT |
| LOW | clippy_utils/src/source.rs | 741 | /// containing `0` as the context is the same as the outer context. | COMMENT |
| LOW | clippy_utils/src/sugg.rs | 21 | COMMENT | |
| LOW | clippy_utils/src/sugg.rs | 581 | /// operators have the same precedence. | COMMENT |
| LOW | clippy_utils/src/sugg.rs | 721 | /// | COMMENT |
| LOW | clippy_utils/src/sugg.rs | 961 | let _: fmt::Result = write!(self.suggestion_start, "{start_snip}&{ident_str}"); | COMMENT |
| LOW | clippy_utils/src/hir_utils.rs | 41 | Exact, | COMMENT |
| LOW | clippy_utils/src/macros.rs | 161 | /// macro call, as in [`first_node_in_macro`]. | COMMENT |
| LOW | clippy_utils/src/macros.rs | 181 | /// with the `ExpnId` of the containing block. | COMMENT |
| LOW | clippy_utils/src/macros.rs | 261 | /// Is `def_id` of `assert!` or `debug_assert!` | COMMENT |
| LOW | clippy_lints_internal/src/lint_without_lint_pass.rs | 21 | /// The compiler only knows lints via a `LintPass`. Without | COMMENT |
| LOW | clippy_lints_internal/src/lint_without_lint_pass.rs | 41 | report_in_external_macro: true | COMMENT |
| LOW | …ippy_lints_internal/src/repeated_is_diagnostic_item.rs | 21 | /// | COMMENT |
| LOW | …ippy_lints_internal/src/repeated_is_diagnostic_item.rs | 41 | /// } else if cx.tcx.is_diagnostic_item(sym::Result, did) { | COMMENT |
| LOW | …ippy_lints_internal/src/repeated_is_diagnostic_item.rs | 61 | /// .. | COMMENT |
| LOW | …ippy_lints_internal/src/repeated_is_diagnostic_item.rs | 81 | /// | COMMENT |
| LOW | …ippy_lints_internal/src/repeated_is_diagnostic_item.rs | 101 | /// } | COMMENT |
| LOW | …ippy_lints_internal/src/collapsible_span_lint_calls.rs | 21 | /// wrapper functions `span_lint_and_sugg`, `span_lint_and_help`, or | COMMENT |
| LOW | …ippy_lints_internal/src/collapsible_span_lint_calls.rs | 41 | /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |diag| { | COMMENT |
| 1519 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/ui/sliced_string_as_bytes.rs | 24 | let s = "Lorem ipsum"; | CODE |
| LOW | tests/ui/sliced_string_as_bytes.rs | 25 | let string: String = "dolor sit amet".to_owned(); | CODE |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 16 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, lacinia | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 16 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, lacinia | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 23 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, lacinia | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 23 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, lacinia | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 29 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 29 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 40 | /// ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, lacinia | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 50 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, lacinia | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 50 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, lacinia | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 59 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, lacinia | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 59 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, lacinia | COMMENT |
| LOW⚡ | tests/ui/too_long_first_doc_paragraph.rs | 65 | /// Some function. This doc-string paragraph is too long. Lorem Ipsum is simply dummy text of the printing and typesetti | COMMENT |
| LOW | tests/ui/too_long_first_doc_paragraph.rs | 77 | /// Some function. This doc-string paragraph is too long. Lorem Ipsum is simply dummy text of the printing and typesetti | COMMENT |
| LOW | …documented_unsafe_blocks/undocumented_unsafe_blocks.rs | 119 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor | COMMENT |
| LOW | …documented_unsafe_blocks/undocumented_unsafe_blocks.rs | 119 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor | COMMENT |
| LOW | …documented_unsafe_blocks/undocumented_unsafe_blocks.rs | 538 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor | COMMENT |
| LOW | …documented_unsafe_blocks/undocumented_unsafe_blocks.rs | 538 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor | COMMENT |
| LOW | tests/ui-toml/large_include_file/too_big.txt | 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq | CODE |
| LOW | tests/ui-toml/large_include_file/too_big.txt | 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq | CODE |
| LOW | clippy_lints/src/methods/mod.rs | 3738 | /// let s = "Lorem ipsum"; | COMMENT |
| LOW | clippy_lints/src/methods/mod.rs | 3743 | /// let s = "Lorem ipsum"; | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | clippy_lints/src/same_length_and_capacity.rs | 65 | /// // This time, leverage the previously saved capacity: | COMMENT |
| MEDIUM | clippy_lints/src/large_stack_frames.rs | 196 | // TODO: Is there a cleaner, robust way to ask this question? | COMMENT |
| MEDIUM | clippy_lints/src/operators/mod.rs | 497 | /// technically unnecessary. However, it will make the code more robust and doesn't have any | COMMENT |
| MEDIUM | src/driver.rs | 156 | // is there already. Certainly it can't hurt. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | lintcheck/lintcheck_crates.toml | 6 | # For testing you can also add sources to git and local repos like this: | COMMENT |
| LOW | .github/workflows/clippy_mq.yml | 33 | # NOTE: If you modify this job, make sure you copy the changes to clippy.yml | COMMENT |
| LOW | .github/workflows/clippy_mq.yml | 198 | # NOTE: If you modify this job, make sure you copy the changes to clippy_pr.yml | COMMENT |
| LOW | .github/workflows/clippy_pr.yml | 21 | # NOTE: If you modify this job, make sure you copy the changes to clippy_mq.yml | COMMENT |
| LOW | .github/workflows/clippy_pr.yml | 66 | # NOTE: If you modify this job, make sure you copy the changes to clippy_mq.yml | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/clippy_mq.yml | 265 | # Check if all jobs that we depend on (in the needs array) were successful. | COMMENT |
| LOW | .github/workflows/clippy_dev.yml | 60 | # Check if all jobs that we depend on (in the needs array) were successful. | COMMENT |
| LOW | .github/workflows/clippy_pr.yml | 135 | # Check if all jobs that we depend on (in the needs array) were successful. | COMMENT |
| LOW | .github/workflows/clippy_changelog.yml | 50 | # Check if all jobs that we depend on (in the needs array) were successful. | COMMENT |
| LOW | .github/workflows/remark.yml | 66 | # Check if all jobs that we depend on (in the needs array) were successful. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README.md | 61 | #### Step 1: Install Rustup | COMMENT |
| LOW | README.md | 73 | #### Step 2: Install Clippy | COMMENT |
| LOW | README.md | 83 | #### Step 3: Run Clippy | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | clippy_lints/src/non_copy_const.rs | 455 | // Normalized as we need to check if this is an array later. | COMMENT |
| LOW | clippy_lints/src/non_copy_const.rs | 498 | // Normalized as we need to check if this is an array later. | COMMENT |
| LOW | clippy_lints/src/non_copy_const.rs | 637 | // Normalized as we need to check if this is an array later. | COMMENT |