A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
This report presents the forensic synthetic code analysis of rust-lang/rust-clippy, a Rust project with 13,361 GitHub stars. SynthScan v2.0 examined 312,381 lines of code across 2630 source files, recording 1569 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 4.6 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1569 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | clippy_utils/src/consts.rs | 41 | Char(char), | COMMENT |
| LOW | clippy_utils/src/consts.rs | 1161 | 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 | 2461 | #[derive(Clone, Copy)] | COMMENT |
| LOW | clippy_utils/src/lib.rs | 2901 | /// ``` | COMMENT |
| LOW | clippy_utils/src/lib.rs | 3021 | fn visit_expr(&mut self, e: &'tcx Expr<'_>) { | COMMENT |
| LOW | clippy_utils/src/lib.rs | 3281 | /// Tries to produce a relative path from `from` to `to`; if such a path would contain more than | COMMENT |
| LOW | clippy_utils/src/lib.rs | 3581 | /// - 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 | 161 | pub static ONCE_CELL_SYNC_LAZY: PathLookup = type_path!(once_cell::sync::Lazy); | COMMENT |
| LOW | clippy_utils/src/res.rs | 341 | COMMENT | |
| LOW | clippy_utils/src/str_utils.rs | 61 | /// ```no_run | COMMENT |
| LOW | clippy_utils/src/str_utils.rs | 121 | } | COMMENT |
| LOW | clippy_utils/src/str_utils.rs | 181 | COMMENT | |
| LOW | clippy_utils/src/source.rs | 381 | } else { | COMMENT |
| LOW | clippy_utils/src/source.rs | 461 | true | COMMENT |
| LOW | clippy_utils/src/source.rs | 521 | } else { | COMMENT |
| LOW | clippy_utils/src/source.rs | 541 | /// // ^^^^^ ^^^^^^^^^^ | COMMENT |
| LOW | clippy_utils/src/source.rs | 601 | /// | COMMENT |
| LOW | clippy_utils/src/source.rs | 721 | /// context is from expanding a macro argument. | COMMENT |
| LOW | clippy_utils/src/sugg.rs | 21 | COMMENT | |
| LOW | clippy_utils/src/sugg.rs | 701 | /// | COMMENT |
| LOW | clippy_utils/src/sugg.rs | 721 | /// | COMMENT |
| LOW | clippy_utils/src/sugg.rs | 961 | } else { | COMMENT |
| LOW | clippy_utils/src/hir_utils.rs | 41 | Exact, | COMMENT |
| LOW | clippy_utils/src/hir_utils.rs | 1101 | /// Checks if two expressions evaluate to the same value, and don't contain any side effects. | COMMENT |
| LOW | clippy_utils/src/macros.rs | 161 | first_node_in_macro(cx, node) | COMMENT |
| LOW | clippy_utils/src/macros.rs | 261 | return false; | COMMENT |
| LOW | clippy_utils/src/ty/mod.rs | 481 | } | COMMENT |
| LOW | clippy_utils/src/ty/type_certainty/mod.rs | 1 | //! A heuristic to tell whether an expression's type can be determined purely from its | COMMENT |
| LOW | clippy_lints_internal/src/produce_ice.rs | 1 | use rustc_ast::ast::NodeId; | COMMENT |
| LOW | clippy_lints_internal/src/lint_without_lint_pass.rs | 21 | /// | COMMENT |
| LOW | clippy_lints_internal/src/lint_without_lint_pass.rs | 41 | Warn, | COMMENT |
| LOW | …ippy_lints_internal/src/repeated_is_diagnostic_item.rs | 21 | /// compare the output with all the `Symbol`s. | COMMENT |
| LOW | …ippy_lints_internal/src/repeated_is_diagnostic_item.rs | 41 | /// .. | COMMENT |
| LOW | …ippy_lints_internal/src/repeated_is_diagnostic_item.rs | 61 | /// if cx.tcx.is_diagnostic_item(sym::Result, did) { | 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 | /// These usages of `span_lint_and_then` should be replaced with one of the | COMMENT |
| LOW | …ippy_lints_internal/src/collapsible_span_lint_calls.rs | 41 | /// }); | COMMENT |
| LOW | clippy_lints_internal/src/unnecessary_def_path.rs | 21 | /// ### Example | COMMENT |
| LOW | clippy_lints_internal/src/symbols.rs | 21 | /// | COMMENT |
| LOW | clippy_lints_internal/src/symbols.rs | 41 | /// ### Why is this bad? | COMMENT |
| LOW | tests/no-profile-in-cargo-toml.rs | 1 | // Check that we do not have `profile.*` sections in our `Cargo.toml` files, | COMMENT |
| LOW | tests/integration.rs | 1 | //! This test is meant to only be run in CI. To run it locally use: | COMMENT |
| 1468 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 | 3653 | /// let s = "Lorem ipsum"; | COMMENT |
| LOW | clippy_lints/src/methods/mod.rs | 3658 | /// 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 | 197 | // TODO: Is there a cleaner, robust way to ask this question? | COMMENT |
| MEDIUM | clippy_lints/src/operators/mod.rs | 498 | /// technically unnecessary. However, it will make the code more robust and doesn't have any | COMMENT |
| MEDIUM | src/driver.rs | 162 | // is there already. Certainly it can't hurt. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/clippy_mq.yml | 214 | # 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 | 83 | # 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 |
|---|---|---|---|---|
| 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_pr.yml | 21 | # NOTE: If you modify this job, make sure you copy the changes to clippy_mq.yml | 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 | 457 | // Normalized as we need to check if this is an array later. | COMMENT |
| LOW | clippy_lints/src/non_copy_const.rs | 500 | // Normalized as we need to check if this is an array later. | COMMENT |
| LOW | clippy_lints/src/non_copy_const.rs | 639 | // Normalized as we need to check if this is an array later. | COMMENT |