Public report of rust-lang/rust-clippy, published 27 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 27 October 2026, 01:56 UTC · Survey ID cd_bb4db3ca0ae04a9ab214d09f778dfebd

rust-lang/rust-clippy

Measured 27 October 2026, 01:49 UTC, at code version b5cede0

No regression since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 67out of 100 Strong
CriticalWeakAdequateStrongExemplary
Up 3 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 154,987 lines of product code in 10 projects, tests not counted · Estimated rebuild effort: about 2.2 person-years · Weakest lens: Production Readiness, 60

Findings by how serious they are

32 critical 927 serious 27 minor

13 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
27 October 2026, 01:49 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

57of 57 dimensions measured by tools.
969of 986 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
57dimensions across 5 lenses, read from 154,987 lines of product code in 10 projects.
Chapters

Executive summary

rust-lang/rust-clippy meets our standard for a preview release. It scores 67 out of 100 and is rated Strong, and all 32 of its critical findings are security problems in the build pipeline.

Production Readiness, at 60, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 6 points. Adopting a logging library would lift Production Readiness itself, worth about 5 points.

Thirty-one pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One secret can leak from the build pipeline. Pinning each tool to an exact version and limiting the secret to its own step would close both risks.

The product code is 154,987 lines, about €320,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 60 · counts for 47%Maturity 62 · counts for 26%Security and Compliance 77 · counts for 14%Code Health 85 · counts for 8%Architecture 96 · counts for 4%

If Production Readiness rose from 60 to 62, the lowest score rated Strong, the score would rise from 67 to about 67.

Code composition: what the lines of code are
Product code 58%Tests 42%
New since the last survey: 42 findings

These 42 critical or serious findings weren't in the previous survey, on 13 October 2026.

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 23 findings

These 23 critical or serious findings were in the previous survey, on 13 October 2026, and are gone from this one.

  • Cyclomatic Complexity · clippy_utils::eager_or_lazy::expr_eagerness (cyclomatic 36) clippy_utils/src/eager_or_lazy.rs
  • Cyclomatic Complexity · clippy_lints::no_effect::has_no_effect (cyclomatic 16) clippy_lints/src/no_effect.rs
  • Cognitive Complexity · clippy_utils::eager_or_lazy::expr_eagerness (cognitive 24) clippy_utils/src/eager_or_lazy.rs
  • Cognitive Complexity · DisallowedFields::check_pat (cognitive 22) clippy_lints/src/disallowed_fields.rs
  • Cognitive Complexity · clippy_lints::no_effect::has_no_effect (cognitive 17) clippy_lints/src/no_effect.rs
  • Cognitive Complexity · UnconditionalRecursion::init_default_impl_for_type_if_needed (cognitive 16) clippy_lints/src/unconditional_recursion.rs
  • God Classes · FunctionTooLong: clippy_utils::eager_or_lazy::expr_eagerness clippy_utils/src/eager_or_lazy.rs
  • Code Duplication · Duplicated block (17 lines × 2) clippy_lints/src/disallowed_fields.rs
  • Code Duplication · Duplicated block (17 lines × 2) clippy_lints/src/manual_pop_if.rs
  • Churn × Complexity Hotspots · Hotspot: clippy_lints/src/methods/unnecessary_map_or.rs clippy_lints/src/methods/unnecessary_map_or.rs
  • Churn × Complexity Hotspots · Hotspot: clippy_lints/src/functions/too_many_lines.rs clippy_lints/src/functions/too_many_lines.rs
  • Churn × Complexity Hotspots · Repeated repair: clippy_lints/src/assert_is_empty.rs clippy_lints/src/assert_is_empty.rs
  • Churn × Complexity Hotspots · Repeated repair: clippy_lints/src/matches/match_str_case_mismatch.rs clippy_lints/src/matches/match_str_case_mismatch.rs
  • Churn × Complexity Hotspots · Repeated repair: clippy_lints/src/four_forward_slashes.rs clippy_lints/src/four_forward_slashes.rs
  • Churn × Complexity Hotspots · Repeated repair: clippy_lints/src/from_str_radix_10.rs clippy_lints/src/from_str_radix_10.rs
  • Explicit Debt · TodoComment clippy_lints/src/nonstandard_macro_braces.rs
  • Explicit Debt · TodoComment clippy_lints/src/returns/let_and_return.rs
  • Explicit Debt · TodoComment clippy_utils/src/eager_or_lazy.rs
  • Change Coupling · Change coupling: disallowed_methods.rs ↔ disallowed_types.rs clippy_lints/src/disallowed_methods.rs
  • Change Coupling · Change coupling: arithmetic_side_effects.rs ↔ numeric_arithmetic.rs clippy_lints/src/operators/arithmetic_side_effects.rs
  • Change Coupling · Change coupling: disallowed_macros.rs ↔ disallowed_methods.rs clippy_lints/src/disallowed_macros.rs
  • Supply-chain Provenance & Signing REDACTED
  • Supply-chain Provenance & Signing REDACTED
Rebuild cost: about €320,000 · Estimate
Cost to rebuild€110,000 to €540,000, for 1,790 to 5,679 hours of work, about 2.2 person-years for 1 to 5 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.9 at a score of 67. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 154,987 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 6 points · Low effort · ADR Quality
2
Record your significant design decisions.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Raises the score by about 6 points · Medium effort · Architecture documentation
3
Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run.
Raises the score by about 5 points · Medium effort · Observability

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €320,000 to build again, about 2.2 person-years of work. Its weakest lens is Production Readiness, at 60 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.3 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 73,931 lines over the last 90 days, which is about 299,831 lines a year. At that pace, the extra work comes to an estimated 31.6 to 189.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch clippy clippy clippy_config clippy_config clippy->clippy_config clippy_lints clippy_lints clippy->clippy_lints clippy_lints_internal clippy_lints_internal clippy->clippy_lints_internal clippy_utils clippy_utils clippy->clippy_utils declare_clippy_lint declare_clippy_lint clippy->declare_clippy_lint rustc_tools_util rustc_tools_util clippy->rustc_tools_util clippy-dev clippy-dev clippy_config->clippy_utils clippy_dummy clippy_dummy clippy_lints->clippy_config clippy_lints->clippy_utils clippy_lints->declare_clippy_lint clippy_lints_internal->clippy_utils lintcheck lintcheck

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

750 modules, with 749 dependencies between them. 4 loops run through 16 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 710 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 clippy_lints.default2 clippy_utils.consts3 clippy_utils.msrvs4 clippy_utils.ty5 lintcheck6 clippy_dev.diag7 clippy_lints.format_args8 clippy_utils.source9 clippy_dev.parse.cursor10 clippy_utils.higher11 clippy_dev.utils12 clippy_config.de13 clippy_dev.new_lint14 clippy_lints.doc15 clippy_utils.macros16 clippy_utils.sugg17 clippy_config.types18 clippy_dev.parse19 clippy_lints.matches.manual_utils20 clippy_lints.methods21 clippy_lints.utils.format_args_collector22 clippy_lints.manual_float_methods23 clippy_lints.ranges24 clippy_lints.empty_with_brackets25 clippy_lints.only_used_in_recursion26 clippy_lints.booleans27 clippy_lints.cognitive_complexity28 clippy_lints.unwrap29 clippy_utils30 clippy_utils.check_proc_macro31 clippy_lints.matches.redundant_pattern_match32 clippy_lints.unnested_or_patterns33 clippy_lints.attrs34 clippy_lints.dereference35 clippy_lints.derive.unsafe_derive_deserialize36 clippy_lints.disallowed_macros37 clippy_lints.functions38 clippy_lints.non_expressive_names39 clippy_lints.use_self40 clippy_utils.ast_utils
1 clippy_lints.default
2 clippy_utils.consts
3 clippy_utils.msrvs
4 clippy_utils.ty
5 lintcheck
6 clippy_dev.diag12
7 clippy_lints.format_args23
8 clippy_utils.source43
9 clippy_dev.parse.cursor15
10 clippy_utils.higher235
11 clippy_dev.utils22
12 clippy_config.de11
13 clippy_dev.new_lint2
14 clippy_lints.doc122
15 clippy_utils.macros23
16 clippy_utils.sugg3
17 clippy_config.types146
18 clippy_dev.parse2191
19 clippy_lints.matches.manual_utils11
20 clippy_lints.methods211
21 clippy_lints.utils.format_args_collector1111
22 clippy_lints.manual_float_methods11111
23 clippy_lints.ranges11121
24 clippy_lints.empty_with_brackets2211
25 clippy_lints.only_used_in_recursion11
26 clippy_lints.booleans421
27 clippy_lints.cognitive_complexity11
28 clippy_lints.unwrap211
29 clippy_utils11111
30 clippy_utils.check_proc_macro1331111
31 clippy_lints.matches.redundant_pattern_match12111
32 clippy_lints.unnested_or_patterns1111
33 clippy_lints.attrs312
34 clippy_lints.dereference1112
35 clippy_lints.derive.unsafe_derive_deserialize111
36 clippy_lints.disallowed_macros111
37 clippy_lints.functions1111
38 clippy_lints.non_expressive_names1112
39 clippy_lints.use_self1121
40 clippy_utils.ast_utils1111
Uses a module listed above itPart of a loopThe module itself
1 clippy_lints.default2 clippy_utils.consts3 clippy_utils.msrvs4 clippy_utils.ty5 lintcheck6 clippy_dev.diag7 clippy_lints.format_args8 clippy_utils.source9 clippy_dev.parse.cursor10 clippy_utils.higher11 clippy_dev.utils12 clippy_config.de13 clippy_dev.new_lint14 clippy_lints.doc15 clippy_utils.macros16 clippy_utils.sugg17 clippy_config.types18 clippy_dev.parse19 clippy_lints.matches.manual_utils20 clippy_lints.methods21 clippy_lints.utils.format_args_collector22 clippy_lints.manual_float_methods23 clippy_lints.ranges24 clippy_lints.empty_with_brackets25 clippy_lints.only_used_in_recursion26 clippy_lints.booleans27 clippy_lints.cognitive_complexity28 clippy_lints.unwrap29 clippy_utils30 clippy_utils.check_proc_macro31 clippy_lints.matches.redundant_pattern_match32 clippy_lints.unnested_or_patterns33 clippy_lints.attrs34 clippy_lints.dereference35 clippy_lints.derive.unsafe_derive_deserialize36 clippy_lints.disallowed_macros37 clippy_lints.functions38 clippy_lints.non_expressive_names39 clippy_lints.use_self40 clippy_utils.ast_utilsclippy_lints.default1clippy_utils.consts2clippy_utils.msrvs3clippy_utils.ty4lintcheck5clippy_dev.diag6clippy_lints.format_args7clippy_utils.source8clippy_dev.parse.cursor9clippy_utils.higher10clippy_dev.utils11clippy_config.de12clippy_dev.new_lint13clippy_lints.doc14clippy_utils.macros15clippy_utils.sugg16clippy_config.types17clippy_dev.parse18clippy_lints.matches.manual_utils19clippy_lints.methods20clippy_lints.utils.format_args_collector21clippy_lints.manual_float_methods22clippy_lints.ranges23clippy_lints.empty_with_brackets24clippy_lints.only_used_in_recursion25clippy_lints.booleans26clippy_lints.cognitive_complexity27clippy_lints.unwrap28clippy_utils29clippy_utils.check_proc_macro30clippy_lints.matches.redundant_pattern_match31clippy_lints.unnested_or_patterns32clippy_lints.attrs33clippy_lints.dereference34clippy_lints.derive.unsafe_derive_deserialize35clippy_lints.disallowed_macros36clippy_lints.functions37clippy_lints.non_expressive_names38clippy_lints.use_self39clippy_utils.ast_utils401223431523522112122233146219111211111111111111212211114211121111111133111112111111131211121111111111111211211111+710 more modules (most-connected shown)

At a glance — Code Health · 85% · Adequate · gated by D1, D2 ·

At a glance — Architecture · 96% · Exemplary ·

At a glance — Maturity · 62% · Adequate · gated by M2 ·

At a glance — Readiness · 60% · Adequate · gated by P2 ·

At a glance — Security · 77% · Adequate · gated by D36 ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection32High / Critical
A03:2025 — Software Supply Chain Failures13Medium

Roadmap

Begin by addressing the missing Architecture Decision Records to properly document significant design choices and their consequences. Next, enhance system observability by adopting structured tracing in your binaries and add a high-level architecture overview to the root README. Finally, secure the supply chain by resolving the five workflow permission findings, starting with the clippy-related files.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.+6.0 ptsLowADR Quality
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+5.6 ptsMediumArchitecture documentation
Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run.+4.7 ptsMediumObservability
Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED.+1.1 ptsLowSupply-chain Provenance & Signing
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.+1.2 ptsMediumDocumentation (README)
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.+0.6 ptsLowStatic Analysis (SAST)
Resolve the 1 Inverted test pyramid finding(s) in Test Distribution.+0.4 ptsLowTest Distribution
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED.+0.2 ptsLowSupply-chain Provenance & Signing

File quality

Per-file score 0–10 — a quality signature. Of 357 files carrying findings, judged against the Preview bar: 1% slop · 19% mixed · 80% near-clean.

