Repository Analysis

rust-lang/rust-clippy

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

4.6 Likely human-written View on GitHub

Analysis Overview

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).

4.6
Adjusted Score
4.6
Raw Score
100%
Time Factor
2026-07-13
Last Push
13.4K
Stars
Rust
Language
312.4K
Lines of Code
2.6K
Files
1.6K
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 0MEDIUM 5LOW 1564

Directory Score Breakdown

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.

Pattern Findings

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.

Over-Commented Block1528 hits · 1358 pts
SeverityFileLineSnippetContext
LOWclippy_utils/src/consts.rs41 Char(char),COMMENT
LOWclippy_utils/src/consts.rs1161COMMENT
LOWclippy_utils/src/diagnostics.rs81///COMMENT
LOWclippy_utils/src/diagnostics.rs101/// |COMMENT
LOWclippy_utils/src/diagnostics.rs121/// For the `span_lint_and_help` function, the node that was passed into the `LintPass::check_*`COMMENT
LOWclippy_utils/src/diagnostics.rs161COMMENT
LOWclippy_utils/src/diagnostics.rs181/// If it doesn't, you likely need to use [`span_lint_hir_and_then`] instead.COMMENT
LOWclippy_utils/src/diagnostics.rs221///COMMENT
LOWclippy_utils/src/diagnostics.rs261 f(diag);COMMENT
LOWclippy_utils/src/diagnostics.rs281///COMMENT
LOWclippy_utils/src/diagnostics.rs301/// This is in contrast to [`span_lint_and_then`], which always emits the lint at the node that wasCOMMENT
LOWclippy_utils/src/diagnostics.rs341COMMENT
LOWclippy_utils/src/diagnostics.rs361/// If you're emitting the lint at the span of a different node than the one provided by theCOMMENT
LOWclippy_utils/src/lib.rs141 let sess = rustc_lint::LintContext::sess(cx);COMMENT
LOWclippy_utils/src/lib.rs441COMMENT
LOWclippy_utils/src/lib.rs721/// Checks if the top level expression can be moved into a closure as is.COMMENT
LOWclippy_utils/src/lib.rs741/// ```COMMENT
LOWclippy_utils/src/lib.rs1381COMMENT
LOWclippy_utils/src/lib.rs2461#[derive(Clone, Copy)]COMMENT
LOWclippy_utils/src/lib.rs2901/// ```COMMENT
LOWclippy_utils/src/lib.rs3021 fn visit_expr(&mut self, e: &'tcx Expr<'_>) {COMMENT
LOWclippy_utils/src/lib.rs3281/// Tries to produce a relative path from `from` to `to`; if such a path would contain more thanCOMMENT
LOWclippy_utils/src/lib.rs3581/// - then or else part of a `if` in return positionCOMMENT
LOWclippy_utils/src/check_proc_macro.rs1//! This module handles checking if the span given is from a proc-macro or not.COMMENT
LOWclippy_utils/src/paths.rs161pub static ONCE_CELL_SYNC_LAZY: PathLookup = type_path!(once_cell::sync::Lazy);COMMENT
LOWclippy_utils/src/res.rs341COMMENT
LOWclippy_utils/src/str_utils.rs61/// ```no_runCOMMENT
LOWclippy_utils/src/str_utils.rs121}COMMENT
LOWclippy_utils/src/str_utils.rs181COMMENT
LOWclippy_utils/src/source.rs381 } else {COMMENT
LOWclippy_utils/src/source.rs461 trueCOMMENT
LOWclippy_utils/src/source.rs521 } else {COMMENT
LOWclippy_utils/src/source.rs541/// // ^^^^^ ^^^^^^^^^^COMMENT
LOWclippy_utils/src/source.rs601///COMMENT
LOWclippy_utils/src/source.rs721/// context is from expanding a macro argument.COMMENT
LOWclippy_utils/src/sugg.rs21COMMENT
LOWclippy_utils/src/sugg.rs701 ///COMMENT
LOWclippy_utils/src/sugg.rs721 ///COMMENT
LOWclippy_utils/src/sugg.rs961 } else {COMMENT
LOWclippy_utils/src/hir_utils.rs41 Exact,COMMENT
LOWclippy_utils/src/hir_utils.rs1101/// Checks if two expressions evaluate to the same value, and don't contain any side effects.COMMENT
LOWclippy_utils/src/macros.rs161 first_node_in_macro(cx, node)COMMENT
LOWclippy_utils/src/macros.rs261 return false;COMMENT
LOWclippy_utils/src/ty/mod.rs481}COMMENT
LOWclippy_utils/src/ty/type_certainty/mod.rs1//! A heuristic to tell whether an expression's type can be determined purely from itsCOMMENT
LOWclippy_lints_internal/src/produce_ice.rs1use rustc_ast::ast::NodeId;COMMENT
LOWclippy_lints_internal/src/lint_without_lint_pass.rs21 ///COMMENT
LOWclippy_lints_internal/src/lint_without_lint_pass.rs41 Warn,COMMENT
LOW…ippy_lints_internal/src/repeated_is_diagnostic_item.rs21 /// compare the output with all the `Symbol`s.COMMENT
LOW…ippy_lints_internal/src/repeated_is_diagnostic_item.rs41 /// ..COMMENT
LOW…ippy_lints_internal/src/repeated_is_diagnostic_item.rs61 /// if cx.tcx.is_diagnostic_item(sym::Result, did) {COMMENT
LOW…ippy_lints_internal/src/repeated_is_diagnostic_item.rs81 /// }COMMENT
LOW…ippy_lints_internal/src/repeated_is_diagnostic_item.rs101 /// ..COMMENT
LOW…ippy_lints_internal/src/collapsible_span_lint_calls.rs21 /// These usages of `span_lint_and_then` should be replaced with one of theCOMMENT
LOW…ippy_lints_internal/src/collapsible_span_lint_calls.rs41 /// });COMMENT
LOWclippy_lints_internal/src/unnecessary_def_path.rs21 /// ### ExampleCOMMENT
LOWclippy_lints_internal/src/symbols.rs21 ///COMMENT
LOWclippy_lints_internal/src/symbols.rs41 /// ### Why is this bad?COMMENT
LOWtests/no-profile-in-cargo-toml.rs1// Check that we do not have `profile.*` sections in our `Cargo.toml` files,COMMENT
LOWtests/integration.rs1//! This test is meant to only be run in CI. To run it locally use:COMMENT
1468 more matches not shown…
Fake / Example Data23 hits · 42 pts
SeverityFileLineSnippetContext
LOWtests/ui/sliced_string_as_bytes.rs24 let s = "Lorem ipsum";CODE
LOWtests/ui/sliced_string_as_bytes.rs25 let string: String = "dolor sit amet".to_owned();CODE
LOWtests/ui/too_long_first_doc_paragraph.rs16/// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, laciniaCOMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs16/// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, laciniaCOMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs23/// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, laciniaCOMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs23/// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, laciniaCOMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs29/// Lorem ipsum dolor sit amet, consectetur adipiscing elit.COMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs29/// Lorem ipsum dolor sit amet, consectetur adipiscing elit.COMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs40/// ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, laciniaCOMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs50/// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, laciniaCOMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs50/// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, laciniaCOMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs59/// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, laciniaCOMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs59/// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, laciniaCOMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs65/// Some function. This doc-string paragraph is too long. Lorem Ipsum is simply dummy text of the printing and typesettiCOMMENT
LOWtests/ui/too_long_first_doc_paragraph.rs77/// Some function. This doc-string paragraph is too long. Lorem Ipsum is simply dummy text of the printing and typesettiCOMMENT
LOW…documented_unsafe_blocks/undocumented_unsafe_blocks.rs119 // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temporCOMMENT
LOW…documented_unsafe_blocks/undocumented_unsafe_blocks.rs119 // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temporCOMMENT
LOW…documented_unsafe_blocks/undocumented_unsafe_blocks.rs538 // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temporCOMMENT
LOW…documented_unsafe_blocks/undocumented_unsafe_blocks.rs538 // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temporCOMMENT
LOWtests/ui-toml/large_include_file/too_big.txt1Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqCODE
LOWtests/ui-toml/large_include_file/too_big.txt1Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqCODE
LOWclippy_lints/src/methods/mod.rs3653 /// let s = "Lorem ipsum";COMMENT
LOWclippy_lints/src/methods/mod.rs3658 /// let s = "Lorem ipsum";COMMENT
AI Slop Vocabulary4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMclippy_lints/src/same_length_and_capacity.rs65 /// // This time, leverage the previously saved capacity:COMMENT
MEDIUMclippy_lints/src/large_stack_frames.rs197 // TODO: Is there a cleaner, robust way to ask this question?COMMENT
MEDIUMclippy_lints/src/operators/mod.rs498 /// technically unnecessary. However, it will make the code more robust and doesn't have anyCOMMENT
MEDIUMsrc/driver.rs162 // is there already. Certainly it can't hurt.COMMENT
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOW.github/workflows/clippy_mq.yml214 # Check if all jobs that we depend on (in the needs array) were successful.COMMENT
LOW.github/workflows/clippy_dev.yml60 # Check if all jobs that we depend on (in the needs array) were successful.COMMENT
LOW.github/workflows/clippy_pr.yml83 # Check if all jobs that we depend on (in the needs array) were successful.COMMENT
LOW.github/workflows/clippy_changelog.yml50 # Check if all jobs that we depend on (in the needs array) were successful.COMMENT
LOW.github/workflows/remark.yml66 # Check if all jobs that we depend on (in the needs array) were successful.COMMENT
Slop Phrases3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMlintcheck/lintcheck_crates.toml6# For testing you can also add sources to git and local repos like this:COMMENT
LOW.github/workflows/clippy_mq.yml33 # NOTE: If you modify this job, make sure you copy the changes to clippy.ymlCOMMENT
LOW.github/workflows/clippy_pr.yml21 # NOTE: If you modify this job, make sure you copy the changes to clippy_mq.ymlCOMMENT
Structural Annotation Overuse3 hits · 4 pts
SeverityFileLineSnippetContext
LOWREADME.md61#### Step 1: Install RustupCOMMENT
LOWREADME.md73#### Step 2: Install ClippyCOMMENT
LOWREADME.md83#### Step 3: Run ClippyCOMMENT
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippetContext
LOWclippy_lints/src/non_copy_const.rs457 // Normalized as we need to check if this is an array later.COMMENT
LOWclippy_lints/src/non_copy_const.rs500 // Normalized as we need to check if this is an array later.COMMENT
LOWclippy_lints/src/non_copy_const.rs639 // Normalized as we need to check if this is an array later.COMMENT