FileScoreBandWorst signal
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
clippy_utils/src/consts.rs6.0MixedExplicit Debt: FixmeComment
clippy_utils/src/hir_utils.rs6.0MixedExplicit Debt: FixmeComment
clippy_lints/src/dereference.rs6.0MixedExplicit Debt: FixmeComment
clippy_utils/src/lib.rs6.0MixedExplicit Debt: FixmeComment
clippy_lints/src/matches/match_same_arms.rs6.0MixedExplicit Debt: FixmeComment
clippy_lints/src/eta_reduction.rs6.0MixedExplicit Debt: HackComment
clippy_lints/src/matches/mod.rs6.0MixedExplicit Debt: TodoComment
clippy_lints/src/matches/manual_utils.rs6.0MixedExplicit Debt: TodoComment
clippy_lints/src/transmute/transmute_undefined_repr.rs6.0MixedExplicit Debt: TodoComment
clippy_lints/src/matches/match_wild_enum.rs6.0MixedExplicit Debt: FixmeComment
clippy_lints/src/indexing_slicing.rs6.0MixedExplicit Debt: FixmeComment
clippy_lints/src/types/mod.rs6.0MixedExplicit Debt: FixmeComment

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 32

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 927

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 27

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 13

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 57 of 57 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.8 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 57 dimensions across the health lenses
D1D2D3D4D5D6D9D13D14D15D16D17D19D20D26D28D29D30D34D35D36D43AX10AX3AX4AX8AX9M1M2M3M4P1P10P2P3P4P6X1X12X13X14X15X16X17X18X19X21X22X23X24X25X26X27X28X29X3X30

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 969 of 986 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a17b0c-a9d1-7a0b-97b0-e0b653d7cf3f.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.rs) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs) and this repository declares a Cargo test suite (repository root, 62 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 41 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed Cargo.lock resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A hotspot's complexity is meant to be the worst body its churn actually touched. For clippy_config/src/types.rs that could not be established — the complexity reader for the file reports no body extents, or the history carries no per-line attribution — so the row quotes the file's worst body, which the counted changes may never have touched. The churn count is unaffected.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity3.7 / 10Weak✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 3.7 / 10 · rule-coverage 100% · ceiling Prevented

159 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Methods::check_methods at 191. A further 17 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being PrintVisitor::pat at 24 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: clippy_dev/src/parse/cursor.rs (Pat::desc at 22), clippy_config/src/types.rs (SourceItemOrderingModuleItemKind::from_str at 18), clippy_utils/src/higher.rs (clippy_utils::higher::binop at 18), clippy_lints/src/multiple_unsafe_ops_per_block.rs (UnsafeExprCollector::visit_expr at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

clippy_lints::doc::check_doc (cyclomatic 72) · ×79clippy_lints/src/doc/mod.rs:1127
clippy_utils::ast_utils::eq_expr (cyclomatic 63) · ×11clippy_utils/src/ast_utils/mod.rs:145
HirEqInterExpr::eq_expr (cyclomatic 69) · ×4clippy_utils/src/hir_utils.rs:504
SpanlessHash::hash_expr (cyclomatic 59) · ×3clippy_utils/src/hir_utils.rs:1181
clippy_dev::main (cyclomatic 24) · ×3clippy_dev/src/main.rs:11

+ 53 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with Methods::check_methods (cyclomatic 191). — Refactoring it lifts Cyclomatic Complexity from 3.7 to about 4.5/10.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

280 method(s) exceeded the cognitive complexity threshold of 15; the worst was Methods::check_methods at 166.

clippy_lints::doc::check_doc (cognitive 127) · ×153clippy_lints/src/doc/mod.rs:1127
clippy_utils::is_never_expr (cognitive 64) · ×19clippy_utils/src/lib.rs:3024
HirEqInterExpr::eq_expr (cognitive 37) · ×3clippy_utils/src/hir_utils.rs:504
clippy_config::de::create_value_list_msg (cognitive 32) · ×3clippy_config/src/de.rs:69
clippy_dev::edit_lints::rename_update_fn (cognitive 32) · ×3clippy_dev/src/edit_lints.rs:375

+ 86 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 12 bodies over 60 down to 60 or less in Cognitive Complexity — start with Methods::check_methods (cognitive 166), clippy_lints::doc::check_doc (cognitive 127), Dereferencing::check_expr (cognitive 91). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 12 together lifts Cognitive Complexity from 2.0 to about 3.9/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.7 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.7 / 10 · rule-coverage 100% · ceiling Prevented

59 god class(es) detected.

FileTooLong: src/lib.rs · ×21clippy_utils/src/lib.rs
FunctionTooLong: clippy_lints::doc::check_doc · ×19clippy_lints/src/doc/mod.rs:1127
MethodTooLong: Methods.check_methods · ×11clippy_lints/src/methods/mod.rs:5439
ClassTooLong: Methods · ×6clippy_lints/src/methods/mod.rs:5252
TooManyMethods: HirEqInterExprclippy_utils/src/hir_utils.rs:153

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 21 FileTooLong finding(s) in God Classes — start with mod.rs (4), lib.rs (2), hir_utils.rs. — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 19 FunctionTooLong finding(s) in God Classes — start with mod.rs (2), lib.rs, eta_reduction.rs. — One of this dimension's main actionable groups (19 warning-level).
  3. Resolve the 11 MethodTooLong finding(s) in God Classes — start with mod.rs (2), dereference.rs (2), hir_utils.rs (2). — One of this dimension's main actionable groups (11 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.6 / 10Stronggated by 119 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Verified

117 duplicated block group(s) detected. A further 2 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (8 lines × 2) · ×14clippy_dev/src/fmt.rs:144
Duplicated block (9 lines × 2) · ×12clippy_dev/src/edit_lints.rs:36
Duplicated block (5 lines × 2) · ×12clippy_lints/src/await_holding_invalid.rs:295
Duplicated block (6 lines × 2) · ×11clippy_lints/src/booleans.rs:160
Duplicated block (10 lines × 2) · ×9clippy_dev/src/utils.rs:483

+ 31 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 14 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with mod.rs (2), fmt.rs, manual_let_else.rs. — One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 12 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with edit_lints.rs, booleans.rs, lifetimes.rs. — One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 12 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with consts.rs (3), await_holding_invalid.rs, extra_unused_type_parameters.rs. — One of this dimension's main actionable groups (12 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling7.6 / 10Strong✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 7.6 / 10 · rule-coverage 100% · ceiling Prevented

10 production modules (Cargo), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 3 module(s) off the main sequence, with abstractness counted on 9 of the 10 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: declare_clippy_lint · ×3

What to do

  1. Resolve the 3 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (3 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

1 of 225 classes have LCOM4 above 3.

Low cohesion: TraitBounds (LCOM4 4)clippy_lints/src/trait_bounds.rs:94

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with trait_bounds.rs. — One of this dimension's main actionable groups (1 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

174 test methods: 49 unit, 125 integration, 0 BDD, 0 e2e. The Rust suite contributes 174 `#[test]` function(s) across 62 file(s) declaring at least one; its unit/integration split is Cargo's own — 49 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.

Inverted test pyramid

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 190 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository commits no Cargo.lock, so its graph was resolved here: its manifests' `[dependencies]` and `[build-dependencies]` closed over the crates.io index, each crate at the newest release its requirement admits (what a fresh `cargo generate-lockfile` picks, not a graph the repository has pinned). Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under MIT OR Apache-2.0, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.7 / 10Stronggated by 50 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: clippy_lints/src/methods/mod.rs (23×191=4393); clippy_utils/src/ast_utils/mod.rs (15×63=945); clippy_utils/src/hir_utils.rs (12×59=708) Repeated repair below the complexity floor: clippy_lints/src/needless_pass_by_value.rs (5 of 9 changes were fixes); clippy_lints/src/large_futures.rs (4 of 7 changes were fixes); clippy_lints/src/manual_pop_if.rs (4 of 7 changes were fixes)

Hotspot: clippy_lints/src/methods/mod.rs · ×28clippy_lints/src/methods/mod.rs:5439
Repeated repair: clippy_lints/src/needless_pass_by_value.rs · ×22clippy_lints/src/needless_pass_by_value.rs:357

What to do

  1. Resolve the 28 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (4), hir_utils.rs, lib.rs. — One of this dimension's main actionable groups (28 warning-level).
  2. Resolve the 22 Repeated repair finding(s) in Churn × Complexity Hotspots — start with needless_pass_by_value.rs, large_futures.rs, manual_pop_if.rs. — One of this dimension's main actionable groups (22 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

5 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is clippy_dev/src/parse.rs. Counted over 592 of the 815 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt9.7 / 10Stronggated by 243 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Prevented

243 deducted task-comment markers across 154987 LoC (0.2/KLoC) → score 9.7. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

FixmeComment · ×122tests/compile-test.rs:236
TodoComment · ×115tests/ui/collection_is_never_read.rs:9
HackComment · ×4tests/ui/auxiliary/proc_macro_attr.rs:131
XxxComment · ×2clippy_lints/src/len_without_is_empty.rs:281

What to do

  1. Resolve the 122 FixmeComment finding(s) in Explicit Debt — start with consts.rs (8), mod.rs (4), non_copy_const.rs (4). — One of this dimension's main actionable groups (122 warning-level).
  2. Resolve the 115 TodoComment finding(s) in Explicit Debt — start with format_push_string_unfixable.rs (8), panicking_macros.rs (5), lib.rs (5). — One of this dimension's main actionable groups (115 warning-level).
  3. Resolve the 4 HackComment finding(s) in Explicit Debt — start with proc_macro_attr.rs, qualify_min_const_fn.rs, eta_reduction.rs. — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 11 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion8.0 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 10 build units (Cargo) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)8.4 / 10Adequategated by 32 critical findings✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Documented

32 finding(s): 0 critical, 32 high, 0 medium, 0 low. 31 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 5 file(s) — `clippy_config/src/types.rs` (line 127), `clippy_dev/src/parse/cursor.rs` (line 458, line 475), `clippy_dev/src/utils.rs` (line 85, line 95, line 106, …), `clippy_utils/src/sym.rs` (line 27), `util/gh-pages/index_template.html` (line 247) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. No action in Static Analysis (SAST) — all 31 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (31 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D34 · Knowledge Freshness9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

3 of 592 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is clippy_utils/src/numeric_literal.rs. Counted over 592 of the 815 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×3clippy_utils/src/numeric_literal.rs:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.9 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: collapsible_if.rs↔needless_return.rs 55%; disallowed_items.rs↔disallowed_macros.rs 53%; unnecessary_to_owned.rs↔unit_return_expecting_ord.rs 50%

Change coupling: collapsible_if.rs ↔ needless_return.rs · ×3clippy_lints/src/collapsible_if.rs:1

What to do

  1. Resolve the 3 Change coupling finding(s) in Change Coupling — start with collapsible_if.rs, disallowed_items.rs, unnecessary_to_owned.rs. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 4 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

M1 · Documentation (README)8.1 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 6 of 10 project(s) that lack one — worth up to 1.2 pts.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability2.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • No logging call was found in the 830 Python, JavaScript/TypeScript, Rust production file(s) this check read across 13 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; Rust: the log and tracing crates (info!/warn!/error!, #[instrument]), slog, env_logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.

What to do

  • Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run.
  • Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health85%Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture96%ExemplaryStrongest area.
Maturity62%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness60%Adequate — gated by P2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security77%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 59 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~110527 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
  • D12 Dependency Hygiene — Not scored — 41 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed Cargo.lock resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency is measured on C# only; JavaScript, Python, Rust not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (30 value object(s))
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python, Rust source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • S1 Web-Security Posture — No web surface: 823 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
  • X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 32 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 6 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 927 finding(s)
D2 · Cognitive Complexity · clippy_lints · ×153
  • clippy_lints::doc::check_doc (cognitive 127) clippy_lints/src/doc/mod.rs:1127 — clippy_lints::doc::check_doc has cognitive complexity 127 (threshold 15). Drivers by points: if/else 33 (85 pts), boolean chains 22, match/switch 4 (14 pts), loops 2 (6 pts) (nesting depth added 66). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • clippy_lints::loops::needless_range_loop::check (cognitive 73) clippy_lints/src/loops/needless_range_loop.rs:25 — clippy_lints::loops::needless_range_loop::check has cognitive complexity 73 (threshold 15). Drivers by points: if/else 26 (61 pts), boolean chains 7, match/switch 1 (5 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • clippy_lints::methods::manual_inspect::check (cognitive 68) clippy_lints/src/methods/manual_inspect.rs:18 — clippy_lints::methods::manual_inspect::check has cognitive complexity 68 (threshold 15). Drivers by points: if/else 15 (34 pts), match/switch 5 (19 pts), boolean chains 9, loops 2 (6 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::eta_reduction::check_closure (cognitive 65) clippy_lints/src/eta_reduction.rs:90 — clippy_lints::eta_reduction::check_closure has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (38 pts), match/switch 6 (19 pts), boolean chains 8 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::loops::explicit_iter_loop::is_ref_iterable (cognitive 58) clippy_lints/src/loops/explicit_iter_loop.rs:107 — clippy_lints::loops::explicit_iter_loop::is_ref_iterable has cognitive complexity 58 (threshold 15). Drivers by points: if/else 21 (45 pts), boolean chains 11, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • clippy_lints::methods::unnecessary_to_owned::can_change_type (cognitive 55) clippy_lints/src/methods/unnecessary_to_owned.rs:498 — clippy_lints::methods::unnecessary_to_owned::can_change_type has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (48 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • clippy_lints::write::literal::check (cognitive 54) clippy_lints/src/write/literal.rs:16 — clippy_lints::write::literal::check has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 6 (23 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::lifetimes::check_fn_inner (cognitive 52) clippy_lints/src/lifetimes.rs:208 — clippy_lints::lifetimes::check_fn_inner has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 4 (12 pts), match/switch 1 (6 pts), boolean chains 5 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::operators::op_ref::check (cognitive 51) clippy_lints/src/operators/op_ref.rs:15 — clippy_lints::operators::op_ref::check has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 19, match/switch 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::methods::map_clone::check (cognitive 48) clippy_lints/src/methods/map_clone.rs:45 — clippy_lints::methods::map_clone::check has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (34 pts), match/switch 3 (9 pts), boolean chains 5 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • clippy_lints::methods::unwrap_expect_used::check (cognitive 48) clippy_lints/src/methods/unwrap_expect_used.rs:40 — clippy_lints::methods::unwrap_expect_used::check has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (37 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • clippy_lints::operators::assign_op_pattern::check (cognitive 47) clippy_lints/src/operators/assign_op_pattern.rs:19 — clippy_lints::operators::assign_op_pattern::check has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 6, match/switch 1 (4 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • clippy_lints::ranges::check_possible_range_contains (cognitive 45) clippy_lints/src/ranges.rs:212 — clippy_lints::ranges::check_possible_range_contains has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 4, match/switch 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::casts::unnecessary_cast::check (cognitive 44) clippy_lints/src/casts/unnecessary_cast.rs:21 — clippy_lints::casts::unnecessary_cast::check has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 15, match/switch 3 (6 pts) (nesting depth added 11). Of this number, 43 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::attrs::useless_attribute::check (cognitive 43) clippy_lints/src/attrs/useless_attribute.rs:10 — clippy_lints::attrs::useless_attribute::check has cognitive complexity 43 (threshold 15). Drivers by points: if/else 7 (30 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::methods::iter_overeager_cloned::check (cognitive 43) clippy_lints/src/methods/iter_overeager_cloned.rs:37 — clippy_lints::methods::iter_overeager_cloned::check has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (34 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::methods::needless_collect::check (cognitive 43) clippy_lints/src/methods/needless_collect.rs:26 — clippy_lints::methods::needless_collect::check has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 6, match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::implicit_saturating_sub::check_with_condition (cognitive 40) clippy_lints/src/implicit_saturating_sub.rs:304 — clippy_lints::implicit_saturating_sub::check_with_condition has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::methods::search_is_some::check (cognitive 39) clippy_lints/src/methods/search_is_some.rs:19 — clippy_lints::methods::search_is_some::check has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (34 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::transmute::transmute_undefined_repr::check (cognitive 39) clippy_lints/src/transmute/transmute_undefined_repr.rs:9 — clippy_lints::transmute::transmute_undefined_repr::check has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (32 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::matches::manual_utils::check_with (cognitive 38) clippy_lints/src/matches/manual_utils.rs:20 — clippy_lints::matches::manual_utils::check_with has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 7, match/switch 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::loops::while_let_on_iterator::needs_mutable_borrow (cognitive 37) clippy_lints/src/loops/while_let_on_iterator.rs:238 — clippy_lints::loops::while_let_on_iterator::needs_mutable_borrow has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26 (36 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_lints::unit_types::let_unit_value::check (cognitive 37) clippy_lints/src/unit_types/let_unit_value.rs:19 — clippy_lints::unit_types::let_unit_value::check has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 7, match/switch 1 (4 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • clippy_lints::matches::match_wild_err_arm::check (cognitive 36) clippy_lints/src/matches/match_wild_err_arm.rs:12 — clippy_lints::matches::match_wild_err_arm::check has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 2 (8 pts), boolean chains 2 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • clippy_lints::option_if_let_else::try_get_option_occurrence (cognitive 36) clippy_lints/src/option_if_let_else.rs:120 — clippy_lints::option_if_let_else::try_get_option_occurrence has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 5 (12 pts), boolean chains 6 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 128 more in this group — see findings.md.
D17 · Explicit Debt · FixmeComment · ×122
  • FixmeComment tests/compile-test.rs:236 — // FIXME(#160895): While the new solver is enabled by default on nightly,
  • FixmeComment tests/compile-test.rs:346 — // FIXME(#160895): While the new solver is enabled by default on nightly,
  • FixmeComment tests/compile-test.rs:367 — // FIXME: for some reason the modules are linted in a different order for this test — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:47 — // FIXME(f16_f128): add a clamp test once the function is available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui-toml/absolute_paths/absolute_paths.rs:50 — // FIXME: macro calls should be checked. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui-toml/absolute_paths/absolute_paths.rs:56 — // FIXME: derive macro paths should be checked. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui-cargo/module_style/fail_mod_remap/src/main.rs:1 — // FIXME: find a way to add rustflags to ui-cargo tests — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui-cargo/cargo_rust_version/fail_file_attr/src/main.rs:1 — // FIXME: this should produce a warning, because the attribute says 1.58 and the cargo.toml file — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/await_holding_lock.rs:181 — // FIXME: FP, because the `MutexGuard` is dropped before crossing the await point. This is — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/cast.rs:18 — // FIXME(f16_f128): add tests once const casting is available for these types — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/cast_lossless_float.rs:3 — // FIXME(f16_f128): add tests for these types once const casting is available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/cast_nan_to_int.rs:1 — // FIXME(f16_f128): add tests when constants are available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/cast_size.rs:21 — // FIXME(f16_f128): enable f16 and f128 conversions once const eval supports them — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/double_ended_iterator_last.rs:136 — // FIXME: suggestions on `move` closures will change the behavior of the iterator (rust-lang/rust-clippy#17646).
  • FixmeComment tests/ui/double_ended_iterator_last.rs:137 — // FIXME: this problem is documented in "Known issues" section (rust-lang/rust-clippy#17829).
  • FixmeComment tests/ui/float_cmp.rs:1 — // FIXME(f16_f128): const casting is not yet supported for these types. Add when available. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/floating_point_exp.rs:1 — // FIXME(f16_f128): add tests when exp is available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/floating_point_log.rs:4 — // FIXME(f16_f128): add tests for these types once math functions are available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/floating_point_powf.rs:4 — // FIXME(f16_f128): add tests for these types when `powf` is available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/let_if_seq.rs:41 — // FIXME: we could extend the lint to include such cases: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/manual_abs_diff.rs:63 — // FIXME: bunch of patterns that should be linted — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/manual_filter_map.rs:2 — // FIXME suggestion may have redundant closure — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/manual_find_map.rs:2 — // FIXME suggestion may have redundant closure — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/manual_float_methods.rs:5 — // FIXME(f16_f128): add tests for these types once constants are available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/ui/manual_range_patterns.rs:86 — // FIXME: Reduce to 'A'..='Z' | '[' | '\\' | ']' | '^' | '_' | '`' | 'a'..='z' — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 97 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×115
  • TodoComment tests/ui/collection_is_never_read.rs:9 — // TODO: Expand `collection_is_never_read` beyond collections? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/collection_is_never_read.rs:39 — // TODO: Warn here, but this requires more extensive data flow analysis. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/collection_is_never_read.rs:46 — // TODO: Warn here, but this requires more extensive data flow analysis. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/equatable_if_let_const_cmp.rs:18 — // TODO: detect this and suggest `=` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/excessive_precision.rs:38 — // // TODO add inferred type tests for f32 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/format_push_string.rs:22 — // TODO: recognize the already imported `fmt::Write`, and don't add a note suggesting to import it — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/format_push_string_no_std.rs:12 — // TODO: recognize the already imported `fmt::Write`, and don't suggest importing it again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/format_push_string_unfixable.rs:38 — // TODO: suggest importing `std::fmt::Write`; — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/format_push_string_unfixable.rs:91 — // TODO: suggest importing `std::fmt::Write`; — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/format_push_string_unfixable.rs:46 — // TODO: suggest importing the first time, but not again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/format_push_string_unfixable.rs:59 — // TODO: suggest importing the first time, but not again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/format_push_string_unfixable.rs:99 — // TODO: suggest importing the first time, but not again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/format_push_string_unfixable.rs:112 — // TODO: suggest importing the first time, but not again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/format_push_string_unfixable.rs:74 — // TODO: suggest importing, but only for `bar` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/format_push_string_unfixable.rs:127 — // TODO: suggest importing, but only for `bar` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/let_and_return.rs:276 — // TODO: stuff — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/let_and_return.rs:286 — // TODO: Fill `stuff` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/manual_ignore_case_cmp.rs:47 — // TODO:: these are rare, and might not be worth supporting — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/manual_let_else_match.rs:60 — // TODO also support unused bindings aka _v — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/manual_ok_or.rs:52 — // TODO patterns not covered yet — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/missing_spin_loop.rs:31 — // TODO: also match on loop+match or while let — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/mut_from_ref.rs:95 — //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/nonnull_unchecked_on_box_ptr.rs:154 — // TODO? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/panicking_macros.rs:53 — //~^ todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/ui/panicking_macros.rs:56 — //~^ todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 90 more in this group — see findings.md.
D1 · Cyclomatic Complexity · clippy_lints · ×79
  • clippy_lints::doc::check_doc (cyclomatic 72) clippy_lints/src/doc/mod.rs:1127 — clippy_lints::doc::check_doc has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::operators::op_ref::check (cyclomatic 47) clippy_lints/src/operators/op_ref.rs:15 — clippy_lints::operators::op_ref::check has cyclomatic complexity 47 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • clippy_lints::methods::manual_inspect::check (cyclomatic 40) clippy_lints/src/methods/manual_inspect.rs:18 — clippy_lints::methods::manual_inspect::check has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::casts::unnecessary_cast::check (cyclomatic 36) clippy_lints/src/casts/unnecessary_cast.rs:21 — clippy_lints::casts::unnecessary_cast::check has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::eta_reduction::check_closure (cyclomatic 35) clippy_lints/src/eta_reduction.rs:90 — clippy_lints::eta_reduction::check_closure has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::loops::never_loop::never_loop_expr (cyclomatic 33) clippy_lints/src/loops/never_loop.rs:293 — clippy_lints::loops::never_loop::never_loop_expr has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_lints::loops::explicit_iter_loop::is_ref_iterable (cyclomatic 31) clippy_lints/src/loops/explicit_iter_loop.rs:107 — clippy_lints::loops::explicit_iter_loop::is_ref_iterable has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::matches::manual_utils::check_with (cyclomatic 30) clippy_lints/src/matches/manual_utils.rs:20 — clippy_lints::matches::manual_utils::check_with has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::transmute::transmute_undefined_repr::check (cyclomatic 29) clippy_lints/src/transmute/transmute_undefined_repr.rs:9 — clippy_lints::transmute::transmute_undefined_repr::check has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::write::literal::check (cyclomatic 29) clippy_lints/src/write/literal.rs:16 — clippy_lints::write::literal::check has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::loops::needless_range_loop::check (cyclomatic 28) clippy_lints/src/loops/needless_range_loop.rs:25 — clippy_lints::loops::needless_range_loop::check has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::matches::match_wild_enum::check (cyclomatic 28) clippy_lints/src/matches/match_wild_enum.rs:15 — clippy_lints::matches::match_wild_enum::check has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_lints::casts::unnecessary_cast::walk_receiver_path_step (cyclomatic 26) clippy_lints/src/casts/unnecessary_cast.rs:537 — clippy_lints::casts::unnecessary_cast::walk_receiver_path_step has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • clippy_lints::operators::invalid_upcast_comparisons::upcast_comparison_bounds_err (cyclomatic 26) clippy_lints/src/operators/invalid_upcast_comparisons.rs:67 — clippy_lints::operators::invalid_upcast_comparisons::upcast_comparison_bounds_err has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • clippy_lints::methods::unnecessary_sort_by::mirrored_exprs (cyclomatic 25) clippy_lints/src/methods/unnecessary_sort_by.rs:33 — clippy_lints::methods::unnecessary_sort_by::mirrored_exprs has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_lints::methods::unwrap_expect_used::check (cyclomatic 25) clippy_lints/src/methods/unwrap_expect_used.rs:40 — clippy_lints::methods::unwrap_expect_used::check has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::lifetimes::could_use_elision (cyclomatic 24) clippy_lints/src/lifetimes.rs:293 — clippy_lints::lifetimes::could_use_elision has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::methods::unnecessary_literal_unwrap::check (cyclomatic 24) clippy_lints/src/methods/unnecessary_literal_unwrap.rs:27 — clippy_lints::methods::unnecessary_literal_unwrap::check has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::option_if_let_else::try_get_option_occurrence (cyclomatic 24) clippy_lints/src/option_if_let_else.rs:120 — clippy_lints::option_if_let_else::try_get_option_occurrence has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::matches::collapsible_match::check_arm (cyclomatic 23) clippy_lints/src/matches/collapsible_match.rs:74 — clippy_lints::matches::collapsible_match::check_arm has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::methods::needless_collect::check (cyclomatic 23) clippy_lints/src/methods/needless_collect.rs:26 — clippy_lints::methods::needless_collect::check has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::operators::bit_mask::check (cyclomatic 23) clippy_lints/src/operators/bit_mask.rs:13 — clippy_lints::operators::bit_mask::check has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_lints::time_subtraction::const_eval_duration (cyclomatic 23) clippy_lints/src/time_subtraction.rs:220 — clippy_lints::time_subtraction::const_eval_duration has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::functions::misnamed_getters::check_fn (cyclomatic 22) clippy_lints/src/functions/misnamed_getters.rs:14 — clippy_lints::functions::misnamed_getters::check_fn has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_lints::implicit_saturating_sub::check_with_condition (cyclomatic 22) clippy_lints/src/implicit_saturating_sub.rs:304 — clippy_lints::implicit_saturating_sub::check_with_condition has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • + 54 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×28
  • Hotspot: clippy_lints/src/methods/mod.rs clippy_lints/src/methods/mod.rs:5439 — clippy_lints/src/methods/mod.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 191 in Methods::check_methods at line 5439. 4 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/methods/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_utils/src/ast_utils/mod.rs clippy_utils/src/ast_utils/mod.rs:145 — clippy_utils/src/ast_utils/mod.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in clippy_utils::ast_utils::eq_expr at line 145. 2 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_utils/src/ast_utils/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_utils/src/hir_utils.rs clippy_utils/src/hir_utils.rs:1181 — clippy_utils/src/hir_utils.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in SpanlessHash::hash_expr at line 1181. 2 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_utils/src/hir_utils.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_utils/src/lib.rs clippy_utils/src/lib.rs:2701 — clippy_utils/src/lib.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in clippy_utils::expr_use_sites at line 2701. 5 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_utils/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/useless_conversion.rs clippy_lints/src/useless_conversion.rs:158 — clippy_lints/src/useless_conversion.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in UselessConversion::check_expr at line 158. 4 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/useless_conversion.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/lifetimes.rs clippy_lints/src/lifetimes.rs:293 — clippy_lints/src/lifetimes.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in clippy_lints::lifetimes::could_use_elision at line 293. 5 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/lifetimes.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/eta_reduction.rs clippy_lints/src/eta_reduction.rs:90 — clippy_lints/src/eta_reduction.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in clippy_lints::eta_reduction::check_closure at line 90. 3 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/eta_reduction.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/matches/mod.rs clippy_lints/src/matches/mod.rs:1055 — clippy_lints/src/matches/mod.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Matches::check_expr at line 1055. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/matches/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_utils/src/eager_or_lazy.rs clippy_utils/src/eager_or_lazy.rs:261 — clippy_utils/src/eager_or_lazy.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ExprEagernessVisitor::visit_expr at line 261. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_utils/src/eager_or_lazy.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/attrs/mod.rs clippy_lints/src/attrs/mod.rs:660 — clippy_lints/src/attrs/mod.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in PostExpansionEarlyAttributes::check_attribute at line 660. 1 of those changes was a fix/bug commit, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/attrs/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/arbitrary_source_item_ordering.rs clippy_lints/src/arbitrary_source_item_ordering.rs:489 — clippy_lints/src/arbitrary_source_item_ordering.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ArbitrarySourceItemOrdering::check_mod at line 489. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/arbitrary_source_item_ordering.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_utils/src/qualify_min_const_fn.rs clippy_utils/src/qualify_min_const_fn.rs:130 — clippy_utils/src/qualify_min_const_fn.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in clippy_utils::qualify_min_const_fn::check_rvalue at line 130. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_utils/src/qualify_min_const_fn.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/needless_borrows_for_generic_args.rs clippy_lints/src/needless_borrows_for_generic_args.rs:166 — clippy_lints/src/needless_borrows_for_generic_args.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in clippy_lints::needless_borrows_for_generic_args::needless_borrow_count at line 166. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/needless_borrows_for_generic_args.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/returns/needless_return.rs clippy_lints/src/returns/needless_return.rs:118 — clippy_lints/src/returns/needless_return.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in clippy_lints::returns::needless_return::check_final_expr at line 118. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/returns/needless_return.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_dev/src/edit_lints.rs clippy_dev/src/edit_lints.rs:375 — clippy_dev/src/edit_lints.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in clippy_dev::edit_lints::rename_update_fn at line 375. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_dev/src/edit_lints.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/matches/collapsible_match.rs clippy_lints/src/matches/collapsible_match.rs:74 — clippy_lints/src/matches/collapsible_match.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in clippy_lints::matches::collapsible_match::check_arm at line 74. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/matches/collapsible_match.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_config/src/types.rs clippy_config/src/types.rs:58 — clippy_config/src/types.rs changed 7 times in last 90 days, max cyclomatic complexity 18 in SourceItemOrderingModuleItemKind::from_str at line 58. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_config/src/types.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/driver.rs src/driver.rs:196 — src/driver.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in clippy::driver::main at line 196. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- src/driver.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/methods/map_clone.rs clippy_lints/src/methods/map_clone.rs:45 — clippy_lints/src/methods/map_clone.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in clippy_lints::methods::map_clone::check at line 45. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/methods/map_clone.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/pass_by_ref_or_value.rs clippy_lints/src/pass_by_ref_or_value.rs:128 — clippy_lints/src/pass_by_ref_or_value.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in PassByRefOrValue::check_poly_fn at line 128. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/pass_by_ref_or_value.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/missing_const_for_fn.rs clippy_lints/src/missing_const_for_fn.rs:89 — clippy_lints/src/missing_const_for_fn.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in MissingConstForFn::check_fn at line 89. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/missing_const_for_fn.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/loops/needless_range_loop.rs clippy_lints/src/loops/needless_range_loop.rs:260 — clippy_lints/src/loops/needless_range_loop.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in VarVisitor::check at line 260. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/loops/needless_range_loop.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/format.rs clippy_lints/src/format.rs:55 — clippy_lints/src/format.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in UselessFormat::check_expr at line 55. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/format.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/wildcard_imports.rs clippy_lints/src/wildcard_imports.rs:140 — clippy_lints/src/wildcard_imports.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in WildcardImports::check_use_tree at line 140. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/wildcard_imports.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: clippy_lints/src/methods/unnecessary_fold.rs clippy_lints/src/methods/unnecessary_fold.rs:314 — clippy_lints/src/methods/unnecessary_fold.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in clippy_lints::methods::unnecessary_fold::check_option_fold at line 314. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/methods/unnecessary_fold.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 3 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×22
  • Repeated repair: clippy_lints/src/needless_pass_by_value.rs clippy_lints/src/needless_pass_by_value.rs:357 — clippy_lints/src/needless_pass_by_value.rs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is clippy_lints::needless_pass_by_value::extract_clone_suggestions at line 357), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix clippy imports”; “fix deprecated rustc_hir::attrs imports”; “fix(needless_pass_by_value): respect inline allows”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/needless_pass_by_value.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/large_futures.rs clippy_lints/src/large_futures.rs:59 — clippy_lints/src/large_futures.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is LargeFuture::check_expr at line 59), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix large_futures ICE with the next solver”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/large_futures.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/manual_pop_if.rs clippy_lints/src/manual_pop_if.rs:241 — clippy_lints/src/manual_pop_if.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is clippy_lints::manual_pop_if::check_if_let_pattern at line 241), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/manual_pop_if.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/collection_is_never_read.rs clippy_lints/src/collection_is_never_read.rs:77 — clippy_lints/src/collection_is_never_read.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is clippy_lints::collection_is_never_read::has_no_read_access at line 77), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/collection_is_never_read.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/non_canonical_impls.rs clippy_lints/src/non_canonical_impls.rs:150 — clippy_lints/src/non_canonical_impls.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is NonCanonicalImpls::check_item at line 150), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/non_canonical_impls.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/methods/format_collect.rs clippy_lints/src/methods/format_collect.rs:20 — clippy_lints/src/methods/format_collect.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is clippy_lints::methods::format_collect::check at line 20), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/methods/format_collect.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/methods/option_map_or_none.rs clippy_lints/src/methods/option_map_or_none.rs:33 — clippy_lints/src/methods/option_map_or_none.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is clippy_lints::methods::option_map_or_none::check at line 33), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/methods/option_map_or_none.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/methods/result_map_or_else_none.rs clippy_lints/src/methods/result_map_or_else_none.rs:14 — clippy_lints/src/methods/result_map_or_else_none.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is clippy_lints::methods::result_map_or_else_none::check at line 14), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/methods/result_map_or_else_none.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/returns/needless_return_with_question_mark.rs clippy_lints/src/returns/needless_return_with_question_mark.rs:12 — clippy_lints/src/returns/needless_return_with_question_mark.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is clippy_lints::returns::needless_return_with_question_mark::check_stmt at line 12), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/returns/needless_return_with_question_mark.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/unconditional_recursion.rs clippy_lints/src/unconditional_recursion.rs:177 — clippy_lints/src/unconditional_recursion.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is clippy_lints::unconditional_recursion::check_partial_eq at line 177), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix clippy”; “fix `default_impl_for_type` not caching in the no `Default` case”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/unconditional_recursion.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/drop_forget_ref.rs clippy_lints/src/drop_forget_ref.rs:143 — clippy_lints/src/drop_forget_ref.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is clippy_lints::drop_forget_ref::is_single_call_in_arm at line 143), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/drop_forget_ref.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/format_push_string.rs clippy_lints/src/format_push_string.rs:76 — clippy_lints/src/format_push_string.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is FormatPushString::find_formats at line 76), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/format_push_string.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/inherent_to_string.rs clippy_lints/src/inherent_to_string.rs:120 — clippy_lints/src/inherent_to_string.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is clippy_lints::inherent_to_string::show_lint at line 120), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/inherent_to_string.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/manual_ignore_case_cmp.rs clippy_lints/src/manual_ignore_case_cmp.rs:49 — clippy_lints/src/manual_ignore_case_cmp.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is clippy_lints::manual_ignore_case_cmp::get_ascii_type at line 49), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/manual_ignore_case_cmp.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/methods/clone_on_copy.rs clippy_lints/src/methods/clone_on_copy.rs:22 — clippy_lints/src/methods/clone_on_copy.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is clippy_lints::methods::clone_on_copy::check_parent_is_suffix_expr at line 22), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix up `lang_items` import paths”; “fix: lint of &x.clone().”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/methods/clone_on_copy.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/missing_fields_in_debug.rs clippy_lints/src/missing_fields_in_debug.rs:155 — clippy_lints/src/missing_fields_in_debug.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is clippy_lints::missing_fields_in_debug::check_struct at line 155), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/missing_fields_in_debug.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/missing_inline.rs clippy_lints/src/missing_inline.rs:67 — clippy_lints/src/missing_inline.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is clippy_lints::missing_inline::check at line 67), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix tools”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/missing_inline.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/needless_question_mark.rs clippy_lints/src/needless_question_mark.rs:95 — clippy_lints/src/needless_question_mark.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is clippy_lints::needless_question_mark::check at line 95), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/needless_question_mark.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/pub_underscore_fields.rs clippy_lints/src/pub_underscore_fields.rs:60 — clippy_lints/src/pub_underscore_fields.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is PubUnderscoreFields::check_item at line 60), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/pub_underscore_fields.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/replace_box.rs clippy_lints/src/replace_box.rs:80 — clippy_lints/src/replace_box.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is ReplaceBox::check_expr at line 80), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/replace_box.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/with_capacity_zero.rs clippy_lints/src/with_capacity_zero.rs:37 — clippy_lints/src/with_capacity_zero.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is clippy_lints::with_capacity_zero::is_target_type at line 37), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/with_capacity_zero.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clippy_lints/src/methods/bind_instead_of_map.rs clippy_lints/src/methods/bind_instead_of_map.rs:157 — clippy_lints/src/methods/bind_instead_of_map.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is BindInsteadOfMap::check at line 157), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix up `lang_items` import paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:25:41 +00:00' --until='2026-10-27 00:25:41 +00:00' --full-history --no-merges -- clippy_lints/src/methods/bind_instead_of_map.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D3 · God Classes · FileTooLong · ×21
  • FileTooLong: src/lib.rs clippy_utils/src/lib.rs — FileTooLong — 2143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 150 free functions. The bar is 500 significant lines; this is 1643 over it, 4.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: methods/mod.rs clippy_lints/src/methods/mod.rs — FileTooLong — 1866 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1366 over it, 3.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/hir_utils.rs clippy_utils/src/hir_utils.rs — FileTooLong — 1196 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 696 over it, 2.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ty/mod.rs clippy_utils/src/ty/mod.rs — FileTooLong — 994 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 55 free functions. The bar is 500 significant lines; this is 494 over it, 1.99× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/lib.rs clippy_lints/src/lib.rs — FileTooLong — 827 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 327 over it, 1.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/consts.rs clippy_utils/src/consts.rs — FileTooLong — 827 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 327 over it, 1.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/dereference.rs clippy_lints/src/dereference.rs — FileTooLong — 777 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 63% of them inside a single declaration: Dereferencing (3 blocks, 154-1300). The bar is 500 significant lines; this is 277 over it, 1.55× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ast_utils/mod.rs clippy_utils/src/ast_utils/mod.rs — FileTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 61 free functions. The bar is 500 significant lines; this is 254 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/sugg.rs clippy_utils/src/sugg.rs — FileTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 123 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/types.rs clippy_config/src/types.rs — FileTooLong — 616 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 116 over it, 1.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: doc/mod.rs clippy_lints/src/doc/mod.rs — FileTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 105 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: utils/author.rs clippy_lints/src/utils/author.rs — FileTooLong — 597 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: PrintVisitor (2 blocks, 215-874). The bar is 500 significant lines; this is 97 over it, 1.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/utils.rs clippy_dev/src/utils.rs — FileTooLong — 587 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 87 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/undocumented_unsafe_blocks.rs clippy_lints/src/undocumented_unsafe_blocks.rs — FileTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 81 over it, 1.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/lifetimes.rs clippy_lints/src/lifetimes.rs — FileTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 75 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: methods/needless_collect.rs clippy_lints/src/methods/needless_collect.rs — FileTooLong — 572 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 72 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/visitors.rs clippy_utils/src/visitors.rs — FileTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 70 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/conf.rs clippy_config/src/conf.rs — FileTooLong — 560 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 60 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/non_copy_const.rs clippy_lints/src/non_copy_const.rs — FileTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 75% of them inside a single declaration: NonCopyConst (3 blocks, 256-891). The bar is 500 significant lines; this is 59 over it, 1.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: methods/unnecessary_to_owned.rs clippy_lints/src/methods/unnecessary_to_owned.rs — FileTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 10 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/manual_clamp.rs clippy_lints/src/manual_clamp.rs — FileTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 8 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D2 · Cognitive Complexity · clippy_utils · ×19
  • clippy_utils::is_never_expr (cognitive 64) clippy_utils/src/lib.rs:3024 — clippy_utils::is_never_expr has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (44 pts), loops 4 (11 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_utils::capture_local_usage (cognitive 33) clippy_utils/src/lib.rs:829 — clippy_utils::capture_local_usage has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 6 (18 pts), if/else 4 (8 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 19). Of this number, 32 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • clippy_utils::mir::reachable_while_storage_live (cognitive 29) clippy_utils/src/mir/mod.rs:70 — clippy_utils::mir::reachable_while_storage_live has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_utils::paths::local_item_child_by_name (cognitive 28) clippy_utils/src/paths.rs:287 — clippy_utils::paths::local_item_child_by_name has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • clippy_utils::ast_utils::eq_expr (cognitive 27) clippy_utils/src/ast_utils/mod.rs:145 — clippy_utils::ast_utils::eq_expr has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 25, if/else 1, match/switch 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • clippy_utils::is_default_equivalent_call (cognitive 26) clippy_utils/src/lib.rs:570 — clippy_utils::is_default_equivalent_call has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 8, match/switch 1 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • clippy_utils::ty::type_certainty::path_segment_certainty (cognitive 25) clippy_utils/src/ty/type_certainty/mod.rs:218 — clippy_utils::ty::type_certainty::path_segment_certainty has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • clippy_utils::ty::contains_ty_adt_constructor_opaque::contains_ty_adt_constructor_opaque_inner (cognitive 23) clippy_utils/src/ty/mod.rs:95 — clippy_utils::ty::contains_ty_adt_constructor_opaque::contains_ty_adt_constructor_opaque_inner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • clippy_utils::is_body_identity_function (cognitive 22) clippy_utils/src/lib.rs:1816 — clippy_utils::is_body_identity_function has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_utils::can_move_expr_to_closure (cognitive 21) clippy_utils/src/lib.rs:924 — clippy_utils::can_move_expr_to_closure has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (13 pts), if/else 3 (6 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • clippy_utils::expr_use_sites (cognitive 20) clippy_utils/src/lib.rs:2701 — clippy_utils::expr_use_sites has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (3 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • clippy_utils::eager_or_lazy::fn_eagerness (cognitive 19) clippy_utils/src/eager_or_lazy.rs:52 — clippy_utils::eager_or_lazy::fn_eagerness has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • clippy_utils::qualify_min_const_fn::check_terminator (cognitive 18) clippy_utils/src/qualify_min_const_fn.rs:334 — clippy_utils::qualify_min_const_fn::check_terminator has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • clippy_utils::ty::type_certainty::expr_type_certainty (cognitive 18) clippy_utils/src/ty/type_certainty/mod.rs:32 — clippy_utils::ty::type_certainty::expr_type_certainty has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_utils::maybe_get_relative_path (cognitive 17) clippy_utils/src/lib.rs:3320 — clippy_utils::maybe_get_relative_path has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_utils::ast_utils::eq_item_kind (cognitive 17) clippy_utils/src/ast_utils/mod.rs:308 — clippy_utils::ast_utils::eq_item_kind has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, match/switch 2 (3 pts) (nesting depth added 1). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • clippy_utils::qualify_min_const_fn::check_ty (cognitive 17) clippy_utils/src/qualify_min_const_fn.rs:76 — clippy_utils::qualify_min_const_fn::check_ty has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 1 (5 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • clippy_utils::visitors::for_each_unconsumed_temporary::helper (cognitive 17) clippy_utils/src/visitors.rs:679 — clippy_utils::visitors::for_each_unconsumed_temporary::helper has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 3 (5 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • clippy_utils::str_utils::camel_case_start_from_idx (cognitive 16) clippy_utils/src/str_utils.rs:100 — clippy_utils::str_utils::camel_case_start_from_idx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · FunctionTooLong · ×19
  • FunctionTooLong: clippy_lints::doc::check_doc clippy_lints/src/doc/mod.rs:1127 — FunctionTooLong — clippy_lints::doc::check_doc runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_utils::ast_utils::eq_item_kind clippy_utils/src/ast_utils/mod.rs:308 — FunctionTooLong — clippy_utils::ast_utils::eq_item_kind runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_utils::is_never_expr clippy_utils/src/lib.rs:3024 — FunctionTooLong — clippy_utils::is_never_expr runs 152 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::eta_reduction::check_closure clippy_lints/src/eta_reduction.rs:90 — FunctionTooLong — clippy_lints::eta_reduction::check_closure runs 137 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::loops::never_loop::never_loop_expr clippy_lints/src/loops/never_loop.rs:293 — FunctionTooLong — clippy_lints::loops::never_loop::never_loop_expr runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::methods::manual_inspect::check clippy_lints/src/methods/manual_inspect.rs:18 — FunctionTooLong — clippy_lints::methods::manual_inspect::check runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_dev::fmt::fmt_conf clippy_dev/src/fmt.rs:66 — FunctionTooLong — clippy_dev::fmt::fmt_conf runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::casts::unnecessary_cast::check clippy_lints/src/casts/unnecessary_cast.rs:21 — FunctionTooLong — clippy_lints::casts::unnecessary_cast::check runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::loops::needless_range_loop::check clippy_lints/src/loops/needless_range_loop.rs:25 — FunctionTooLong — clippy_lints::loops::needless_range_loop::check runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::operators::op_ref::check clippy_lints/src/operators/op_ref.rs:15 — FunctionTooLong — clippy_lints::operators::op_ref::check runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::matches::collapsible_match::check_arm clippy_lints/src/matches/collapsible_match.rs:74 — FunctionTooLong — clippy_lints::matches::collapsible_match::check_arm runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::matches::match_wild_enum::check clippy_lints/src/matches/match_wild_enum.rs:15 — FunctionTooLong — clippy_lints::matches::match_wild_enum::check runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::loops::explicit_iter_loop::is_ref_iterable clippy_lints/src/loops/explicit_iter_loop.rs:107 — FunctionTooLong — clippy_lints::loops::explicit_iter_loop::is_ref_iterable runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::transmute::transmute_undefined_repr::check clippy_lints/src/transmute/transmute_undefined_repr.rs:9 — FunctionTooLong — clippy_lints::transmute::transmute_undefined_repr::check runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::matches::match_same_arms::check clippy_lints/src/matches/match_same_arms.rs:21 — FunctionTooLong — clippy_lints::matches::match_same_arms::check runs 106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::ifs::branches_sharing_code::scan_block_for_eq clippy_lints/src/ifs/branches_sharing_code.rs:319 — FunctionTooLong — clippy_lints::ifs::branches_sharing_code::scan_block_for_eq runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::methods::needless_collect::check clippy_lints/src/methods/needless_collect.rs:26 — FunctionTooLong — clippy_lints::methods::needless_collect::check runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::matches::match_single_binding::check clippy_lints/src/matches/match_single_binding.rs:24 — FunctionTooLong — clippy_lints::matches::match_single_binding::check runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: clippy_lints::needless_borrows_for_generic_args::needless_borrow_count clippy_lints/src/needless_borrows_for_generic_args.rs:166 — FunctionTooLong — clippy_lints::needless_borrows_for_generic_args::needless_borrow_count runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×14
  • Duplicated block (8 lines × 2) clippy_dev/src/fmt.rs:144 — clippy_dev/src/fmt.rs:144-151 | clippy_dev/src/fmt.rs:156-163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_lints/src/manual_let_else.rs:311 — clippy_lints/src/manual_let_else.rs:311-318 | clippy_lints/src/manual_let_else.rs:323-330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_lints/src/methods/iter_filter.rs:65 — clippy_lints/src/methods/iter_filter.rs:65-72 | clippy_lints/src/methods/iter_filter.rs:80-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_lints/src/methods/map_unwrap_or.rs:163 — clippy_lints/src/methods/map_unwrap_or.rs:163-170 | clippy_lints/src/option_if_let_else.rs:271-278 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) clippy_lints/src/methods/mod.rs:6018 — clippy_lints/src/methods/mod.rs:6018-6025 | clippy_lints/src/methods/mod.rs:6041-6048 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_lints/src/operators/assign_op_pattern.rs:147 — clippy_lints/src/operators/assign_op_pattern.rs:147-154 | clippy_lints/src/operators/assign_op_pattern.rs:173-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_lints/src/tuple_array_conversions.rs:96 — clippy_lints/src/tuple_array_conversions.rs:96-103 | clippy_lints/src/tuple_array_conversions.rs:142-149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_utils/src/eager_or_lazy.rs:169 — clippy_utils/src/eager_or_lazy.rs:169-176 | clippy_utils/src/eager_or_lazy.rs:178-185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_utils/src/lib.rs:273 — clippy_utils/src/lib.rs:273-280 | clippy_utils/src/lib.rs:288-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_utils/src/ty/mod.rs:1079 — clippy_utils/src/ty/mod.rs:1079-1086 | clippy_utils/src/ty/mod.rs:1089-1096 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_lints/src/bool_comparison.rs:170 — clippy_lints/src/bool_comparison.rs:170-177 | clippy_lints/src/needless_bool.rs:347-354 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) clippy_lints/src/methods/unnecessary_fold.rs:264 — clippy_lints/src/methods/unnecessary_fold.rs:264-271 | clippy_lints/src/methods/unnecessary_fold.rs:274-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_dev/src/utils.rs:176 — clippy_dev/src/utils.rs:176-183 | clippy_dev/src/utils.rs:188-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) clippy_lints/src/floating_point_arithmetic/expm1.rs:39 — clippy_lints/src/floating_point_arithmetic/expm1.rs:39-46 | clippy_lints/src/floating_point_arithmetic/log_base.rs:37-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×12
  • Duplicated block (9 lines × 2) clippy_dev/src/edit_lints.rs:36 — clippy_dev/src/edit_lints.rs:36-44 | clippy_dev/src/edit_lints.rs:70-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) clippy_lints/src/booleans.rs:170 — clippy_lints/src/booleans.rs:170-178 | clippy_lints/src/booleans.rs:180-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) clippy_lints/src/lifetimes.rs:729 — clippy_lints/src/lifetimes.rs:729-737 | clippy_lints/src/lifetimes.rs:750-758 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) clippy_lints/src/macro_use.rs:176 — clippy_lints/src/macro_use.rs:176-184 | clippy_lints/src/macro_use.rs:188-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) clippy_lints/src/matches/match_same_arms.rs:289 — clippy_lints/src/matches/match_same_arms.rs:289-297 | clippy_lints/src/matches/match_same_arms.rs:313-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) clippy_lints/src/methods/map_unwrap_or.rs:193 — clippy_lints/src/methods/map_unwrap_or.rs:193-201 | clippy_lints/src/option_if_let_else.rs:298-306 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) clippy_lints/src/misc.rs:185 — clippy_lints/src/misc.rs:185-193 | clippy_lints/src/misc.rs:196-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) clippy_lints/src/missing_asserts_for_indexing.rs:242 — clippy_lints/src/missing_asserts_for_indexing.rs:242-250 | clippy_lints/src/missing_asserts_for_indexing.rs:305-313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) clippy_lints/src/operators/op_ref.rs:115 — clippy_lints/src/operators/op_ref.rs:115-123 | clippy_lints/src/operators/op_ref.rs:148-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) clippy_utils/src/ty/mod.rs:849 — clippy_utils/src/ty/mod.rs:849-857 | clippy_utils/src/ty/mod.rs:890-898 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) clippy_lints/src/assertions_on_constants.rs:86 — clippy_lints/src/assertions_on_constants.rs:86-94 | clippy_lints/src/manual_take.rs:108-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) clippy_lints/src/floating_point_arithmetic/radians.rs:44 — clippy_lints/src/floating_point_arithmetic/radians.rs:44-52 | clippy_lints/src/floating_point_arithmetic/radians.rs:70-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×12
  • Duplicated block (5 lines × 2) clippy_lints/src/await_holding_invalid.rs:295 — clippy_lints/src/await_holding_invalid.rs:295-299 | clippy_lints/src/entry.rs:763-767 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) clippy_lints/src/extra_unused_type_parameters.rs:265 — clippy_lints/src/extra_unused_type_parameters.rs:265-269 | clippy_lints/src/extra_unused_type_parameters.rs:281-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) clippy_lints/src/methods/unnecessary_sort_by.rs:179 — clippy_lints/src/methods/unnecessary_sort_by.rs:179-183 | clippy_lints/src/methods/unnecessary_sort_by.rs:207-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) clippy_lints/src/min_ident_chars.rs:147 — clippy_lints/src/min_ident_chars.rs:147-151 | clippy_lints/src/missing_doc.rs:158-162 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) clippy_lints/src/ranges.rs:235 — clippy_lints/src/ranges.rs:235-239 | clippy_lints/src/ranges.rs:271-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) clippy_utils/src/consts.rs:315 — clippy_utils/src/consts.rs:315-319 | clippy_utils/src/consts.rs:368-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) clippy_utils/src/consts.rs:345 — clippy_utils/src/consts.rs:345-349 | clippy_utils/src/consts.rs:401-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) clippy_utils/src/consts.rs:1112 — clippy_utils/src/consts.rs:1112-1116 | clippy_utils/src/consts.rs:1126-1130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) clippy_utils/src/mir/possible_borrower.rs:44 — clippy_utils/src/mir/possible_borrower.rs:44-48 | clippy_utils/src/mir/possible_origin.rs:26-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) clippy_dev/src/edit_lints.rs:228 — clippy_dev/src/edit_lints.rs:228-232 | clippy_dev/src/edit_lints.rs:244-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) clippy_lints/src/manual_pop_if.rs:209 — clippy_lints/src/manual_pop_if.rs:209-213 | clippy_lints/src/manual_pop_if.rs:368-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) clippy_lints/src/needless_nonzero_get.rs:88 — clippy_lints/src/needless_nonzero_get.rs:88-92 | clippy_lints/src/needless_nonzero_get.rs:99-103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · clippy_utils · ×11
  • clippy_utils::ast_utils::eq_expr (cyclomatic 63) clippy_utils/src/ast_utils/mod.rs:145 — clippy_utils::ast_utils::eq_expr has cyclomatic complexity 63 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_utils::is_never_expr (cyclomatic 42) clippy_utils/src/lib.rs:3024 — clippy_utils::is_never_expr has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_utils::ast_utils::eq_item_kind (cyclomatic 32) clippy_utils/src/ast_utils/mod.rs:308 — clippy_utils::ast_utils::eq_item_kind has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_utils::is_default_equivalent_call (cyclomatic 24) clippy_utils/src/lib.rs:570 — clippy_utils::is_default_equivalent_call has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • clippy_utils::capture_local_usage (cyclomatic 22) clippy_utils/src/lib.rs:829 — clippy_utils::capture_local_usage has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_utils::visitors::for_each_unconsumed_temporary::helper (cyclomatic 22) clippy_utils/src/visitors.rs:679 — clippy_utils::visitors::for_each_unconsumed_temporary::helper has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_utils::paths::local_item_child_by_name (cyclomatic 21) clippy_utils/src/paths.rs:287 — clippy_utils::paths::local_item_child_by_name has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: clippy_utils::paths::find_primitive_impls (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • clippy_utils::ty::type_certainty::expr_type_certainty (cyclomatic 20) clippy_utils/src/ty/type_certainty/mod.rs:32 — clippy_utils::ty::type_certainty::expr_type_certainty has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_utils::expr_use_sites (cyclomatic 18) clippy_utils/src/lib.rs:2701 — clippy_utils::expr_use_sites has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • clippy_utils::consts::mir_to_const (cyclomatic 17) clippy_utils/src/consts.rs:1161 — clippy_utils::consts::mir_to_const has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_utils::qualify_min_const_fn::check_rvalue (cyclomatic 16) clippy_utils/src/qualify_min_const_fn.rs:130 — clippy_utils::qualify_min_const_fn::check_rvalue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D3 · God Classes · MethodTooLong · ×11
  • MethodTooLong: Methods.check_methods clippy_lints/src/methods/mod.rs:5439 — MethodTooLong — check_methods runs 536 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 436 over it, 5.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Dereferencing.check_expr clippy_lints/src/dereference.rs:242 — MethodTooLong — check_expr runs 249 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 149 over it, 2.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PrintVisitor.expr clippy_lints/src/utils/author.rs:435 — MethodTooLong — expr runs 225 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UselessConversion.check_expr clippy_lints/src/useless_conversion.rs:158 — MethodTooLong — check_expr runs 200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SpanlessHash.hash_expr clippy_utils/src/hir_utils.rs:1181 — MethodTooLong — hash_expr runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Dereferencing.report clippy_lints/src/dereference.rs:1095 — MethodTooLong — report runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HirEqInterExpr.eq_expr clippy_utils/src/hir_utils.rs:504 — MethodTooLong — eq_expr runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TupleArrayConversions.check_expr clippy_lints/src/tuple_array_conversions.rs:64 — MethodTooLong — check_expr runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Matches.check_expr clippy_lints/src/matches/mod.rs:1055 — MethodTooLong — check_expr runs 125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Crate.run_clippy_lints lintcheck/src/main.rs:68 — MethodTooLong — run_clippy_lints runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ConstEvalCtxt.fetch_path clippy_utils/src/consts.rs:817 — MethodTooLong — fetch_path runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×11
  • Duplicated block (6 lines × 2) clippy_lints/src/booleans.rs:160 — clippy_lints/src/booleans.rs:160-165 | clippy_lints/src/booleans.rs:180-185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) clippy_lints/src/functions/result.rs:59 — clippy_lints/src/functions/result.rs:59-64 | clippy_lints/src/functions/result.rs:79-84 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) clippy_lints/src/matches/redundant_pattern_match.rs:524 — clippy_lints/src/matches/redundant_pattern_match.rs:524-529 | clippy_lints/src/matches/redundant_pattern_match.rs:550-555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) clippy_lints/src/methods/unnecessary_first_then_check.rs:28 — clippy_lints/src/methods/unnecessary_first_then_check.rs:28-34 | clippy_lints/src/methods/unnecessary_get_then_check.rs:39-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) clippy_lints/src/operators/identity_op.rs:49 — clippy_lints/src/operators/identity_op.rs:49-54 | clippy_lints/src/operators/identity_op.rs:62-67 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) clippy_utils/src/consts.rs:1066 — clippy_utils/src/consts.rs:1066-1071 | clippy_utils/src/consts.rs:1094-1099 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) clippy_utils/src/visitors.rs:119 — clippy_utils/src/visitors.rs:119-124 | clippy_utils/src/visitors.rs:165-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) clippy_utils/src/visitors.rs:451 — clippy_utils/src/visitors.rs:451-456 | clippy_utils/src/visitors.rs:466-471 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) clippy_utils/src/visitors.rs:628 — clippy_utils/src/visitors.rs:628-633 | clippy_utils/src/visitors.rs:815-820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) clippy_lints/src/methods/ptr_offset_by_literal.rs:132 — clippy_lints/src/methods/ptr_offset_by_literal.rs:132-137 | clippy_lints/src/methods/ptr_offset_with_cast.rs:76-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) clippy_config/src/metadata.rs:24 — clippy_config/src/metadata.rs:24-30 | clippy_config/src/metadata.rs:46-51 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×9
  • Duplicated block (10 lines × 2) clippy_dev/src/utils.rs:483 — clippy_dev/src/utils.rs:483-492 | clippy_dev/src/utils.rs:513-522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) clippy_lints/src/matches/redundant_guards.rs:33 — clippy_lints/src/matches/redundant_guards.rs:33-42 | clippy_lints/src/matches/redundant_guards.rs:52-61 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) clippy_lints/src/operators/assign_op_pattern.rs:135 — clippy_lints/src/operators/assign_op_pattern.rs:135-144 | clippy_lints/src/operators/assign_op_pattern.rs:161-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) clippy_lints/src/operators/manual_div_ceil.rs:30 — clippy_lints/src/operators/manual_div_ceil.rs:30-39 | clippy_lints/src/operators/manual_div_ceil.rs:41-50 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) clippy_lints/src/ranges.rs:248 — clippy_lints/src/ranges.rs:248-257 | clippy_lints/src/ranges.rs:283-292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) clippy_utils/src/mir/mod.rs:125 — clippy_utils/src/mir/mod.rs:125-134 | clippy_utils/src/mir/mod.rs:140-149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) clippy_utils/src/ty/mod.rs:642 — clippy_utils/src/ty/mod.rs:642-651 | clippy_utils/src/ty/mod.rs:656-666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) clippy_utils/src/usage.rs:208 — clippy_utils/src/usage.rs:208-217 | clippy_utils/src/visitors.rs:317-326 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) clippy_lints/src/operators/arithmetic_side_effects.rs:311 — clippy_lints/src/operators/arithmetic_side_effects.rs:311-320 | clippy_lints/src/operators/numeric_arithmetic.rs:89-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×7
  • Duplicated block (13 lines × 2) clippy_lints/src/arbitrary_source_item_ordering.rs:410 — clippy_lints/src/arbitrary_source_item_ordering.rs:410-422 | clippy_lints/src/arbitrary_source_item_ordering.rs:426-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) clippy_lints/src/casts/needless_type_cast.rs:66 — clippy_lints/src/casts/needless_type_cast.rs:66-78 | clippy_lints/src/casts/needless_type_cast.rs:97-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) clippy_lints/src/floating_point_arithmetic/custom_abs.rs:20 — clippy_lints/src/floating_point_arithmetic/custom_abs.rs:20-32 | clippy_lints/src/floating_point_arithmetic/custom_abs.rs:37-49 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) clippy_lints/src/missing_doc.rs:200 — clippy_lints/src/missing_doc.rs:200-212 | clippy_lints/src/missing_doc.rs:221-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) clippy_lints/src/needless_pass_by_ref_mut.rs:474 — clippy_lints/src/needless_pass_by_ref_mut.rs:474-486 | clippy_lints/src/needless_pass_by_ref_mut.rs:517-529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) clippy_utils/src/res.rs:140 — clippy_utils/src/res.rs:140-152 | clippy_utils/src/res.rs:236-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) clippy_lints/src/mem_replace.rs:199 — clippy_lints/src/mem_replace.rs:199-211 | clippy_lints/src/mem_replace.rs:222-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×7
  • Duplicated block (7 lines × 2) clippy_lints/src/assigning_clones.rs:225 — clippy_lints/src/assigning_clones.rs:225-235 | clippy_lints/src/assigning_clones.rs:260-266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) clippy_lints/src/floating_point_arithmetic/mul_add.rs:67 — clippy_lints/src/floating_point_arithmetic/mul_add.rs:67-73 | clippy_lints/src/floating_point_arithmetic/powi.rs:19-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) clippy_lints/src/loops/mut_range_bound.rs:90 — clippy_lints/src/loops/mut_range_bound.rs:90-96 | clippy_lints/src/loops/mut_range_bound.rs:101-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) clippy_lints/src/manual_pop_if.rs:252 — clippy_lints/src/manual_pop_if.rs:252-258 | clippy_lints/src/manual_pop_if.rs:318-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) clippy_lints/src/matches/redundant_pattern_match.rs:516 — clippy_lints/src/matches/redundant_pattern_match.rs:516-522 | clippy_lints/src/matches/redundant_pattern_match.rs:542-548 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) clippy_lints/src/vec_init_then_push.rs:160 — clippy_lints/src/vec_init_then_push.rs:160-166 | clippy_lints/src/vec_init_then_push.rs:183-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) clippy_lints/src/methods/bind_instead_of_map.rs:64 — clippy_lints/src/methods/bind_instead_of_map.rs:64-70 | clippy_lints/src/methods/bind_instead_of_map.rs:75-81 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · ClassTooLong · ×6
  • ClassTooLong: Methods clippy_lints/src/methods/mod.rs:5252 — ClassTooLong — 663 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods, 4 blocks, lines 5252-6183. The bar is 400 significant lines; this is 263 over it, 1.66× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: HirEqInterExpr clippy_utils/src/hir_utils.rs:153 — ClassTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 32 methods, 2 blocks, lines 153-1028. The bar is 400 significant lines; this is 192 over it, 1.48× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Dereferencing clippy_lints/src/dereference.rs:154 — ClassTooLong — 492 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 3 methods, 3 blocks, lines 154-1300. The bar is 400 significant lines; this is 92 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PrintVisitor clippy_lints/src/utils/author.rs:215 — ClassTooLong — 491 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 19 methods, 2 blocks, lines 215-874. The bar is 400 significant lines; this is 91 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NonCopyConst clippy_lints/src/non_copy_const.rs:256 — ClassTooLong — 419 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 7 methods, 3 blocks, lines 256-891. The bar is 400 significant lines; this is 19 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ConstEvalCtxt clippy_utils/src/consts.rs:559 — ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 2 blocks, lines 559-1144. The bar is 400 significant lines; this is 8 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×6
  • Duplicated block (11 lines × 2) clippy_config/src/types.rs:162 — clippy_config/src/types.rs:162-172 | clippy_config/src/types.rs:197-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) clippy_lints/src/methods/mod.rs:5618 — clippy_lints/src/methods/mod.rs:5618-5628 | clippy_lints/src/methods/mod.rs:5636-5646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) clippy_lints/src/mut_mut.rs:59 — clippy_lints/src/mut_mut.rs:59-69 | clippy_lints/src/mut_mut.rs:115-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) clippy_lints/src/unconditional_recursion.rs:133 — clippy_lints/src/unconditional_recursion.rs:133-143 | clippy_lints/src/unconditional_recursion.rs:238-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) clippy_lints/src/arbitrary_source_item_ordering.rs:204 — clippy_lints/src/arbitrary_source_item_ordering.rs:204-214 | clippy_lints/src/arbitrary_source_item_ordering.rs:267-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) clippy_lints/src/operators/op_ref.rs:100 — clippy_lints/src/operators/op_ref.rs:100-110 | clippy_lints/src/operators/op_ref.rs:133-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D36 · Supply-chain Provenance & Signing REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D1 · Cyclomatic Complexity · HirEqInterExpr · ×4
  • HirEqInterExpr::eq_expr (cyclomatic 69) clippy_utils/src/hir_utils.rs:504 — HirEqInterExpr::eq_expr has cyclomatic complexity 69 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • HirEqInterExpr::eq_block (cyclomatic 23) clippy_utils/src/hir_utils.rs:394 — HirEqInterExpr::eq_block has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • HirEqInterExpr::eq_pat (cyclomatic 18) clippy_utils/src/hir_utils.rs:796 — HirEqInterExpr::eq_pat has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: clippy_utils::hir_utils::has_ambiguous_literal_in_expr (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • HirEqInterExpr::check_ctxt (cyclomatic 17) clippy_utils/src/hir_utils.rs:929 — HirEqInterExpr::check_ctxt has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: clippy_utils::hir_utils::has_ambiguous_literal_in_expr (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D17 · Explicit Debt · HackComment · ×4
  • HackComment tests/ui/auxiliary/proc_macro_attr.rs:131 — // HACK: Syn uses `Span` from the proc_macro2 crate, and does not seem to reexport it. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment clippy_utils/src/qualify_min_const_fn.rs:398 — // HACK: This is to "unstabilize" the `transmute` intrinsic — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment clippy_lints/src/eta_reduction.rs:185 — // HACK: Given a closure in `T.method(|| f())`, where `fn f() -> U where U: 'static`, `T.method(f)` — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment clippy_lints/src/unused_trait_names.rs:90 — // HACK: `ident.span` points at either the final segment of the import path, — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×4
  • Duplicated block (12 lines × 2) clippy_lints/src/implicit_saturating_sub.rs:363 — clippy_lints/src/implicit_saturating_sub.rs:363-374 | clippy_lints/src/implicit_saturating_sub.rs:378-389 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) clippy_lints/src/matches/match_like_matches.rs:41 — clippy_lints/src/matches/match_like_matches.rs:41-52 | clippy_lints/src/matches/match_like_matches.rs:173-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) clippy_lints/src/types/mod.rs:619 — clippy_lints/src/types/mod.rs:619-630 | clippy_lints/src/types/mod.rs:633-644 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:319 — clippy_lints_internal/src/repeated_is_diagnostic_item.rs:319-330 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:385-396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · SpanlessHash · ×3
  • SpanlessHash::hash_expr (cyclomatic 59) clippy_utils/src/hir_utils.rs:1181 — SpanlessHash::hash_expr has cyclomatic complexity 59 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • SpanlessHash::hash_pat (cyclomatic 24) clippy_utils/src/hir_utils.rs:1461 — SpanlessHash::hash_pat has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • SpanlessHash::hash_tykind (cyclomatic 17) clippy_utils/src/hir_utils.rs:1601 — SpanlessHash::hash_tykind has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: clippy_utils::hir_utils::has_ambiguous_literal_in_expr (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · clippy_dev · ×3
  • clippy_dev::main (cyclomatic 24) clippy_dev/src/main.rs:11 — clippy_dev::main has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_dev::fmt::fmt_conf (cyclomatic 22) clippy_dev/src/fmt.rs:66 — clippy_dev::fmt::fmt_conf has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • clippy_dev::edit_lints::rename_update_fn (cyclomatic 20) clippy_dev/src/edit_lints.rs:375 — clippy_dev::edit_lints::rename_update_fn has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · HirEqInterExpr · ×3
  • HirEqInterExpr::eq_expr (cognitive 37) clippy_utils/src/hir_utils.rs:504 — HirEqInterExpr::eq_expr has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 29, if/else 2 (4 pts), match/switch 3 (4 pts) (nesting depth added 3). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • HirEqInterExpr::check_ctxt (cognitive 29) clippy_utils/src/hir_utils.rs:929 — HirEqInterExpr::check_ctxt has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • HirEqInterExpr::eq_block (cognitive 27) clippy_utils/src/hir_utils.rs:394 — HirEqInterExpr::eq_block has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 5, match/switch 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · clippy_config · ×3
  • clippy_config::de::create_value_list_msg (cognitive 32) clippy_config/src/de.rs:69 — clippy_config::de::create_value_list_msg has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (9 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_config::conf::load_conf_file (cognitive 26) clippy_config/src/conf.rs:885 — clippy_config::conf::load_conf_file has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (6 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_config::types::create_disallowed_map (cognitive 18) clippy_config/src/types.rs:233 — clippy_config::types::create_disallowed_map has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · clippy_dev · ×3
  • clippy_dev::edit_lints::rename_update_fn (cognitive 32) clippy_dev/src/edit_lints.rs:375 — clippy_dev::edit_lints::rename_update_fn has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 5, match/switch 2 (5 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_dev::main (cognitive 24) clippy_dev/src/main.rs:11 — clippy_dev::main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 6 (11 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clippy_dev::deprecate_lint::remove_lint_declaration (cognitive 17) clippy_dev/src/deprecate_lint.rs:116 — clippy_dev::deprecate_lint::remove_lint_declaration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (remove_impl_lint_pass, remove_test_assets). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: collapsible_if.rs ↔ needless_return.rs clippy_lints/src/collapsible_if.rs:1 — `clippy_lints/src/collapsible_if.rs` and `clippy_lints/src/returns/needless_return.rs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `5f176afb` implement feedback; `ac8330fd` allocate less; `8349ebc9` port lint attributes — run `git show` on any of them.
  • Change coupling: disallowed_items.rs ↔ disallowed_macros.rs clippy_lints/src/disallowed_items.rs:1 — `clippy_lints/src/disallowed_items.rs` and `clippy_lints/src/disallowed_macros.rs` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `0bac1ca2` Add allow-invalid configuration option for disallowed_* to the docume… (at that commit the file was still `clippy_lints/src/disallowed_methods.rs`); `f23772ce` Move `lookup_path` and similar into `clippy_utils::paths` (at that commit the file was still `clippy_lints/src/disallowed_methods.rs`); `dc7d9ec3` Validate paths in `disallowed_*` configurations (at that commit the file was still `clippy_lints/src/disallowed_methods.rs`) — run `git show` on any of them.
  • Change coupling: unnecessary_to_owned.rs ↔ unit_return_expecting_ord.rs clippy_lints/src/methods/unnecessary_to_owned.rs:1 — `clippy_lints/src/methods/unnecessary_to_owned.rs` and `clippy_lints/src/unit_return_expecting_ord.rs` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `e1bb6a19` rename `TraitPredicate` to `TraitClause`; `236bc3eb` rename `ProjectionPredicate` to `ProjectionClause`; `4f6106cf` Many "predicate"-to-"clause" renamings — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×3
  • Duplicated block (19 lines × 2) clippy_dev/src/deprecate_lint.rs:38 — clippy_dev/src/deprecate_lint.rs:38-56 | clippy_dev/src/deprecate_lint.rs:90-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) clippy_utils/src/ast_utils/mod.rs:313 — clippy_utils/src/ast_utils/mod.rs:313-331 | clippy_utils/src/ast_utils/mod.rs:517-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) clippy_utils/src/ast_utils/mod.rs:576 — clippy_utils/src/ast_utils/mod.rs:576-594 | clippy_utils/src/ast_utils/mod.rs:662-680 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×3
  • Duplicated block (15 lines × 2) clippy_lints/src/casts/ptr_as_ptr.rs:47 — clippy_lints/src/casts/ptr_as_ptr.rs:47-61 | clippy_lints/src/casts/ref_as_ptr.rs:44-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) clippy_utils/src/ty/mod.rs:1234 — clippy_utils/src/ty/mod.rs:1234-1248 | clippy_utils/src/ty/mod.rs:1397-1411 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) clippy_lints/src/doc/mod.rs:1178 — clippy_lints/src/doc/mod.rs:1178-1192 | clippy_lints/src/doc/mod.rs:1222-1236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) clippy_lints/src/doc/include_in_doc_without_cfg.rs:14 — clippy_lints/src/doc/include_in_doc_without_cfg.rs:14-27 | clippy_lints/src/large_include_file.rs:94-107 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14 lines × 2) clippy_lints/src/methods/ptr_offset_by_literal.rs:20 — clippy_lints/src/methods/ptr_offset_by_literal.rs:20-33 | clippy_lints/src/methods/ptr_offset_with_cast.rs:21-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) clippy_lints_internal/src/collapsible_span_lint_calls.rs:217 — clippy_lints_internal/src/collapsible_span_lint_calls.rs:217-231 | clippy_lints_internal/src/collapsible_span_lint_calls.rs:245-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D5 · Coupling · Off the main sequence · ×3
  • Off the main sequence: declare_clippy_lint — declare_clippy_lint: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: rustc_tools_util — rustc_tools_util: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: clippy_utils — clippy_utils: abstractness 0.27, instability 0.00, distance 0.73 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
D1 · Cyclomatic Complexity · ConstEvalCtxt · ×2
  • ConstEvalCtxt::binop (cyclomatic 70) clippy_utils/src/consts.rs:1026 — ConstEvalCtxt::binop has cyclomatic complexity 70 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ConstEvalCtxt::expr (cyclomatic 29) clippy_utils/src/consts.rs:667 — ConstEvalCtxt::expr has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Dereferencing · ×2
  • Dereferencing::check_expr (cyclomatic 60) clippy_lints/src/dereference.rs:242 — Dereferencing::check_expr has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Dereferencing::report (cyclomatic 40) clippy_lints/src/dereference.rs:1095 — Dereferencing::report has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PrintVisitor · ×2
  • PrintVisitor::expr (cyclomatic 46) clippy_lints/src/utils/author.rs:435 — PrintVisitor::expr has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • PrintVisitor::lit (cyclomatic 25) clippy_lints/src/utils/author.rs:349 — PrintVisitor::lit has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ArbitrarySourceItemOrdering · ×2
  • ArbitrarySourceItemOrdering::check_item (cyclomatic 23) clippy_lints/src/arbitrary_source_item_ordering.rs:396 — ArbitrarySourceItemOrdering::check_item has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ArbitrarySourceItemOrdering::check_mod (cyclomatic 18) clippy_lints/src/arbitrary_source_item_ordering.rs:489 — ArbitrarySourceItemOrdering::check_mod has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VarVisitor · ×2
  • VarVisitor::visit_expr (cyclomatic 23) clippy_lints/src/loops/needless_range_loop.rs:369 — VarVisitor::visit_expr has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • VarVisitor::check (cyclomatic 16) clippy_lints/src/loops/needless_range_loop.rs:260 — VarVisitor::check has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExprEagernessVisitor · ×2
  • ExprEagernessVisitor::visit_expr (cyclomatic 23) clippy_utils/src/eager_or_lazy.rs:261 — ExprEagernessVisitor::visit_expr has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ExprEagernessVisitor::visit_binary (cyclomatic 20) clippy_utils/src/eager_or_lazy.rs:165 — ExprEagernessVisitor::visit_binary has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D17 · Explicit Debt · XxxComment · ×2
  • XxxComment clippy_lints/src/len_without_is_empty.rs:281 — // XXX: we might want to relax this to allow `&self` and `&mut self` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment clippy_lints/src/unnecessary_self_imports.rs:121 — // XXX: rewrite as a generator returning `SelfImport`s, if those ever get stabilized — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · Dereferencing · ×2
  • Dereferencing::check_expr (cognitive 91) clippy_lints/src/dereference.rs:242 — Dereferencing::check_expr has cognitive complexity 91 (threshold 15). Drivers by points: if/else 32 (61 pts), boolean chains 17, match/switch 4 (10 pts), loops 1 (3 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dereferencing::report (cognitive 66) clippy_lints/src/dereference.rs:1095 — Dereferencing::report has cognitive complexity 66 (threshold 15). Drivers by points: if/else 23 (40 pts), boolean chains 13, match/switch 6 (13 pts) (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SpanlessHash · ×2
  • SpanlessHash::hash_expr (cognitive 47) clippy_utils/src/hir_utils.rs:1181 — SpanlessHash::hash_expr has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 5 (10 pts), match/switch 3 (7 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SpanlessHash::hash_pat (cognitive 23) clippy_utils/src/hir_utils.rs:1461 — SpanlessHash::hash_pat has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 5 (10 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ArbitrarySourceItemOrdering · ×2
  • ArbitrarySourceItemOrdering::check_item (cognitive 37) clippy_lints/src/arbitrary_source_item_ordering.rs:396 — ArbitrarySourceItemOrdering::check_item has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 3 (6 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ArbitrarySourceItemOrdering::check_mod (cognitive 32) clippy_lints/src/arbitrary_source_item_ordering.rs:489 — ArbitrarySourceItemOrdering::check_mod has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NonCopyConst · ×2
  • NonCopyConst::is_non_freeze_val_borrowed (cognitive 34) clippy_lints/src/non_copy_const.rs:487 — NonCopyConst::is_non_freeze_val_borrowed has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NonCopyConst::is_non_freeze_init_borrowed (cognitive 33) clippy_lints/src/non_copy_const.rs:568 — NonCopyConst::is_non_freeze_init_borrowed has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 5 (11 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NeedlessLateInit · ×2
  • NeedlessLateInit::check_if_or_match (cognitive 30) clippy_lints/src/needless_late_init.rs:81 — NeedlessLateInit::check_if_or_match has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NeedlessLateInit::check_block_post (cognitive 26) clippy_lints/src/needless_late_init.rs:446 — NeedlessLateInit::check_block_post has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExprEagernessVisitor · ×2
  • ExprEagernessVisitor::visit_binary (cognitive 28) clippy_utils/src/eager_or_lazy.rs:165 — ExprEagernessVisitor::visit_binary has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 5 (8 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ExprEagernessVisitor::visit_expr (cognitive 18) clippy_utils/src/eager_or_lazy.rs:261 — ExprEagernessVisitor::visit_expr has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VarVisitor · ×2
  • VarVisitor::visit_expr (cognitive 27) clippy_lints/src/loops/needless_range_loop.rs:369 — VarVisitor::visit_expr has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 8, loops 2 (4 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VarVisitor::check (cognitive 25) clippy_lints/src/loops/needless_range_loop.rs:260 — VarVisitor::check has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeedlessPassByRefMut · ×2
  • NeedlessPassByRefMut::check_fn (cognitive 22) clippy_lints/src/needless_pass_by_ref_mut.rs:124 — NeedlessPassByRefMut::check_fn has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NeedlessPassByRefMut::check_crate_post (cognitive 18) clippy_lints/src/needless_pass_by_ref_mut.rs:259 — NeedlessPassByRefMut::check_crate_post has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SimilarNamesNameVisitor · ×2
  • SimilarNamesNameVisitor::check_ident (cognitive 22) clippy_lints/src/non_expressive_names.rs:222 — SimilarNamesNameVisitor::check_ident has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SimilarNamesNameVisitor::equal_length_strs_not_similar (cognitive 17) clippy_lints/src/non_expressive_names.rs:298 — SimilarNamesNameVisitor::equal_length_strs_not_similar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LiteralDigitGrouping · ×2
  • LiteralDigitGrouping::check_for_mistyped_suffix (cognitive 21) clippy_lints/src/literal_representation.rs:278 — LiteralDigitGrouping::check_for_mistyped_suffix has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • LiteralDigitGrouping::check_lit (cognitive 19) clippy_lints/src/literal_representation.rs:229 — LiteralDigitGrouping::check_lit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ItemNameRepetitions · ×2
  • ItemNameRepetitions::check_name_repetition (cognitive 20) clippy_lints/src/item_name_repetitions.rs:481 — ItemNameRepetitions::check_name_repetition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • ItemNameRepetitions::check_struct_name_repetition (cognitive 16) clippy_lints/src/item_name_repetitions.rs:423 — ItemNameRepetitions::check_struct_name_repetition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConstEvalCtxt · ×2
  • ConstEvalCtxt::binop (cognitive 20) clippy_utils/src/consts.rs:1026 — ConstEvalCtxt::binop has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (14 pts), boolean chains 3, if/else 1 (3 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ConstEvalCtxt::expr (cognitive 18) clippy_utils/src/consts.rs:667 — ConstEvalCtxt::expr has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 4 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · lintcheck · ×2
  • lintcheck::lintcheck (cognitive 20) lintcheck/src/main.rs:316 — lintcheck::lintcheck has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • lintcheck::json::diff (cognitive 18) lintcheck/src/json.rs:126 — lintcheck::json::diff has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×2
  • Duplicated block (17–18 lines × 2) clippy_lints/src/loops/while_let_on_iterator.rs:213 — clippy_lints/src/loops/while_let_on_iterator.rs:213-230 | clippy_lints/src/loops/while_let_on_iterator.rs:254-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17–18 lines × 2) clippy_lints/src/undocumented_unsafe_blocks.rs:257 — clippy_lints/src/undocumented_unsafe_blocks.rs:257-274 | clippy_lints/src/undocumented_unsafe_blocks.rs:280-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) clippy_lints/src/disallowed_items.rs:318 — clippy_lints/src/disallowed_items.rs:318-334 | clippy_lints/src/disallowed_items.rs:341-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) clippy_lints/src/manual_pop_if.rs:215 — clippy_lints/src/manual_pop_if.rs:215-231 | clippy_lints/src/manual_pop_if.rs:375-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) clippy_lints/src/doc/markdown.rs:133 — clippy_lints/src/doc/markdown.rs:133-141 | clippy_lints/src/doc/markdown.rs:163-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) clippy_lints/src/non_copy_const.rs:768 — clippy_lints/src/non_copy_const.rs:768-777 | clippy_lints/src/non_copy_const.rs:829-837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) clippy_dev/src/edit_lints.rs:25 — clippy_dev/src/edit_lints.rs:25-33 | clippy_dev/src/edit_lints.rs:59-67 | clippy_dev/src/edit_lints.rs:110-118 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) clippy_lints/src/arbitrary_source_item_ordering.rs:286 — clippy_lints/src/arbitrary_source_item_ordering.rs:286-294 | clippy_lints/src/arbitrary_source_item_ordering.rs:357-365 | clippy_lints/src/arbitrary_source_item_ordering.rs:453-461 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D1 · Cyclomatic Complexity · Methods · ×1
  • Methods::check_methods (cyclomatic 191) clippy_lints/src/methods/mod.rs:5439 — Methods::check_methods has cyclomatic complexity 191 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UselessConversion · ×1
  • UselessConversion::check_expr (cyclomatic 44) clippy_lints/src/useless_conversion.rs:158 — UselessConversion::check_expr has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NormalizedPat · ×1
  • NormalizedPat::from_pat (cyclomatic 37) clippy_lints/src/matches/match_same_arms.rs:263 — NormalizedPat::from_pat has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Matches · ×1
  • Matches::check_expr (cyclomatic 33) clippy_lints/src/matches/mod.rs:1055 — Matches::check_expr has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IndexingSlicing · ×1
  • IndexingSlicing::check_expr (cyclomatic 27) clippy_lints/src/indexing_slicing.rs:111 — IndexingSlicing::check_expr has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TupleArrayConversions · ×1
  • TupleArrayConversions::check_expr (cyclomatic 26) clippy_lints/src/tuple_array_conversions.rs:64 — TupleArrayConversions::check_expr has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Types · ×1
  • Types::check_ty (cyclomatic 26) clippy_lints/src/types/mod.rs:575 — Types::check_ty has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · IterFunctionVisitor · ×1
  • IterFunctionVisitor::visit_expr (cyclomatic 25) clippy_lints/src/methods/needless_collect.rs:512 — IterFunctionVisitor::visit_expr has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NonCopyConst · ×1
  • NonCopyConst::is_non_freeze_init_borrowed (cyclomatic 24) clippy_lints/src/non_copy_const.rs:568 — NonCopyConst::is_non_freeze_init_borrowed has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DerefDelegate · ×1
  • DerefDelegate::borrow (cyclomatic 24) clippy_utils/src/sugg.rs:937 — DerefDelegate::borrow has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MissingConstForFn · ×1
  • MissingConstForFn::check_fn (cyclomatic 23) clippy_lints/src/missing_const_for_fn.rs:89 — MissingConstForFn::check_fn has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PatState · ×1
  • PatState::add_pat (cyclomatic 22) clippy_lints/src/matches/single_match.rs:355 — PatState::add_pat has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Hir2Qmm · ×1
  • Hir2Qmm::run (cyclomatic 21) clippy_lints/src/booleans.rs:261 — Hir2Qmm::run has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PeekableVisitor · ×1
  • PeekableVisitor::visit_expr (cyclomatic 21) clippy_lints/src/unused_peekable.rs:118 — PeekableVisitor::visit_expr has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · clippy · ×1
  • clippy::driver::main (cyclomatic 21) src/driver.rs:196 — clippy::driver::main has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NumericFallbackVisitor · ×1
  • NumericFallbackVisitor::visit_expr (cyclomatic 20) clippy_lints/src/default_numeric_fallback.rs:128 — NumericFallbackVisitor::visit_expr has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FloatLiteral · ×1
  • FloatLiteral::check_expr (cyclomatic 20) clippy_lints/src/float_literal.rs:78 — FloatLiteral::check_expr has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DecimalLiteralRepresentation · ×1
  • DecimalLiteralRepresentation::do_lint (cyclomatic 20) clippy_lints/src/literal_representation.rs:451 — DecimalLiteralRepresentation::do_lint has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · OnlyUsedInRecursion · ×1
  • OnlyUsedInRecursion::check_expr (cyclomatic 20) clippy_lints/src/only_used_in_recursion.rs:365 — OnlyUsedInRecursion::check_expr has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PassByRefOrValue · ×1
  • PassByRefOrValue::check_poly_fn (cyclomatic 20) clippy_lints/src/pass_by_ref_or_value.rs:128 — PassByRefOrValue::check_poly_fn has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SingleComponentPathImports · ×1
  • SingleComponentPathImports::track_uses (cyclomatic 20) clippy_lints/src/single_component_path_imports.rs:171 — SingleComponentPathImports::track_uses has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VecPushSearcher · ×1
  • VecPushSearcher::display_err (cyclomatic 20) clippy_lints/src/vec_init_then_push.rs:64 — VecPushSearcher::display_err has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · WaitFinder · ×1
  • WaitFinder::visit_expr (cyclomatic 20) clippy_lints/src/zombie_processes.rs:161 — WaitFinder::visit_expr has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LiteralDigitGrouping · ×1
  • LiteralDigitGrouping::check_for_mistyped_suffix (cyclomatic 19) clippy_lints/src/literal_representation.rs:278 — LiteralDigitGrouping::check_for_mistyped_suffix has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NeedlessPassByRefMut · ×1
  • NeedlessPassByRefMut::check_fn (cyclomatic 19) clippy_lints/src/needless_pass_by_ref_mut.rs:124 — NeedlessPassByRefMut::check_fn has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PostExpansionEarlyAttributes · ×1
  • PostExpansionEarlyAttributes::check_attribute (cyclomatic 18) clippy_lints/src/attrs/mod.rs:660 — PostExpansionEarlyAttributes::check_attribute has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Default · ×1
  • Default::check_block (cyclomatic 18) clippy_lints/src/default.rs:111 — Default::check_block has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InsertSearcher · ×1
  • InsertSearcher::visit_expr (cyclomatic 18) clippy_lints/src/entry.rs:491 — InsertSearcher::visit_expr has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · UselessFormat · ×1
  • UselessFormat::check_expr (cyclomatic 18) clippy_lints/src/format.rs:55 — UselessFormat::check_expr has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Loops · ×1
  • Loops::check_expr (cyclomatic 18) clippy_lints/src/loops/mod.rs:859 — Loops::check_expr has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InitializeVisitor · ×1
  • InitializeVisitor::visit_expr (cyclomatic 18) clippy_lints/src/loops/utils.rs:173 — InitializeVisitor::visit_expr has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManualOptionAsSlice · ×1
  • ManualOptionAsSlice::check_expr (cyclomatic 18) clippy_lints/src/manual_option_as_slice.rs:55 — ManualOptionAsSlice::check_expr has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · OffendingFilterExpr · ×1
  • OffendingFilterExpr::check_map_call (cyclomatic 18) clippy_lints/src/methods/filter_map.rs:109 — OffendingFilterExpr::check_map_call has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NewWithoutDefault · ×1
  • NewWithoutDefault::check_item (cyclomatic 18) clippy_lints/src/new_without_default.rs:61 — NewWithoutDefault::check_item has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SimilarNamesNameVisitor · ×1
  • SimilarNamesNameVisitor::check_ident (cyclomatic 18) clippy_lints/src/non_expressive_names.rs:222 — SimilarNamesNameVisitor::check_ident has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NonminimalBoolVisitor · ×1
  • NonminimalBoolVisitor::bool_expr (cyclomatic 17) clippy_lints/src/booleans.rs:537 — NonminimalBoolVisitor::bool_expr has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Documentation · ×1
  • Documentation::check_attributes (cyclomatic 17) clippy_lints/src/doc/mod.rs:753 — Documentation::check_attributes has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · LenZero · ×1
  • LenZero::check_expr (cyclomatic 17) clippy_lints/src/len_zero.rs:103 — LenZero::check_expr has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NeedlessLateInit · ×1
  • NeedlessLateInit::check_if_or_match (cyclomatic 17) clippy_lints/src/needless_late_init.rs:81 — NeedlessLateInit::check_if_or_match has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Constant · ×1
  • Constant::partial_cmp (cyclomatic 17) clippy_utils/src/consts.rs:218 — Constant::partial_cmp has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NoEffect · ×1
  • NoEffect::check_no_effect (cyclomatic 16) clippy_lints/src/no_effect.rs:121 — NoEffect::check_no_effect has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PanicUnimplemented · ×1
  • PanicUnimplemented::check_expr (cyclomatic 16) clippy_lints/src/panic_unimplemented.rs:107 — PanicUnimplemented::check_expr has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QuestionMark · ×1
  • QuestionMark::check_manual_let_else (cyclomatic 16) clippy_lints/src/manual_let_else.rs:52 — QuestionMark::check_manual_let_else has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnnecessaryWraps · ×1
  • UnnecessaryWraps::check_fn (cyclomatic 16) clippy_lints/src/unnecessary_wraps.rs:77 — UnnecessaryWraps::check_fn has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WildcardImports · ×1
  • WildcardImports::check_use_tree (cyclomatic 16) clippy_lints/src/wildcard_imports.rs:140 — WildcardImports::check_use_tree has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CrateWithSource · ×1
  • CrateWithSource::download_and_extract (cyclomatic 16) lintcheck/src/input.rs:182 — CrateWithSource::download_and_extract has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Crate · ×1
  • Crate::run_clippy_lints (cyclomatic 16) lintcheck/src/main.rs:68 — Crate::run_clippy_lints has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Methods · ×1
  • Methods::check_methods (cognitive 166) clippy_lints/src/methods/mod.rs:5439 — Methods::check_methods has cognitive complexity 166 (threshold 15). Drivers by points: if/else 36 (101 pts), match/switch 19 (59 pts), boolean chains 6 (nesting depth added 105). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UselessConversion · ×1
  • UselessConversion::check_expr (cognitive 83) clippy_lints/src/useless_conversion.rs:158 — UselessConversion::check_expr has cognitive complexity 83 (threshold 15). Drivers by points: if/else 25 (63 pts), boolean chains 15, match/switch 2 (5 pts) (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IndexingSlicing · ×1
  • IndexingSlicing::check_expr (cognitive 68) clippy_lints/src/indexing_slicing.rs:111 — IndexingSlicing::check_expr has cognitive complexity 68 (threshold 15). Drivers by points: if/else 18 (58 pts), boolean chains 7, match/switch 1 (3 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DerefDelegate · ×1
  • DerefDelegate::borrow (cognitive 67) clippy_utils/src/sugg.rs:937 — DerefDelegate::borrow has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (47 pts), match/switch 3 (11 pts), loops 1 (5 pts), boolean chains 4 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Matches · ×1
  • Matches::check_expr (cognitive 63) clippy_lints/src/matches/mod.rs:1055 — Matches::check_expr has cognitive complexity 63 (threshold 15). Drivers by points: if/else 22 (51 pts), boolean chains 8, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SingleComponentPathImports · ×1
  • SingleComponentPathImports::track_uses (cognitive 49) clippy_lints/src/single_component_path_imports.rs:171 — SingleComponentPathImports::track_uses has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 2 (8 pts), boolean chains 2, match/switch 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NewWithoutDefault · ×1
  • NewWithoutDefault::check_item (cognitive 47) clippy_lints/src/new_without_default.rs:61 — NewWithoutDefault::check_item has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 4 (12 pts), boolean chains 3 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Default · ×1
  • Default::check_block (cognitive 44) clippy_lints/src/default.rs:111 — Default::check_block has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 5, loops 2 (3 pts), match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IterFunctionVisitor · ×1
  • IterFunctionVisitor::visit_expr (cognitive 43) clippy_lints/src/methods/needless_collect.rs:512 — IterFunctionVisitor::visit_expr has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (29 pts), match/switch 2 (9 pts), boolean chains 5 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · InitializeVisitor · ×1
  • InitializeVisitor::visit_expr (cognitive 39) clippy_lints/src/loops/utils.rs:173 — InitializeVisitor::visit_expr has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 2 (8 pts), boolean chains 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Types · ×1
  • Types::check_ty (cognitive 39) clippy_lints/src/types/mod.rs:575 — Types::check_ty has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (12 pts), match/switch 5 (9 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StmtsChecker · ×1
  • StmtsChecker::visit_expr (cognitive 38) clippy_lints/src/significant_drop_tightening.rs:270 — StmtsChecker::visit_expr has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (33 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PeekableVisitor · ×1
  • PeekableVisitor::visit_expr (cognitive 38) clippy_lints/src/unused_peekable.rs:118 — PeekableVisitor::visit_expr has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 3 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PassByRefOrValue · ×1
  • PassByRefOrValue::check_poly_fn (cognitive 37) clippy_lints/src/pass_by_ref_or_value.rs:128 — PassByRefOrValue::check_poly_fn has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 4 (11 pts), boolean chains 6, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NonminimalBoolVisitor · ×1
  • NonminimalBoolVisitor::bool_expr (cognitive 36) clippy_lints/src/booleans.rs:537 — NonminimalBoolVisitor::bool_expr has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (7 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NumericFallbackVisitor · ×1
  • NumericFallbackVisitor::visit_expr (cognitive 36) clippy_lints/src/default_numeric_fallback.rs:128 — NumericFallbackVisitor::visit_expr has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (12 pts), boolean chains 2, match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UselessFormat · ×1
  • UselessFormat::check_expr (cognitive 35) clippy_lints/src/format.rs:55 — UselessFormat::check_expr has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 3 (9 pts), boolean chains 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NormalizedPat · ×1
  • NormalizedPat::from_pat (cognitive 34) clippy_lints/src/matches/match_same_arms.rs:263 — NormalizedPat::from_pat has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 13 (29 pts), if/else 3 (5 pts) (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NoEffect · ×1
  • NoEffect::check_no_effect (cognitive 33) clippy_lints/src/no_effect.rs:121 — NoEffect::check_no_effect has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WildcardImports · ×1
  • WildcardImports::check_use_tree (cognitive 31) clippy_lints/src/wildcard_imports.rs:140 — WildcardImports::check_use_tree has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultipleInherentImpl · ×1
  • MultipleInherentImpl::check_crate_post (cognitive 30) clippy_lints/src/inherent_impl.rs:71 — MultipleInherentImpl::check_crate_post has cognitive complexity 30 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 3 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FloatLiteral · ×1
  • FloatLiteral::check_expr (cognitive 28) clippy_lints/src/float_literal.rs:78 — FloatLiteral::check_expr has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FormatArgsExpr · ×1
  • FormatArgsExpr::check_templates (cognitive 28) clippy_lints/src/format_args.rs:430 — FormatArgsExpr::check_templates has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (19 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MacroUseImports · ×1
  • MacroUseImports::check_crate_post (cognitive 28) clippy_lints/src/macro_use.rs:136 — MacroUseImports::check_crate_post has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TupleArrayConversions · ×1
  • TupleArrayConversions::check_expr (cognitive 28) clippy_lints/src/tuple_array_conversions.rs:64 — TupleArrayConversions::check_expr has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 10, match/switch 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OffendingFilterExpr · ×1
  • OffendingFilterExpr::check_map_call (cognitive 27) clippy_lints/src/methods/filter_map.rs:109 — OffendingFilterExpr::check_map_call has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (8 pts), boolean chains 7 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WaitFinder · ×1
  • WaitFinder::visit_expr (cognitive 27) clippy_lints/src/zombie_processes.rs:161 — WaitFinder::visit_expr has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QuestionMark · ×1
  • QuestionMark::check_manual_let_else (cognitive 26) clippy_lints/src/manual_let_else.rs:52 — QuestionMark::check_manual_let_else has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SuggestContext · ×1
  • SuggestContext::recurse (cognitive 25) clippy_lints/src/booleans.rs:337 — SuggestContext::recurse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · OnlyUsedInRecursion · ×1
  • OnlyUsedInRecursion::check_expr (cognitive 25) clippy_lints/src/only_used_in_recursion.rs:365 — OnlyUsedInRecursion::check_expr has cognitive complexity 25 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 2 (7 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnnecessaryWraps · ×1
  • UnnecessaryWraps::check_fn (cognitive 25) clippy_lints/src/unnecessary_wraps.rs:77 — UnnecessaryWraps::check_fn has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UselessVec · ×1
  • UselessVec::check_expr (cognitive 25) clippy_lints/src/useless_vec.rs:173 — UselessVec::check_expr has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 2 (5 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AlmostStandardFormulation · ×1
  • AlmostStandardFormulation::check_item (cognitive 25) clippy_lints_internal/src/almost_standard_lint_formulation.rs:48 — AlmostStandardFormulation::check_item has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (8 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LargeStackFrames · ×1
  • LargeStackFrames::check_fn (cognitive 24) clippy_lints/src/large_stack_frames.rs:139 — LargeStackFrames::check_fn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Loops · ×1
  • Loops::check_expr (cognitive 24) clippy_lints/src/loops/mod.rs:859 — Loops::check_expr has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MissingConstForFn · ×1
  • MissingConstForFn::check_fn (cognitive 24) clippy_lints/src/missing_const_for_fn.rs:89 — MissingConstForFn::check_fn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 7, match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LegacyNumericConstants · ×1
  • LegacyNumericConstants::check_use_tree (cognitive 23) clippy_lints/src/legacy_numeric_constants.rs:47 — LegacyNumericConstants::check_use_tree has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DecimalLiteralRepresentation · ×1
  • DecimalLiteralRepresentation::do_lint (cognitive 23) clippy_lints/src/literal_representation.rs:451 — DecimalLiteralRepresentation::do_lint has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, if/else 6 (9 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NonCanonicalImpls · ×1
  • NonCanonicalImpls::check_item (cognitive 23) clippy_lints/src/non_canonical_impls.rs:150 — NonCanonicalImpls::check_item has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 1 (4 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NonSendFieldInSendTy · ×1
  • NonSendFieldInSendTy::check_item (cognitive 23) clippy_lints/src/non_send_fields_in_send_ty.rs:72 — NonSendFieldInSendTy::check_item has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (8 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnwrappableVariablesVisitor · ×1
  • UnwrappableVariablesVisitor::visit_expr (cognitive 23) clippy_lints/src/unwrap.rs:429 — UnwrappableVariablesVisitor::visit_expr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisallowedItems · ×1
  • DisallowedItems::check_pat (cognitive 22) clippy_lints/src/disallowed_items.rs:309 — DisallowedItems::check_pat has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LargeEnumVariant · ×1
  • LargeEnumVariant::check_item (cognitive 22) clippy_lints/src/large_enum_variant.rs:75 — LargeEnumVariant::check_item has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CrateWithSource · ×1
  • CrateWithSource::download_and_extract (cognitive 22) lintcheck/src/input.rs:182 — CrateWithSource::download_and_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · clippy · ×1
  • clippy::driver::main (cognitive 22) src/driver.rs:196 — clippy::driver::main has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 9, match/switch 2 (3 pts) (nesting depth added 1). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PostExpansionEarlyAttributes · ×1
  • PostExpansionEarlyAttributes::check_attribute (cognitive 21) clippy_lints/src/attrs/mod.rs:660 — PostExpansionEarlyAttributes::check_attribute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Casts · ×1
  • Casts::check_expr (cognitive 21) clippy_lints/src/casts/mod.rs:890 — Casts::check_expr has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InsertSearcher · ×1
  • InsertSearcher::visit_expr (cognitive 21) clippy_lints/src/entry.rs:491 — InsertSearcher::visit_expr has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (3 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToDigitIsSome · ×1
  • ToDigitIsSome::check_expr (cognitive 21) clippy_lints/src/to_digit_is_some.rs:50 — ToDigitIsSome::check_expr has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PossibleBorrowerVisitor · ×1
  • PossibleBorrowerVisitor::visit_terminator (cognitive 21) clippy_utils/src/mir/possible_borrower.rs:89 — PossibleBorrowerVisitor::visit_terminator has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (8 pts), match/switch 1 (3 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ManualStrip · ×1
  • ManualStrip::check_expr (cognitive 20) clippy_lints/src/manual_strip.rs:70 — ManualStrip::check_expr has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (5 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TraitBounds · ×1
  • TraitBounds::check_trait_item (cognitive 20) clippy_lints/src/trait_bounds.rs:126 — TraitBounds::check_trait_item has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Crate · ×1
  • Crate::run_clippy_lints (cognitive 20) lintcheck/src/main.rs:68 — Crate::run_clippy_lints has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (16 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ParseCxImpl · ×1
  • ParseCxImpl::parse_lint_src_file (cognitive 19) clippy_dev/src/parse.rs:230 — ParseCxImpl::parse_lint_src_file has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Hir2Qmm · ×1
  • Hir2Qmm::run (cognitive 19) clippy_lints/src/booleans.rs:261 — Hir2Qmm::run has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 6 (8 pts), boolean chains 1, loops 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · IfThenSomeElseNone · ×1
  • IfThenSomeElseNone::check_expr (cognitive 19) clippy_lints/src/if_then_some_else_none.rs:65 — IfThenSomeElseNone::check_expr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IncrementVisitor · ×1
  • IncrementVisitor::visit_expr (cognitive 19) clippy_lints/src/loops/utils.rs:60 — IncrementVisitor::visit_expr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModStyle · ×1
  • ModStyle::check_item (cognitive 19) clippy_lints/src/module_style.rs:138 — ModStyle::check_item has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EmptyLineAfter · ×1
  • EmptyLineAfter::check_gaps (cognitive 18) clippy_lints/src/empty_line_after.rs:341 — EmptyLineAfter::check_gaps has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 3 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanicUnimplemented · ×1
  • PanicUnimplemented::check_expr (cognitive 18) clippy_lints/src/panic_unimplemented.rs:107 — PanicUnimplemented::check_expr has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VecPushSearcher · ×1
  • VecPushSearcher::display_err (cognitive 18) clippy_lints/src/vec_init_then_push.rs:64 — VecPushSearcher::display_err has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 1 (2 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SourceItemOrderingModuleItemGroupings · ×1
  • SourceItemOrderingModuleItemGroupings::deserialize (cognitive 17) clippy_config/src/types.rs:552 — SourceItemOrderingModuleItemGroupings::deserialize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PatState · ×1
  • PatState::add_struct_pats (cognitive 17) clippy_lints/src/matches/single_match.rs:304 — PatState::add_struct_pats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MinIdentChars · ×1
  • MinIdentChars::check_impl_item (cognitive 17) clippy_lints/src/min_ident_chars.rs:193 — MinIdentChars::check_impl_item has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PrintVisitor · ×1
  • PrintVisitor::expr (cognitive 17) clippy_lints/src/utils/author.rs:435 — PrintVisitor::expr has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 4 (5 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Documentation · ×1
  • Documentation::check_attributes (cognitive 16) clippy_lints/src/doc/mod.rs:753 — Documentation::check_attributes has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (8 pts), if/else 3 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FromStrRadix10 · ×1
  • FromStrRadix10::check_expr (cognitive 16) clippy_lints/src/from_str_radix_10.rs:61 — FromStrRadix10::check_expr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InconsistentStructConstructor · ×1
  • InconsistentStructConstructor::check_expr (cognitive 16) clippy_lints/src/inconsistent_struct_constructor.rs:84 — InconsistentStructConstructor::check_expr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LoopVisitor · ×1
  • LoopVisitor::visit_expr (cognitive 16) clippy_lints/src/loops/infinite_loop.rs:164 — LoopVisitor::visit_expr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MutMut · ×1
  • MutMut::check_expr (cognitive 16) clippy_lints/src/mut_mut.rs:48 — MutMut::check_expr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RawStrings · ×1
  • RawStrings::check_raw_string (cognitive 16) clippy_lints/src/raw_strings.rs:107 — RawStrings::check_raw_string has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReadVecVisitor · ×1
  • ReadVecVisitor::visit_expr (cognitive 16) clippy_lints/src/read_zero_byte_vec.rs:153 — ReadVecVisitor::visit_expr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NumericLiteral · ×1
  • NumericLiteral::split_digit_parts (cognitive 16) clippy_utils/src/numeric_literal.rs:117 — NumericLiteral::split_digit_parts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · TooManyMethods · ×1
  • TooManyMethods: HirEqInterExpr clippy_utils/src/hir_utils.rs:153 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · TooManyFunctions · ×1
  • TooManyFunctions: clippy_utils::source clippy_utils/src/source.rs:240 — TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (56 shared lines) · ×1
  • Near-duplicate member pair (56 shared lines) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:266 — clippy_lints_internal/src/repeated_is_diagnostic_item.rs:266-330 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:332-396 — These two members are variants of one another: 56 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) clippy_lints/src/arbitrary_source_item_ordering.rs:281 — clippy_lints/src/arbitrary_source_item_ordering.rs:281-305 | clippy_lints/src/arbitrary_source_item_ordering.rs:311-339 | clippy_lints/src/arbitrary_source_item_ordering.rs:345-392 | clippy_lints/src/arbitrary_source_item_ordering.rs:396-487 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (38–39 lines × 2) · ×1
  • Duplicated block (38–39 lines × 2) clippy_utils/src/ast_utils/mod.rs:333 — clippy_utils/src/ast_utils/mod.rs:333-371 | clippy_utils/src/ast_utils/mod.rs:599-636 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (29–30 lines × 3) · ×1
  • Duplicated block (29–30 lines × 3) clippy_utils/src/ast_utils/mod.rs:358 — clippy_utils/src/ast_utils/mod.rs:358-386 | clippy_utils/src/ast_utils/mod.rs:537-566 | clippy_utils/src/ast_utils/mod.rs:623-652 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (27–28 lines × 2) · ×1
  • Duplicated block (27–28 lines × 2) clippy_lints/src/legacy_numeric_constants.rs:212 — clippy_lints/src/legacy_numeric_constants.rs:212-238 | clippy_utils/src/consts.rs:830-857 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) clippy_lints/src/reserve_after_initialization.rs:75 — clippy_lints/src/reserve_after_initialization.rs:75-97 | clippy_lints/src/reserve_after_initialization.rs:104-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:295 — clippy_lints_internal/src/repeated_is_diagnostic_item.rs:295-317 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:361-383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:267 — clippy_lints_internal/src/repeated_is_diagnostic_item.rs:267-287 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:333-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) clippy_lints/src/methods/clone_on_copy.rs:100 — clippy_lints/src/methods/clone_on_copy.rs:100-117 | clippy_lints/src/methods/clone_on_copy.rs:156-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) clippy_lints/src/functions/must_use.rs:36 — clippy_lints/src/functions/must_use.rs:36-49 | clippy_lints/src/functions/must_use.rs:72-85 | clippy_lints/src/functions/must_use.rs:109-122 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) clippy_lints/src/undocumented_unsafe_blocks.rs:127 — clippy_lints/src/undocumented_unsafe_blocks.rs:127-140 | clippy_lints/src/undocumented_unsafe_blocks.rs:361-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–13 lines × 2) · ×1
  • Duplicated block (10–13 lines × 2) clippy_lints/src/methods/option_zip_none.rs:61 — clippy_lints/src/methods/option_zip_none.rs:61-70 | clippy_lints/src/methods/option_zip_none.rs:75-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) clippy_lints/src/arbitrary_source_item_ordering.rs:312 — clippy_lints/src/arbitrary_source_item_ordering.rs:312-322 | clippy_lints/src/arbitrary_source_item_ordering.rs:346-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) clippy_lints/src/manual_pop_if.rs:275 — clippy_lints/src/manual_pop_if.rs:275-286 | clippy_lints/src/manual_pop_if.rs:328-337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) clippy_lints/src/operators/op_ref.rs:76 — clippy_lints/src/operators/op_ref.rs:76-85 | clippy_lints/src/operators/op_ref.rs:124-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) clippy_lints/src/arbitrary_source_item_ordering.rs:282 — clippy_lints/src/arbitrary_source_item_ordering.rs:282-289 | clippy_lints/src/arbitrary_source_item_ordering.rs:318-325 | clippy_lints/src/arbitrary_source_item_ordering.rs:353-360 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) clippy_lints/src/arbitrary_source_item_ordering.rs:285 — clippy_lints/src/arbitrary_source_item_ordering.rs:285-291 | clippy_lints/src/arbitrary_source_item_ordering.rs:321-327 | clippy_lints/src/arbitrary_source_item_ordering.rs:356-362 | clippy_lints/src/arbitrary_source_item_ordering.rs:452-458 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) clippy_lints/src/missing_doc.rs:167 — clippy_lints/src/missing_doc.rs:167-173 | clippy_lints/src/missing_doc.rs:201-207 | clippy_lints/src/missing_doc.rs:222-228 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) clippy_lints/src/loops/manual_slice_fill.rs:75 — clippy_lints/src/loops/manual_slice_fill.rs:75-81 | clippy_lints/src/loops/manual_slice_fill.rs:92-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) clippy_lints/src/manual_retain.rs:89 — clippy_lints/src/manual_retain.rs:89-93 | clippy_lints/src/manual_retain.rs:136-140 | clippy_lints/src/manual_retain.rs:193-195 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: TraitBounds (LCOM4 4) clippy_lints/src/trait_bounds.rs:94 — TraitBounds's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging call was found in the 830 Python, JavaScript/TypeScript, Rust production file(s) this check read across 13 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; Rust: the log and tracing crates (info!/warn!/error!, #[instrument]), slog, env_logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
Minor — 27 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×11
  • Duplicated predicate clippy_lints/src/floating_point_arithmetic/log_base.rs:22 — `F32(f32_consts::E) == value || F64(f64_consts::E) == value` appears character-identically in 2 files — clippy_lints/src/floating_point_arithmetic/log_base.rs, clippy_lints/src/floating_point_arithmetic/powf.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clippy_lints/src/matches/manual_filter.rs:169 — `arms && first_arm.guard.is_none() && second_arm.guard.is_none()` appears character-identically in 2 files — clippy_lints/src/matches/manual_filter.rs, clippy_lints/src/option_if_let_else.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clippy_lints/src/extra_unused_type_parameters.rs:169 — `explicit_params.get(idx + 1) && end != Some(next.def_id)` appears character-identically in 2 files — clippy_lints/src/extra_unused_type_parameters.rs, clippy_lints/src/lifetimes.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clippy_lints/src/len_zero.rs:151 — `expr.kind && !expr.span.from_expansion()` appears character-identically in 2 files — clippy_lints/src/len_zero.rs, clippy_lints/src/single_range_in_vec_init.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clippy_lints/src/pathbuf_init_then_push.rs:177 — `expr.kind && self_arg.res_local_id() == Some(searcher.local_id) && name.ident.name == sym::push` appears character-identically in 2 files — clippy_lints/src/pathbuf_init_then_push.rs, clippy_lints/src/vec_init_then_push.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clippy_lints/src/needless_pass_by_ref_mut.rs:149 — `header.abi != ExternAbi::Rust || requires_exact_signature(attrs)` appears character-identically in 2 files — clippy_lints/src/needless_pass_by_ref_mut.rs, clippy_lints/src/needless_pass_by_value.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clippy_lints/src/pass_by_ref_or_value.rs:129 — `self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(def_id)` appears character-identically in 3 files — clippy_lints/src/pass_by_ref_or_value.rs, clippy_lints/src/unnecessary_box_returns.rs, clippy_lints/src/unnecessary_wraps.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clippy_lints/src/needless_pass_by_ref_mut.rs:137 — `self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(fn_def_id)` appears character-identically in 2 files — clippy_lints/src/needless_pass_by_ref_mut.rs, clippy_lints/src/single_call_fn.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clippy_lints/src/operators/arithmetic_side_effects.rs:302 — `self.const_span && span.contains(body_span)` appears character-identically in 2 files — clippy_lints/src/operators/arithmetic_side_effects.rs, clippy_lints/src/operators/numeric_arithmetic.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clippy_lints/src/assert_is_empty.rs:229 — `ty.is_str() || ty.is_lang_item(cx, LangItem::String)` appears character-identically in 3 files — clippy_lints/src/assert_is_empty.rs, clippy_lints/src/methods/manual_str_repeat.rs, clippy_lints/src/methods/no_effect_replace.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clippy_lints/src/casts/cast_possible_wrap.rs:99 — `utils::is_signedness_cast(cast_from, cast_to) && msrv.meets(cx, msrvs::INTEGER_SIGN_CAST)` appears character-identically in 2 files — clippy_lints/src/casts/cast_possible_wrap.rs, clippy_lints/src/casts/cast_sign_loss.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D34 · Knowledge Freshness · Orphaned file · ×3
  • Orphaned file clippy_utils/src/numeric_literal.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clippy_lints/src/rc_clone_in_vec_init.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clippy_lints/src/unit_types/mod.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 3 significant file(s) lose their only recent owner: clippy_dev/src/parse.rs, clippy_dev/src/edit_lints.rs, clippy_dev/src/parse/cursor.rs. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (5 single-owned of 592 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 592 of the 815 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: clippy_lints/src/attrs/deprecated_attributes_without_fields.rs, clippy_lints/src/methods/filter_next.rs.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. The recognised ADR directories in this tree were read — `book/src/development/proposals` — and none of their files is a decision record (a README, index or template page does not count). What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 10 project(s) overshoot their size bounds, lowering Project Cohesion to 8.0/10. The most over is `clippy_lints` (124927 LoC, 782 module-visible types across 21 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 3 of 592 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 592 of the 815 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: clippy_utils/src/numeric_literal.rs, clippy_lints/src/rc_clone_in_vec_init.rs, clippy_lints/src/unit_types/mod.rs. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D9 · Test Distribution · Inverted test pyramid · ×1
  • Inverted test pyramid — Only 28 % of tests are unit tests (49 unit vs 125 integration, 0 BDD); a broader unit base gives faster, more localised feedback.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
X7 · Silent fallback defaults · Silent fallback default on Err · ×1
  • Silent fallback default on Err lintcheck/src/main.rs:46 — `target_dir` turns every `Err` into `"target".to_owned()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-dd8493ef97f44827a30d7e446345817f/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-dd8493ef97f44827a30d7e446345817f/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .32artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a17b0c-a9d1-7a0b-97b0-e0b653d7cf3f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md