Public report of rust-lang/cargo, published 14 November 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.11.4). 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, 14 November 2026, 15:18 UTC Β· Survey ID cd_81d86bad6bb640578c09af7644f98651

rust-lang/cargo

Measured 14 November 2026, 15:15 UTC, at code version 8baa927

CAI score 67out of 100 Strong
CriticalWeakAdequateStrongExemplary
Down 1 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: 120,206 lines of product code in 24 projects, tests not counted Β· Estimated rebuild effort: about 2.6 person-years Β· Weakest lens: Code Health, 60

Findings by how serious they are

6 critical 707 serious 130 minor

15 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look 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

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 15:15 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 the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work 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 β–Έ

50of 50 dimensions measured by tools.
782of 843 findings point to an exact file and line, so you can open each one in the code. The other 61 concern the repository as a whole, such as missing documentation.
50dimensions across 7 lenses, read from 120,206 lines of product code in 24 projects.
Chapters

Executive summary

rust-lang/cargo meets our standard for a preview release. It scores 67 out of 100 and is rated Strong, and none of its six critical findings concern security.

Code Health, at 60, is the weakest lens and counts most in the score. The best first step for the work it takes is recording design decisions, worth about 3 points. Writing log messages as searchable templates would lift Code Health itself, worth about 5 points. Raising Code Health to 67 would lift the score to about 70.

Four parts of the code are no longer understood by anyone working on it. One set of files in separate parts keeps changing together, which points to a hidden dependency. Having someone learn the forgotten files and making the hidden dependencies explicit would close both risks. Moving the write out of the read operation would take care of the read operation that also writes data.

The product code is 120,206 lines, about €380,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.
Code Health 60 Β· counts for 46%Maturity 66 Β· counts for 25%Production Readiness 66 Β· counts for 14%Security and Compliance 82 Β· counts for 8%Performance 94 Β· counts for 4%Architecture 97 Β· counts for 2%Domain Modelling 100 Β· counts for 1%

If Code Health rose from 60 to 67, the lowest score rated Strong, the score would rise from 67 to about 70.

Code composition: what the lines of code are
Product code 38%Tests 62%
New since the last survey: 111 findings

These 111 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cognitive Complexity Β· ConfigValue::merge_helper (cognitive 20) crates/cargo-util-config/src/config_value.rs
  • Cognitive Complexity Β· ConfigMapAccess::new_struct (cognitive 16) crates/cargo-util-config/src/de.rs
  • God Classes Β· FileTooLong: src/schema.rs crates/cargo-util-config/src/schema.rs
  • Code Duplication Β· Near-duplicate member family (4 members, 15 shared lines) src/diagnostics/rules/non_kebab_case_features.rs
  • Code Duplication Β· Near-duplicate member pair (69 shared lines) crates/mdman/src/format/man.rs
  • Code Duplication Β· Near-duplicate member pair (43 shared lines) src/diagnostics/rules/text_direction_codepoint_in_comment.rs
  • Code Duplication Β· Edited copy of a member (55 corresponding lines) src/diagnostics/rules/manual_readme.rs
  • Code Duplication Β· Edited copy of a member (48 corresponding lines) src/ops/cargo_update.rs
  • Code Duplication Β· Edited copy of a member (47 corresponding lines) src/workspace/features.rs
  • Code Duplication Β· Edited copy of a member (40 corresponding lines) src/compiler/compilation.rs
  • Code Duplication Β· Edited copy of a member (60 corresponding lines) src/workspace/parser/targets.rs
  • Code Duplication Β· Edited copy of a member (31 corresponding lines) src/ops/cargo_vendor.rs
  • Code Duplication Β· Edited copy of a member (29 corresponding lines) src/util/network/http.rs
  • Code Duplication Β· Edited copy of a member (36 corresponding lines) src/diagnostics/rules/missing_lints_features.rs
  • Code Duplication Β· Edited copy of a member (38 corresponding lines) src/bin/cargo/commands/package.rs
  • Code Duplication Β· Edited copies of one member (3 members, 21+ corresponding lines) src/workspace/global_cache_tracker.rs
  • Code Duplication Β· Edited copy of a member (42 corresponding lines) crates/cargo-util-schemas/src/restricted_names.rs
  • Code Duplication Β· Edited copy of a member (54 corresponding lines) src/bin/cargo/commands/bench.rs
  • Code Duplication Β· Edited copies of one member (3 members, 22+ corresponding lines) crates/cargo-util-config/src/schema.rs
  • Code Duplication Β· Edited copy of a member (22 corresponding lines) src/sources/git/oxide.rs
  • Code Duplication Β· Edited copy of a member (25 corresponding lines) src/bin/cargo/commands/doc.rs
  • Code Duplication Β· Edited copy of a member (21 corresponding lines) src/workspace/parser/mod.rs
  • Code Duplication Β· Edited copy of a member (20 corresponding lines) src/workspace/global_cache_tracker.rs
  • Code Duplication Β· Edited copies of one member (3 members, 18+ corresponding lines) src/util/command_prelude.rs
  • Code Duplication Β· Edited copy of a member (18 corresponding lines) src/workspace/editor/manifest.rs
  • Code Duplication Β· Edited copies of one member (3 members, 17+ corresponding lines) src/workspace/parser/targets.rs
  • Code Duplication Β· Edited copy of a member (15 corresponding lines) crates/home/src/env.rs
  • Code Duplication Β· Edited copy of a member (17 corresponding lines) src/compiler/timings/mod.rs
  • Code Duplication Β· Edited copy of a member (21 corresponding lines) src/util/cache_lock.rs
  • Code Duplication Β· Edited copy of a member (18 corresponding lines) src/util/workspace.rs
  • Code Duplication Β· Edited copy of a member (16 corresponding lines) src/workspace/global_cache_tracker.rs
  • Code Duplication Β· Edited copy of a member (11 corresponding lines) crates/cargo-util-schemas/src/sbom.rs
  • Code Duplication Β· Edited copy of a member (21 corresponding lines) src/bin/cargo/commands/owner.rs
  • Code Duplication Β· Edited copy of a member (25 corresponding lines) src/util/semver_eval_ext.rs
  • Code Duplication Β· Edited copies of one member (5 members, 14+ corresponding lines) src/workspace/global_cache_tracker.rs
  • Code Duplication Β· Edited copy of a member (18 corresponding lines) src/bin/cargo/commands/add.rs
  • Code Duplication Β· Edited copy of a member (14 corresponding lines) src/workspace/workspace.rs
  • Code Duplication Β· Edited copy of a member (24 corresponding lines) credential/cargo-credential/src/stdio.rs
  • Code Duplication Β· Edited copy of a member (15 corresponding lines) src/diagnostics/rules/text_direction_codepoint_in_comment.rs
  • Code Duplication Β· Edited copies of one member (4 members, 9+ corresponding lines) src/util/flock.rs
  • Code Duplication Β· Edited copies of one member (3 members, 21+ corresponding lines) src/workspace/global_cache_tracker.rs
  • Code Duplication Β· Edited copy of a member (14 corresponding lines) src/sources/replaced.rs
  • Code Duplication Β· Edited copy of a member (12 corresponding lines) src/workspace/package_id.rs
  • Code Duplication Β· Edited copy of a member (13 corresponding lines) src/resolver/features.rs
  • Code Duplication Β· Edited copies of one member (4 members, 10+ corresponding lines) src/ops/common_for_install_and_uninstall.rs
  • Code Duplication Β· Edited copy of a member (12 corresponding lines) src/util/command_prelude.rs
  • Code Duplication Β· Edited copy of a member (10 corresponding lines) crates/rustfix/src/lib.rs
  • Code Duplication Β· Edited copy of a member (18 corresponding lines) src/util/cache_lock.rs
  • Code Duplication Β· Edited copy of a member (6 corresponding lines) crates/crates-io/lib.rs
  • Code Duplication Β· Edited copy of a member (14 corresponding lines) src/workspace/global_cache_tracker.rs
  • Code Duplication Β· Edited copy of a member (11 corresponding lines) crates/cargo-platform/src/cfg.rs
  • Code Duplication Β· Edited copy of a member (11 corresponding lines) src/compiler/compilation.rs
  • Code Duplication Β· Edited copy of a member (9 corresponding lines) src/workspace/parser/targets.rs
  • Code Duplication Β· Edited copy of a member (8 corresponding lines) src/util/semver_ext.rs
  • Code Duplication Β· Edited copy of a member (7 corresponding lines) src/util/flock.rs
  • Code Duplication Β· Edited copy of a member (8 corresponding lines) src/ops/common_for_install_and_uninstall.rs
  • Code Duplication Β· Edited copy of a member (16 corresponding lines) src/bin/cargo/commands/init.rs
  • Code Duplication Β· Edited copy of a member (9 corresponding lines) src/compiler/build_context/target_info.rs
  • Code Duplication Β· Edited copy of a member (14 corresponding lines) src/compiler/trim_paths.rs
  • Code Duplication Β· Edited copy of a member (7 corresponding lines) src/diagnostics/rules/min_opt_level_hint.rs
  • Code Duplication Β· Edited copy of a member (6 corresponding lines) crates/cargo-test-macro/src/lib.rs
  • Code Duplication Β· Edited copy of a member (6 corresponding lines) crates/cargo-util-schemas/src/manifest/mod.rs
  • Code Duplication Β· Edited copy of a member (4 corresponding lines) crates/cargo-test-support/src/compare.rs
  • Code Duplication Β· Edited copy of a member (9 corresponding lines) src/sources/registry/git_remote.rs
  • Code Duplication Β· Duplicated block (27 lines × 2) src/diagnostics/rules/missing_lints_features.rs
  • Code Duplication Β· Duplicated block (26 lines × 2) crates/mdman/src/format/man.rs
  • Code Duplication Β· Duplicated block (21 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs
  • Code Duplication Β· Duplicated block (16 lines × 2) src/ops/cargo_vendor.rs
  • Code Duplication Β· Duplicated block (15 lines × 2) src/diagnostics/rules/non_kebab_case_features.rs
  • Code Duplication Β· Duplicated block (15 lines × 2) src/ops/cargo_update.rs
  • Code Duplication Β· Duplicated block (12 lines × 2) src/bin/cargo/commands/add.rs
  • Code Duplication Β· Duplicated block (12 lines × 2) src/ops/cargo_update.rs
  • Code Duplication Β· Duplicated block (11 lines × 2) src/diagnostics/rules/non_kebab_case_features.rs
  • Code Duplication Β· Duplicated block (15–18 lines × 2) src/diagnostics/rules/unused_workspace_dependencies.rs
  • Code Duplication Β· Duplicated block (11 lines × 2) src/workspace/workspace.rs
  • Code Duplication Β· Duplicated block (10 lines × 2) src/diagnostics/rules/non_kebab_case_packages.rs
  • Code Duplication Β· Duplicated block (10 lines × 2) src/ops/cargo_package/vcs.rs
  • Code Duplication Β· Duplicated block (9 lines × 3) src/resolver/errors.rs
  • Code Duplication Β· Duplicated block (9 lines × 2) src/compiler/mod.rs
  • Code Duplication Β· Duplicated block (9 lines × 2) src/ops/cargo_add/mod.rs
  • Code Duplication Β· Duplicated block (7–8 lines × 4) src/diagnostics/rules/non_kebab_case_features.rs
  • Code Duplication Β· Duplicated block (8 lines × 3) src/ops/cargo_compile/packages.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/compiler/mod.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/diagnostics/rules/min_opt_level_hint.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/ops/cargo_update.rs
  • Code Duplication Β· Duplicated block (7 lines × 3) src/diagnostics/rules/manual_readme.rs
  • Code Duplication Β· Duplicated block (7 lines × 3) src/diagnostics/rules/non_kebab_case_bins.rs
  • Code Duplication Β· Duplicated block (6 lines × 4) src/ops/cargo_compile/packages.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/ops/cargo_vendor.rs
  • Code Duplication Β· Duplicated block (5 lines × 2) crates/cargo-util-config/src/schema.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) src/compiler/build_context/target_info.rs
  • Code Duplication Β· Duplicated block (11 lines × 2) src/bin/cargo/commands/package.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/diagnostics/rules/non_kebab_case_packages.rs
  • Code Duplication Β· Duplicated block (8 lines × 5) src/diagnostics/rules/non_kebab_case_features.rs
  • Code Duplication Β· Duplicated block (7 lines × 6) src/diagnostics/rules/non_kebab_case_features.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/ops/cargo_add/mod.rs
  • Code Duplication Β· Duplicated block (7 lines × 2) src/util/command_prelude.rs
  • Code Duplication Β· Duplicated block (5 lines × 2) src/diagnostics/report.rs

We compare 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: 56 findings

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

  • Cyclomatic Complexity Β· cargo::resolver::encode::into_resolve (cyclomatic 41) src/resolver/encode.rs
  • Cognitive Complexity Β· cargo::resolver::encode::into_resolve (cognitive 60) src/resolver/encode.rs
  • Cognitive Complexity Β· ConfigValue::merge_helper (cognitive 20) src/config/config_value.rs
  • Cognitive Complexity Β· Fingerprint::check_filesystem (cognitive 18) src/compiler/fingerprint/mod.rs
  • Cognitive Complexity Β· ConfigMapAccess::new_struct (cognitive 16) src/context/de.rs
  • Cognitive Complexity Β· cargo::ops::registry::cargo_search::search (cognitive 16) src/ops/registry/cargo_search.rs
  • God Classes Β· FunctionTooLong: cargo::resolver::encode::into_resolve src/resolver/encode.rs
  • Code Duplication Β· Near-duplicate member pair (69 shared lines) crates/mdman/src/format/man.rs
  • Code Duplication Β· Near-duplicate member pair (61 shared lines) src/diagnostics/rules/non_kebab_case_packages.rs
  • Code Duplication Β· Near-duplicate member pair (43 shared lines) src/diagnostics/rules/text_direction_codepoint_in_comment.rs
  • Code Duplication Β· Duplicated block (27 lines × 2) src/diagnostics/rules/missing_lints_features.rs
  • Code Duplication Β· Duplicated block (26 lines × 2) crates/mdman/src/format/man.rs
  • Code Duplication Β· Duplicated block (21 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs
  • Code Duplication Β· Duplicated block (16 lines × 2) src/ops/cargo_vendor.rs
  • Code Duplication Β· Duplicated block (15 lines × 2) src/diagnostics/rules/non_kebab_case_features.rs
  • Code Duplication Β· Duplicated block (12 lines × 2) src/ops/cargo_update.rs
  • Code Duplication Β· Duplicated block (11 lines × 2) src/diagnostics/rules/non_kebab_case_features.rs
  • Code Duplication Β· Duplicated block (8–11 lines × 2) src/diagnostics/rules/unused_workspace_dependencies.rs
  • Code Duplication Β· Duplicated block (10 lines × 2) src/bin/cargo/commands/add.rs
  • Code Duplication Β· Duplicated block (10 lines × 2) src/diagnostics/rules/non_kebab_case_packages.rs
  • Code Duplication Β· Duplicated block (10 lines × 2) src/ops/cargo_package/vcs.rs
  • Code Duplication Β· Duplicated block (9 lines × 3) src/resolver/errors.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/ops/cargo_compile/packages.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/ops/cargo_update.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/ops/cargo_update.rs
  • Code Duplication Β· Duplicated block (7 lines × 3) src/diagnostics/rules/manual_readme.rs
  • Code Duplication Β· Duplicated block (7 lines × 3) src/diagnostics/rules/non_kebab_case_bins.rs
  • Code Duplication Β· Duplicated block (7 lines × 2) src/resolver/encode.rs
  • Code Duplication Β· Duplicated block (6 lines × 3) src/ops/cargo_compile/packages.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) src/ops/cargo_vendor.rs
  • Code Duplication Β· Duplicated block (5 lines × 4) src/ops/cargo_compile/packages.rs
  • Code Duplication Β· Duplicated block (6 lines × 7) src/workspace/parser/mod.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/diagnostics/rules/manual_readme.rs
  • Code Duplication Β· Duplicated block (9 lines × 2) src/bin/cargo/commands/package.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/diagnostics/rules/non_kebab_case_packages.rs
  • Code Duplication Β· Duplicated block (8 lines × 2) src/ops/cargo_add/mod.rs
  • Code Duplication Β· Duplicated block (8 lines × 5) src/diagnostics/rules/non_kebab_case_features.rs
  • Code Duplication Β· Duplicated block (7 lines × 6) src/diagnostics/rules/non_kebab_case_features.rs
  • Code Duplication Β· Duplicated block (7 lines × 2) src/diagnostics/rules/unused_workspace_dependencies.rs
  • Code Duplication Β· Duplicated block (6 lines × 7) src/workspace/parser/mod.rs
  • Code Duplication Β· Duplicated block (6 lines × 2) src/diagnostics/rules/min_opt_level_hint.rs
  • Code Duplication Β· Duplicated block (5 lines × 2) src/diagnostics/report.rs
  • Churn × Complexity Hotspots Β· Hotspot: src/context/mod.rs src/context/mod.rs
  • Churn × Complexity Hotspots Β· Hotspot: src/ops/cargo_add/mod.rs src/ops/cargo_add/mod.rs
  • Churn × Complexity Hotspots Β· Hotspot: src/util/frontmatter.rs src/util/frontmatter.rs
  • Churn × Complexity Hotspots Β· Hotspot: src/workspace/registry.rs src/workspace/registry.rs
  • Churn × Complexity Hotspots Β· Hotspot: src/diagnostics/rules/blanket_hint_mostly_unused.rs src/diagnostics/rules/blanket_hint_mostly_unused.rs
  • Churn × Complexity Hotspots Β· Repeated repair: src/diagnostics/rules/manual_readme.rs src/diagnostics/rules/manual_readme.rs
  • Explicit Debt Β· TodoComment src/context/de.rs
  • Secrets (history) Β· Secret: aws-access-token REDACTED
  • Secrets (history) Β· Secret: aws-access-token REDACTED
  • Secrets (history) Β· Secret: aws-access-token REDACTED
  • Secrets (history) Β· Secret: aws-access-token REDACTED
  • Change Coupling Β· Change coupling: directory.rs ↔ mod.rs src/sources/directory.rs
Rebuild cost: about €380,000 Β· Estimate
Cost to rebuild€130,000 to €640,000, for 2,126 to 6,744 hours of work, about 2.6 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: 120,206 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: We price 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 β€” start with Cargo.toml.
Raises the score by about 3 points Β· Low effort Β· ADR Quality
2
Interpolated log message defeats structured logging
Raises the score by about 5 points Β· Medium effort Β· Structured logging
3
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 3 points Β· Medium effort Β· Architecture documentation

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 €380,000 to build again, about 2.6 person-years of work. Its weakest lens is Code Health, at 60 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health 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 3 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 7.1 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 43,846 lines over the last 90 days, which is about 177,820 lines a year. At that pace, the extra work comes to an estimated 9.7 to 59.3 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 our 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 build-rs build-rs cargo cargo cargo->build-rs cargo-credential cargo-credential cargo->cargo-credential cargo-credential-libsecret cargo-credential-libsecret cargo->cargo-credential-libsecret cargo-credential-macos-keychain cargo-credential-macos-keychain cargo->cargo-credential-macos-keychain cargo-credential-wincred cargo-credential-wincred cargo->cargo-credential-wincred cargo-platform cargo-platform cargo->cargo-platform cargo-util cargo-util cargo->cargo-util cargo-util-config cargo-util-config cargo->cargo-util-config cargo-util-schemas cargo-util-schemas cargo->cargo-util-schemas cargo-util-terminal cargo-util-terminal cargo->cargo-util-terminal crates-io crates-io cargo->crates-io rustfix rustfix cargo->rustfix cargo-credential-1password cargo-credential-1password cargo-credential-1password->cargo-credential cargo-credential-libsecret->cargo-credential cargo-credential-macos-keychain->cargo-credential cargo-credential-wincred->cargo-credential cargo-test-macro cargo-test-macro cargo-test-support cargo-test-support cargo-test-support->cargo-test-macro cargo-test-support->cargo-util cargo-test-support->crates-io cargo-util-config->cargo-credential cargo-util-config->cargo-util cargo-util-config->cargo-util-schemas cargo-util-config->cargo-util-terminal cargo-util-terminal->cargo-util home home mdman mdman semver-check semver-check xtask-bump-check xtask-bump-check xtask-bump-check->cargo-util xtask-bump-check->cargo-util-terminal __more__ +4 more projects

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.

325 modules, with 1091 dependencies between them. 5 loops run through 70 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 285 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 cargo_util.process_builder2 cargo_util_schemas.core.package_id_spec3 cargo_util_schemas.manifest4 cargo.util.flock5 cargo.util.interning6 cargo.workspace.features7 cargo_util_config.schema8 cargo.workspace.source_id9 cargo.workspace.package_id10 cargo.workspace.dependency11 cargo.sources.source12 cargo.workspace.summary13 cargo.resolver.resolve14 cargo.workspace.registry15 cargo.workspace.profiles16 cargo.compiler.unit_dependencies17 cargo.compiler.unit18 cargo.workspace.workspace19 cargo.workspace.package20 cargo.resolver.features21 cargo.ops.cargo_tree.graph22 cargo.ops.cargo_tree.format23 cargo.ops.cargo_tree24 cargo.workspace.manifest25 cargo.compiler.build_context.target_info26 cargo.compiler.build_context27 cargo.compiler.build_runner.compilation_files28 cargo.compiler.build_runner29 cargo.compiler.job_queue30 cargo.util.network.http_async31 cargo.ops.registry32 cargo.context33 cargo.compiler.compile_kind34 cargo.diagnostics.lint35 cargo.sources.path36 cargo.compiler.build_config37 cargo.diagnostics38 cargo.ops.cargo_package39 cargo.compiler40 cargo.ops.cargo_compile
1 cargo_util.process_builder
2 cargo_util_schemas.core.package_id_spec
3 cargo_util_schemas.manifest
4 cargo.util.flock112
5 cargo.util.interning1
6 cargo.workspace.features111
7 cargo_util_config.schema2
8 cargo.workspace.source_id131
9 cargo.workspace.package_id1221
10 cargo.workspace.dependency31311232
11 cargo.sources.source2111
12 cargo.workspace.summary412321
13 cargo.resolver.resolve1111
14 cargo.workspace.registry224321
15 cargo.workspace.profiles733212131123
16 cargo.compiler.unit_dependencies121254243121213
17 cargo.compiler.unit222212142
18 cargo.workspace.workspace313111211213
19 cargo.workspace.package1231231111121211
20 cargo.resolver.features2211121111
21 cargo.ops.cargo_tree.graph321113111
22 cargo.ops.cargo_tree.format4
23 cargo.ops.cargo_tree1131
24 cargo.workspace.manifest511511131211
25 cargo.compiler.build_context.target_info211111331
26 cargo.compiler.build_context111111111
27 cargo.compiler.build_runner.compilation_files21112221
28 cargo.compiler.build_runner1121
29 cargo.compiler.job_queue211222
30 cargo.util.network.http_async1
31 cargo.ops.registry12111
32 cargo.context132111
33 cargo.compiler.compile_kind1111
34 cargo.diagnostics.lint1321
35 cargo.sources.path3324131213
36 cargo.compiler.build_config11111
37 cargo.diagnostics2123
38 cargo.ops.cargo_package211123111231
39 cargo.compiler3134311411113
40 cargo.ops.cargo_compile11211411213
Uses a module listed above itPart of a loopThe module itself
1 cargo_util.process_builder2 cargo_util_schemas.core.package_id_spec3 cargo_util_schemas.manifest4 cargo.util.flock5 cargo.util.interning6 cargo.workspace.features7 cargo_util_config.schema8 cargo.workspace.source_id9 cargo.workspace.package_id10 cargo.workspace.dependency11 cargo.sources.source12 cargo.workspace.summary13 cargo.resolver.resolve14 cargo.workspace.registry15 cargo.workspace.profiles16 cargo.compiler.unit_dependencies17 cargo.compiler.unit18 cargo.workspace.workspace19 cargo.workspace.package20 cargo.resolver.features21 cargo.ops.cargo_tree.graph22 cargo.ops.cargo_tree.format23 cargo.ops.cargo_tree24 cargo.workspace.manifest25 cargo.compiler.build_context.target_info26 cargo.compiler.build_context27 cargo.compiler.build_runner.compilation_files28 cargo.compiler.build_runner29 cargo.compiler.job_queue30 cargo.util.network.http_async31 cargo.ops.registry32 cargo.context33 cargo.compiler.compile_kind34 cargo.diagnostics.lint35 cargo.sources.path36 cargo.compiler.build_config37 cargo.diagnostics38 cargo.ops.cargo_package39 cargo.compiler40 cargo.ops.cargo_compilecargo_util.process_builder1cargo_util_schemas.core.package_id_spec2cargo_util_schemas.manifest3cargo.util.flock4cargo.util.interning5cargo.workspace.features6cargo_util_config.schema7cargo.workspace.source_id8cargo.workspace.package_id9cargo.workspace.dependency10cargo.sources.source11cargo.workspace.summary12cargo.resolver.resolve13cargo.workspace.registry14cargo.workspace.profiles15cargo.compiler.unit_dependencies16cargo.compiler.unit17cargo.workspace.workspace18cargo.workspace.package19cargo.resolver.features20cargo.ops.cargo_tree.graph21cargo.ops.cargo_tree.format22cargo.ops.cargo_tree23cargo.workspace.manifest24cargo.compiler.build_context.target_info25cargo.compiler.build_context26cargo.compiler.build_runner.compilation_files27cargo.compiler.build_runner28cargo.compiler.job_queue29cargo.util.network.http_async30cargo.ops.registry31cargo.context32cargo.compiler.compile_kind33cargo.diagnostics.lint34cargo.sources.path35cargo.compiler.build_config36cargo.diagnostics37cargo.ops.cargo_package38cargo.compiler39cargo.ops.cargo_compile4011211112131122131311232211141232111112243217332121311231212542431212132222121423131112112131231231111121211221112111132111311141131511511131211211111331111111111211122211121211222112111132111111113213324131213111112123211123111231313431141111311211411213+285 more modules (most-connected shown)

At a glance β€” Code Health Β· 60% Β· Adequate Β· gated by D2, X4 Β·

At a glance β€” Architecture Β· 97% Β· Exemplary Β·

At a glance β€” Maturity Β· 66% Β· Adequate Β· gated by M2 Β·

At a glance β€” Readiness Β· 66% Β· Strong Β·

At a glance β€” Security Β· 82% Β· Adequate Β· gated by D36 Β·

At a glance β€” Domain Modelling Β· 100% Β· Exemplary Β·

At a glance β€” Performance Β· 94% Β· Exemplary Β·

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
A03:2025 β€” Software Supply Chain Failures20Medium
A07:2025 β€” Authentication Failures4Medium
A05:2025 β€” Injection1Medium

Roadmap

Top priorities: Interpolated log message defeats structured logging; Resolve the 1 No ADRs found finding(s) in ADR Quality β€” start with Cargo.toml; 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.

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 β€” start with Cargo.toml.+3.4 ptsLowADR Quality
Interpolated log message defeats structured logging+5.2 ptsMediumStructured logging
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.+2.8 ptsMediumArchitecture documentation
Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness β€” start with text.rs, cache_lock.rs, man.rs.+0.9 ptsLowKnowledge Freshness
Bring the 15 bodies over 60 down to 60 or less in Cognitive Complexity β€” start with cargo::ops::cargo_clean::clean_specs (cognitive 116), TextRenderer::push_md (cognitive 104), cargo::resolver::errors::activation_error (cognitive 81).+1.6 ptsHighCognitive Complexity
Resolve the 42 FileTooLong finding(s) in God Classes β€” start with mod.rs (12), features.rs (2), manifest.rs (2).+1.1 ptsHighGod Classes
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+1.0 ptsMediumObservability
Enable Dependabot/Renovate or a dependency-review gate.+1.0 ptsMediumSecurity & performance tooling

File quality

Per-file score 0–10 β€” a quality signature. Of 182 files carrying findings, judged against the Preview bar: 0% slop Β· 22% mixed Β· 78% near-clean.

FileScoreBandWorst signal
src/context/mod.rs5.5MixedCognitive Complexity: cargo::context::save_credentials (cognitive 29)
src/bin/cargo/commands/package.rs5.8MixedChange Coupling: Boundary-crossing change coupling: package.rs ↔ cargo_publish.rs
REDACTED5.8MixedDependency Vulnerabilities: Medium advisory (unmaintained): REDACTED
src/workspace/editor/manifest.rs5.9MixedCognitive Complexity: cargo::workspace::editor::manifest::fix_feature_activations (cognitive 21)
crates/mdman/src/format/text.rs6.0MixedExplicit Debt: TodoComment
src/ops/cargo_compile/mod.rs6.0MixedExplicit Debt: TodoComment
src/resolver/errors.rs6.0MixedExplicit Debt: HackComment
src/compiler/custom_build.rs6.0MixedExplicit Debt: FixmeComment
src/ops/cargo_clean.rs6.0MixedExplicit Debt: FixmeComment
src/ops/cargo_vendor.rs6.0MixedExplicit Debt: HackComment
src/compiler/fingerprint/mod.rs6.0MixedExplicit Debt: FixmeComment
src/sources/registry/mod.rs6.0MixedExplicit Debt: HackComment
src/sources/git/utils.rs6.0MixedExplicit Debt: TodoComment
src/ops/resolve.rs6.0MixedExplicit Debt: TodoComment
src/util/command_prelude.rs6.0MixedExplicit Debt: TodoComment
src/ops/cargo_fix/mod.rs6.0MixedExplicit Debt: HackComment
src/sources/path.rs6.0MixedExplicit Debt: TodoComment
src/compiler/compilation.rs6.0MixedExplicit Debt: HackComment
src/ops/cargo_update.rs6.0MixedExplicit Debt: TodoComment
src/compiler/build_context/target_info.rs6.0MixedExplicit Debt: HackComment

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 β€” 6

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 β€” 707

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 β€” 130

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

Could not be resolved β€” 15

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

This survey 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. All 50 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two 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. 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.

What we checked β€” 50 dimensions across the health lenses
D1D2D3D4D5D6D12D13D14D15D16D17D19D20D24D26D28D29D30D31D34D35D36D43D44AX10AX3AX4AX8AX9DM4DM5M1M2M3M4P1P10P2P3P4P6PF1PF3S1X1X21X27X30X4

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, 782 of 843 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 or a scanner, 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
Canine Code Analyzer 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 · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 Β· 0.69.3 Β· 3.2.533βœ“ deterministic

Every finding is locatable in findings.md. Run 01a1daa1-0f21-788c-a59d-52fc671cff4d.

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 β€” We 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: the Rust half could not be measured β€” the Cargo suite in repository root did not build, so it was never run. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D11 Test Reliability β€” not measured this run β€” We 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, 123 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.
  • D15 Churn × Complexity Hotspots β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we 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 src/workspace/features.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 β€” We measured this, but not all of it. What we 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.
  • D19 Documentation Quality β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we 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. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency β€” not measured this run β€” We 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency β€” not measured this run β€” We 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency β€” not measured this run β€” We 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 β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we 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 source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability β€” not measured this run β€” We 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.
  • AX6 Interface segregation β€” not measured this run β€” We 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.
  • AXR1 Runtime accessibility β€” not measured this run β€” We 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. User interface: 2 markup document(s) β€” HTML, Razor, JSX, Vue, Svelte or server templates. Boot: crawled PUBLIC routes only β€” add a Playwright storageState (e.g. playwright/.auth/user.json) or a test auth-setup to crawl authenticated screens rendered 0/1 surface(s) × 2 renders render failed for http://127.0.0.1:32768: page.goto: net::ERR_INVALID_HTTP_RESPONSE at http://127.0.0.1:32768/ Call log: - navigating to "http://127.0.0.1:32768/", waiting until "load" .
  • ED5 Idempotency β€” not measured this run β€” We 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 decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • GD1 Unfinished & placeholder code β€” not measured this run β€” We 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 β€” We 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 β€” We measured this, but not all of it. What we 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), and artefact counts an order of magnitude off. 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.
  • X12 Unreachable branch β€” not measured this run β€” We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X16 Unfloored truncation loop β€” not measured this run β€” We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X24 Document value interpolated into markup unescaped β€” not measured this run β€” We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X3 Exception handling β€” not measured this run β€” We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X4 Structured logging β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we 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. 283 further occurrence(s) are not listed individually; the score already reflects all 323.
  • X5 Nullable reference types β€” not measured this run β€” We 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

We assess the repository exactly as committed, and only the repository. By design we do 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.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles β€” a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • 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 checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • 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.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules β€” it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • 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.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen β€” a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body β€” a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • 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 Complexity6.4 / 10Adequateβœ“ 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 6.4 / 10 Β· rule-coverage 100% Β· ceiling Prevented

88 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was TextRenderer::push_md at 68. A further 5 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 cargo_util::process_error::exit_status_to_string::status_to_string at 47 β€” 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: crates/cargo-util/src/process_error.rs (cargo_util::process_error::exit_status_to_string::status_to_string at 47), src/bin/cargo/commands/mod.rs (cargo::bin::cargo::commands::builtin_exec at 40), src/compiler/fingerprint/dirty_reason.rs (DirtyReason::present_to at 36), crates/cargo-util-schemas/src/core/source_kind.rs (SourceKind::cmp at 19). 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.

cargo::ops::cargo_compile::create_bcx (cyclomatic 47) Β· Γ—58src/ops/cargo_compile/mod.rs:252
Dependency::update_toml (cyclomatic 27) Β· Γ—3src/workspace/editor/dependency.rs:508
InstallablePackage::install_one (cyclomatic 36) Β· Γ—2src/ops/cargo_install.rs:337
DrainState::handle_event (cyclomatic 22) Β· Γ—2src/compiler/job_queue/mod.rs:616
UnitGenerator::find_named_targets (cyclomatic 20) Β· Γ—2src/ops/cargo_compile/unit_generator.rs:234

+ 20 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity β€” start with TextRenderer::push_md (cyclomatic 68), ManRenderer::push_man (cyclomatic 64). β€” 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 2 together lifts Cyclomatic Complexity from 6.4 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D2 Β· Cognitive Complexity3.6 / 10Weakβœ“ 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 3.6 / 10 Β· rule-coverage 100% Β· ceiling Prevented

197 method(s) exceeded the cognitive complexity threshold of 15; the worst was cargo::ops::cargo_clean::clean_specs at 116.

cargo::ops::cargo_clean::clean_specs (cognitive 116) Β· Γ—132src/ops/cargo_clean.rs:188
DrainState::report_warning_count (cognitive 26) Β· Γ—5src/compiler/job_queue/mod.rs:1111
Dependency::update_toml (cognitive 65) Β· Γ—3src/workspace/editor/dependency.rs:508
BuildRunner::compile (cognitive 60) Β· Γ—3src/compiler/build_runner/mod.rs:169
UnitGenerator::find_named_targets (cognitive 43) Β· Γ—3src/ops/cargo_compile/unit_generator.rs:234

+ 44 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 15 bodies over 60 down to 60 or less in Cognitive Complexity β€” start with cargo::ops::cargo_clean::clean_specs (cognitive 116), TextRenderer::push_md (cognitive 104), cargo::resolver::errors::activation_error (cognitive 81). β€” 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 15 together lifts Cognitive Complexity from 3.6 to about 5.1/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 Β· God Classes7.4 / 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 7.4 / 10 Β· rule-coverage 100% Β· ceiling Prevented

111 god class(es) detected.

FileTooLong: parser/mod.rs Β· Γ—42src/workspace/parser/mod.rs
FunctionTooLong: cargo::workspace::parser::to_real_manifest Β· Γ—31src/workspace/parser/mod.rs:1305
MethodTooLong: BuildOutput.parse Β· Γ—18src/compiler/custom_build.rs:806
TooManyMethods: GlobalContext Β· Γ—8src/context/mod.rs:154
ClassTooLong: Workspace Β· Γ—7src/workspace/workspace.rs:51

+ 2 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 42 FileTooLong finding(s) in God Classes β€” start with mod.rs (12), features.rs (2), manifest.rs (2). β€” One of this dimension's main actionable groups (42 warning-level).
  2. Resolve the 31 FunctionTooLong finding(s) in God Classes β€” start with mod.rs (12), errors.rs, custom_build.rs. β€” One of this dimension's main actionable groups (31 warning-level).
  3. Resolve the 18 MethodTooLong finding(s) in God Classes β€” start with mod.rs (3), cargo_install.rs (2), dependency.rs (2). β€” One of this dimension's main actionable groups (18 warning-level).

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

D4 Β· Code Duplication8.6 / 10Strongβœ“ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 8.6 / 10 Β· rule-coverage 100% Β· ceiling Verified

110 duplicated block group(s) detected. 3.5 % of the production lines (4,222 of 120,206) are in a reported copy. A further 64 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 4 of the 174 are in trees this repository does not ship β€” vendored, example/demo, project-template, fixture and benchmark code β€” and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (8 lines × 2) Β· Γ—13src/bin/cargo/commands/add.rs:198
Duplicated block (10 lines × 2) Β· Γ—9crates/mdman/src/format/man.rs:308
Duplicated block (6 lines × 2) Β· Γ—9src/diagnostics/rules/text_direction_codepoint_in_comment.rs:84
Duplicated block (9 lines × 2) Β· Γ—8crates/home/src/env.rs:69
Duplicated block (7 lines × 2) Β· Γ—8src/bin/cargo/commands/help/mod.rs:239

+ 80 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 13 Duplicated block (8 lines × 2) finding(s) in Code Duplication β€” start with mod.rs (2), add.rs, min_opt_level_hint.rs. β€” One of this dimension's main actionable groups (13 warning-level).
  2. Resolve the 9 Duplicated block (10 lines × 2) finding(s) in Code Duplication β€” start with man.rs, main.rs, compilation.rs. β€” One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 9 Duplicated block (6 lines × 2) finding(s) in Code Duplication β€” start with text_direction_codepoint_in_comment.rs (3), dependency.rs, lib.rs. β€” One of this dimension's main actionable groups (9 warning-level).

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

D5 Β· Coupling7.7 / 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.7 / 10 Β· rule-coverage 100% Β· ceiling Prevented

24 production modules (Cargo), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 7 module(s) off the main sequence, with abstractness counted on 17 of the 24 (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: cargo-platform Β· Γ—7

What to do

  1. Resolve the 7 Off the main sequence finding(s) in Coupling. β€” One of this dimension's main actionable groups (7 warning-level).

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

D6 Β· Cohesion (LCOM4)9.9 / 10Stronggated by 2 serious findingsβœ“ 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

2 of 202 classes have LCOM4 above 3.

Low cohesion: GlobalContext (LCOM4 5) Β· Γ—2src/context/mod.rs:154

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) β€” start with mod.rs, manifest.rs. β€” One of this dimension's main actionable groups (2 warning-level).

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

D12 Β· Dependency Hygiene8.0 6.2 / 10Adequateβœ“ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.2 / 10 Β· rule-coverage 78% Β· ceiling Verified

42 outdated, 0 yanked direct Cargo dependencies. 89 of 114 direct crates were graded against crates.io (0 not published there, 25 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit β€” which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded β€” crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: anstyle-progress Β· Γ—42

Detailed fixes: d12_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 354 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles β€” this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. 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 16 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: src/workspace/parser/mod.rs (21×45=945); src/compiler/mod.rs (21×42=882); src/workspace/features.rs (14×31=434) Repeated repair below the complexity floor: src/compiler/trim_paths.rs (6 of 11 changes were fixes)

Hotspot: src/workspace/parser/mod.rs Β· Γ—15src/workspace/parser/mod.rs:1305
Repeated repair: src/compiler/trim_paths.rssrc/compiler/trim_paths.rs:315

What to do

  1. Resolve the 15 Hotspot finding(s) in Churn × Complexity Hotspots β€” start with mod.rs (5), features.rs, utils.rs. β€” One of this dimension's main actionable groups (15 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots β€” start with trim_paths.rs. β€” One of this dimension's main actionable groups (1 warning-level).

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

D16 Β· Bus Factor8.8 / 10Strongβœ“ 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 8.8 / 10 Β· rule-coverage 100% Β· ceiling Documented

29 source file(s) have their living knowledge concentrated in one author (β‰₯90% of recent, decayed contribution). The largest is src/ops/cargo_tree/graph.rs. Counted over 249 of the 299 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 Β· Γ—2
Further sole-owners (lower concentration)

What to do

  1. Resolve the 2 Off-boarding risk finding(s) in Bus Factor. β€” One of this dimension's main actionable groups (2 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. β€” One of this dimension's main actionable groups (1 recommendation-level).

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

D17 Β· Explicit Debt9.8 / 10Stronggated by 94 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.8 / 10 Β· rule-coverage 100% Β· ceiling Prevented

94 deducted task-comment markers across 120206 LoC (0.1/KLoC) β†’ score 9.8. 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.

TodoComment Β· Γ—52tests/testsuite/artifact_dep.rs:1401
HackComment Β· Γ—24tests/testsuite/cache_messages.rs:72
FixmeComment Β· Γ—17tests/testsuite/build_dir.rs:673
XxxCommentsrc/workspace/workspace.rs:607

What to do

  1. Resolve the 52 TodoComment finding(s) in Explicit Debt β€” start with mod.rs (5), package_features.rs (4), global_cache_tracker.rs (4). β€” One of this dimension's main actionable groups (52 warning-level).
  2. Resolve the 24 HackComment finding(s) in Explicit Debt β€” start with mod.rs (3), main.rs (2), errors.rs (2). β€” One of this dimension's main actionable groups (24 warning-level).
  3. Resolve the 17 FixmeComment finding(s) in Explicit Debt β€” start with mod.rs (4), build_dir.rs, build_dir_fine_grain_locking.rs. β€” One of this dimension's main actionable groups (17 warning-level).

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. 223 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: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 0.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

No architecture decision records were found.

No ADRs foundCargo.toml:285

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality β€” start with Cargo.toml. β€” 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.

D24 Β· Comment Value10.0 9.2 / 10Exemplaryβ—‹ Nothing flagged

What it measures: Whether comments are worth it β€” explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.2 / 10 Β· rule-coverage 92% Β· ceiling Documented

0 of 40 judged comments only repeat the code they sit on (0.0 %). 4 comment(s) in another language or script were not judged.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d24_recommendation.md.

D26 Β· Project Cohesion9.1 / 10Exemplaryβœ“ 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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.1 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

Projects may be oversized for their cohesion

βœ“ On the Gold path β€” maintain.

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

4 finding(s): 0 critical, 0 high, 0 medium, 0 low.

REDACTED

βœ“ On the Gold path β€” maintain.

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

D29 Β· Static Analysis (SAST)9.9 / 10Exemplaryβœ“ 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 9.9 / 10 Β· rule-coverage 100% Β· ceiling Documented

1 finding(s): 0 critical, 0 high, 0 medium, 1 low. semgrep hit a parse error in 5 file(s) β€” `crates/cargo-util-schemas/src/core/partial_version.rs` (line 196, line 198, line 216, …), `crates/cargo-util-schemas/src/index.rs` (line 315, line 317), `etc/cargo.bashcomp.sh`, `src/ops/cargo_clean.rs` (line 608, line 610), `src/util/frontmatter.rs` (line 424, line 443, line 462, …) β€” 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 1 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

βœ“ On the Gold path β€” maintain.

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

D30 Β· Dependency Vulnerabilities7.6 / 10Strongβœ“ Tool-verified

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. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 7.6 / 10 Β· rule-coverage 100% Β· ceiling Documented

13 finding(s): 0 critical, 0 high, 13 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 4 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities β€” start with REDACTED (4). β€” One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 4 Medium vulnerability finding(s) in Dependency Vulnerabilities β€” start with REDACTED (4). β€” One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities β€” start with REDACTED (3). β€” One of this dimension's main actionable groups (3 warning-level).

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

D31 Β· IaC & Container Security10.0 / 10Exemplaryβ—‹ Nothing flagged

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (Dockerfile/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

trivy and checkov found no infrastructure-as-code or container misconfigurations.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d31_recommendation.md.

D34 Β· Knowledge Freshness9.0 / 10Adequategated by 4 critical findingsβœ“ 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.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

26 of 249 significant source file(s) are orphaned β€” their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/mdman/src/format/text.rs. Counted over 249 of the 299 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge Β· Γ—4crates/mdman/src/format/text.rs:1
Orphaned file Β· Γ—22credential/cargo-credential-1password/src/main.rs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness β€” start with text.rs, cache_lock.rs, man.rs. β€” One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 22 Orphaned file finding(s) in Knowledge Freshness β€” start with main.rs (3), graph.rs, process_error.rs. β€” One of this dimension's main actionable groups (22 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. β€” One of this dimension's main actionable groups (1 recommendation-level).

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

D35 Β· Change Coupling9.7 / 10Adequategated by 1 critical findingβœ“ 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.7 / 10 Β· rule-coverage 100% Β· ceiling Documented

Strongest change-coupling: mod.rs↔cargo_fetch.rs 85%; im_a_teapot.rs↔unknown_lints.rs 70%; blanket_hint_mostly_unused.rs↔im_a_teapot.rs 70%

Boundary-crossing change coupling: package.rs ↔ cargo_publish.rssrc/bin/cargo/commands/package.rs:1
Change coupling: mod.rs ↔ cargo_fetch.rssrc/ops/cargo_compile/mod.rs:1
Change coupling clique: blanket_hint_mostly_unused.rs, im_a_teapot.rs, unknown_lints.rssrc/diagnostics/rules/blanket_hint_mostly_unused.rs

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling β€” start with package.rs. β€” One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Change coupling finding(s) in Change Coupling β€” start with mod.rs. β€” One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Change coupling clique finding(s) in Change Coupling β€” start with blanket_hint_mostly_unused.rs. β€” One of this dimension's main actionable groups (1 warning-level).

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

D36 Β· Supply-chain Provenance & Signing2.5 / 10Weakβœ“ 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 2.5 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing β€” start with REDACTED, REDACTED. β€” One of this dimension's main actionable groups (2 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. β€” One of this dimension's main actionable groups (1 recommendation-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. Reported 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. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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.

D44 Β· Platform End-of-Life10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON β€” the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates β€” no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged β€” `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on β€” and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads β€” never scores it clean.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF β€” a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 Β· Code composition9.9 / 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.

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.

  • `utils$module.fetch_with_gitoxide` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. β€” src/sources/git/utils.rs:1406

What to do

  • Keep query handlers read-only β€” move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
DM4 Β· Rich vs anemic domain model10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Domain Modelling β€” Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query β€” only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query β€” logic-bearing domain types outside the convention are invisible.

DM5 Β· Encapsulated state10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Domain Modelling β€” Whether a domain type's identity-bearing field stays immutable β€” a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state β€” public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

M1 Β· Documentation (README)7.4 / 10Strongβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repository and its projects have a README, and whether it is substantive.

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 a build/run (quick start) section to the root README β€” the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 Β· Architecture documentation2.0 / 10Weakβœ“ 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.

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.
M3 Β· Folder & project structure10.0 / 10Exemplaryβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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 project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

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's code 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 Β· Observability4.9 / 10Adequateβœ“ 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.

  • Only 4/14 runnable modules use logging (modules with no entry point or server are excluded β€” they are libraries a runnable module hosts). Silent: `.`, `crates/cargo-test-support`, `crates/mdman`, `crates/semver-check`, `crates/xtask-build-man` and 5 more.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • 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 tooling5.0 / 10Adequateβœ“ 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.

PF1 Β· Benchmark discipline9.0 / 10Exemplaryβœ“ Tool-verified

Readiness Β· Performance β€” Whether the code protects its performance with benchmarks β€” a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark β€” scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF3 Β· Async & latency hygiene10.0 / 10Exemplaryβœ“ Tool-verified

Readiness Β· Performance β€” Whether asynchronous code stays responsive β€” it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere β€” .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect β€” and, for a .NET library with β‰₯5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

S1 Β· Web-Security Posture8.0 / 10Strongβœ“ Tool-verified

Other Β· Security β€” Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) β€” facts about code that hold whether or not it serves anything itself. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. The server controls β€” HTTPS enforcement, HSTS, cookie flags, input validation β€” are read from a Rust server this repository starts itself, and its production Rust starts none. What serves its HTTP is outside the Rust source, and only what this card names about it was assessed.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured β€” defense in depth, even when a reverse proxy could set them. This is reported because `Dockerfile` builds the web-server image that serves this application, so the configuration that would carry these headers is in this repository and was read in full. (βˆ’2.0 on this card.) β€” crates/cargo-test-support/containers/apache/Dockerfile:1

What to do

  • Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first β€” it is what contains an injected script once one reaches the page β€” followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
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.

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.

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.

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.

X4 Β· Structured logging1.8 / 10Criticalβœ“ Tool-verified

Other Β· Code Health β€” Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. 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 `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `debug!` at line 176 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/lib.rs:176
  • `debug!` at line 196 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/lib.rs:196
  • `trace!` at line 367 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/dependency.rs:367
  • `warn!` at line 63 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/gc.rs:63
  • `trace!` at line 527 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:527
  • `trace!` at line 565 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:565
  • `trace!` at line 819 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:819
  • `trace!` at line 845 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:845
  • `trace!` at line 874 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:874
  • `debug!` at line 889 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:889
  • `trace!` at line 951 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:951
  • `trace!` at line 1014 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1014
  • `debug!` at line 1051 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1051
  • `debug!` at line 1081 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1081
  • `debug!` at line 1138 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1138
  • `debug!` at line 1176 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1176
  • `debug!` at line 1204 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1204
  • `debug!` at line 1251 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1251
  • `debug!` at line 1289 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1289
  • `debug!` at line 1314 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1314
  • `debug!` at line 1343 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1343
  • `warn!` at line 1607 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1607
  • `trace!` at line 1659 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1659
  • `trace!` at line 1684 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/global_cache_tracker.rs:1684
  • `debug!` at line 439 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/package.rs:439
  • `debug!` at line 443 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/package.rs:443
  • `trace!` at line 212 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:212
  • `debug!` at line 223 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:223
  • `debug!` at line 230 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:230
  • `debug!` at line 239 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:239
  • `debug!` at line 242 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:242
  • `debug!` at line 245 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:245
  • `trace!` at line 294 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:294
  • `trace!` at line 296 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:296
  • `debug!` at line 356 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:356
  • `debug!` at line 428 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:428
  • `debug!` at line 508 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:508
  • `debug!` at line 526 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:526
  • `debug!` at line 705 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:705
  • `trace!` at line 841 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β€” src/workspace/registry.rs:841

What to do

  • Interpolated log message defeats structured logging

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 Health60%Adequate β€” gated by D2, X4Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Architecture97%ExemplarySolid.
Maturity66%Adequate β€” gated by M2Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Readiness66%StrongSolid.
Security82%Adequate β€” gated by D36Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Performance94%ExemplarySolid.
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 β€” 3 observation(s) recorded Β· Advisory β€” this card reports evidence and never carries a score.
  • X7 Silent fallback defaults β€” 5 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 β€” 71 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 β€” Frontend below the scale floor (21 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AC2 Forms & labels β€” Frontend below the scale floor (21 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AC3 Page structure β€” Frontend below the scale floor (21 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AC4 Keyboard semantics β€” Frontend below the scale floor (21 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AC5 ARIA correctness β€” Frontend below the scale floor (21 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AC6 Visual & motion safety β€” Frontend below the scale floor (21 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AX1 Captive dependencies β€” Not applicable: this repository's JavaScript 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; 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
  • AXB2 Runtime readiness β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility β€” The runtime tier booted this repository's service, but crawled PUBLIC routes only β€” add a Playwright storageState (e.g. playwright/.auth/user.json) or a test auth-setup to crawl authenticated screens rendered 0/1 surface(s) × 2 renders render failed for http://127.0.0.1:32768: page.goto: net::ERR_INVALID_HTTP_RESPONSE at http://127.0.0.1:32768/ Call log: - navigating to "http://127.0.0.1:32768/", waiting until "load" . This repository also has a user interface (2 markup document(s) β€” HTML, Razor, JSX, Vue, Svelte or server templates) that the booted service does not serve, and this scan has no strategy that reaches it β€” so no WCAG success criterion was verified in a rendered page on this run. That is a gap in OUR tooling, not a finding about your application: nothing here says the interface is inaccessible. The static accessibility checks still ran.
  • AXS1 Runtime exposed surface β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • 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 β€” ~194292 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
  • 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 β€” D21 withholds its case and prefix conventions rows: 2 candidate(s) found and not reported.
  • 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+ sibling projects each declaring an entity of their own or taking another project's integration events. 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"]`.
  • 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.
  • 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.
  • 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.
  • 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 measured β€” Rust suite
  • DM1 Aggregate boundaries β€” this Rust crate declares no domain aggregate (a struct with private state and its own command methods), so DM1's aggregate-boundary read has no population to be taken over
  • DM2 Strongly-typed ids β€” the crate defines newtype typed-ids but declares no domain aggregate that could carry an id β€” so DM2's adoption ratio has no population to be taken over
  • DM3 Integration-event coupling β€” not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM6 Domain ↔ infrastructure boundary β€” this Rust crate maps no type to a persistence framework (diesel/sea-orm/sqlx), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity β€” not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • 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 β€” Not assessed, and this one is on us: 1 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out β€” this is a limit of the analyzer, not a finding about your code.
  • 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 β€” coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here β€” Test coverage (D8) says why
  • PF2 Allocation hygiene β€” Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • X12 Unreachable branch β€” X12 reached only 1% of this repository's production lines β€” rust (120,105 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop β€” X16 reached only 1% of this repository's production lines β€” rust (120,105 lines), python (101 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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.
  • X22 Contradicted release guard β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped β€” X24 reached only 1% of this repository's production lines β€” rust (120,105 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X25 Inert configuration knob β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X28 Index access outside its own emptiness guard β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling β€” X3 reached only 1% of this repository's production lines β€” rust (120,105 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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.
  • 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 β€” 6 finding(s)
D34 Β· Knowledge Freshness Β· Orphaned knowledge Β· Γ—4
  • Orphaned knowledge crates/mdman/src/format/text.rs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/util/cache_lock.rs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge crates/mdman/src/format/man.rs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/util/semver_eval_ext.rs:1 β€” No living knowledge remains for this large file β€” its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
AX9 Β· CQS / query purity Β· Query writes persistent state on the read path Β· Γ—1
  • Query writes persistent state on the read path: utils$module.fetch_with_gitoxide src/sources/git/utils.rs:1406 β€” `utils$module.fetch_with_gitoxide` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
D35 Β· Change Coupling Β· Boundary-crossing change coupling Β· Γ—1
  • Boundary-crossing change coupling: package.rs ↔ cargo_publish.rs src/bin/cargo/commands/package.rs:1 β€” `src/bin/cargo/commands/package.rs` (context bin) and `src/ops/registry/cargo_publish.rs` (context ops) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 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) β€” the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `c8bf4096` feat(publish): Stabilize multi-package publishing (at that commit the file was still `src/cargo/ops/registry/publish.rs`); `340a4f9b` Add a dry-run packaging mode that munges checksums (at that commit the file was still `src/cargo/ops/registry/publish.rs`); `781c7ed5` feat(package): add unstable `--message-format` flag (at that commit the file was still `src/cargo/ops/registry/publish.rs`) β€” run `git show` on any of them.
Serious β€” 707 finding(s)
D2 Β· Cognitive Complexity Β· cargo Β· Γ—132
  • cargo::ops::cargo_clean::clean_specs (cognitive 116) src/ops/cargo_clean.rs:188 β€” cargo::ops::cargo_clean::clean_specs has cognitive complexity 116 (threshold 15). Drivers by points: loops 14 (53 pts), if/else 16 (49 pts), match/switch 4 (10 pts), boolean chains 4 (nesting depth added 78). 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.
  • cargo::resolver::errors::activation_error (cognitive 81) src/resolver/errors.rs:77 β€” cargo::resolver::errors::activation_error has cognitive complexity 81 (threshold 15). Drivers by points: if/else 30 (53 pts), match/switch 6 (14 pts), loops 5 (12 pts), boolean chains 2 (nesting depth added 38). 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.
  • cargo::ops::cargo_vendor::sync (cognitive 78) src/ops/cargo_vendor.rs:120 β€” cargo::ops::cargo_vendor::sync has cognitive complexity 78 (threshold 15). Drivers by points: if/else 28 (56 pts), loops 8 (12 pts), match/switch 2 (7 pts), boolean chains 3 (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.
  • cargo::ops::cargo_compile::create_bcx (cognitive 74) src/ops/cargo_compile/mod.rs:252 β€” cargo::ops::cargo_compile::create_bcx has cognitive complexity 74 (threshold 15). Drivers by points: if/else 32 (51 pts), loops 7 (11 pts), boolean chains 9, match/switch 3 (nesting depth added 23). 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.
  • cargo::resolver::activate_deps_loop (cognitive 71) src/resolver/mod.rs:195 β€” cargo::resolver::activate_deps_loop has cognitive complexity 71 (threshold 15). Drivers by points: if/else 15 (53 pts), match/switch 3 (8 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 44). 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.
  • cargo::workspace::summary::build_feature_map (cognitive 69) src/workspace/summary.rs:201 β€” cargo::workspace::summary::build_feature_map has cognitive complexity 69 (threshold 15). Drivers by points: if/else 16 (56 pts), loops 4 (5 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 43). 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.
  • cargo::ops::cargo_add::add (cognitive 66) src/ops/cargo_add/mod.rs:75 β€” cargo::ops::cargo_add::add has cognitive complexity 66 (threshold 15). Drivers by points: if/else 24 (58 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 37). 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.
  • cargo::ops::cargo_add::resolve_dependency (cognitive 66) src/ops/cargo_add/mod.rs:343 β€” cargo::ops::cargo_add::resolve_dependency has cognitive complexity 66 (threshold 15). Drivers by points: if/else 35 (64 pts), boolean chains 2 (nesting depth added 29). 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.
  • cargo::ops::registry::cargo_publish::publish (cognitive 65) src/ops/registry/cargo_publish.rs:72 β€” cargo::ops::registry::cargo_publish::publish has cognitive complexity 65 (threshold 15). Drivers by points: if/else 27 (55 pts), loops 5 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 30). 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.
  • cargo::workspace::parser::to_real_manifest (cognitive 65) src/workspace/parser/mod.rs:1305 β€” cargo::workspace::parser::to_real_manifest has cognitive complexity 65 (threshold 15). Drivers by points: if/else 36 (55 pts), boolean chains 5, loops 3, match/switch 2 (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.
  • cargo::compiler::custom_build::build_work (cognitive 56) src/compiler/custom_build.rs:332 β€” cargo::compiler::custom_build::build_work has cognitive complexity 56 (threshold 15). Drivers by points: if/else 34 (42 pts), loops 6 (7 pts), match/switch 3 (4 pts), boolean chains 3 (nesting depth added 10). 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.
  • cargo::compiler::build_base_args (cognitive 55) src/compiler/mod.rs:1326 β€” cargo::compiler::build_base_args has cognitive complexity 55 (threshold 15). Drivers by points: if/else 34 (44 pts), boolean chains 7, loops 1 (2 pts), match/switch 2 (nesting depth added 11). 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.
  • cargo::bin::cargo::commands::install::exec (cognitive 50) src/bin/cargo/commands/install.rs:110 β€” cargo::bin::cargo::commands::install::exec has cognitive complexity 50 (threshold 15). Drivers by points: if/else 25 (40 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (2 pts) (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.
  • cargo::compiler::on_stderr_line_inner (cognitive 50) src/compiler/mod.rs:2154 β€” cargo::compiler::on_stderr_line_inner has cognitive complexity 50 (threshold 15). Drivers by points: if/else 22 (41 pts), boolean chains 5, loops 1 (2 pts), match/switch 2 (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.
  • cargo::ops::cargo_tree::graph::add_pkg (cognitive 49) src/ops/cargo_tree/graph.rs:406 β€” cargo::ops::cargo_tree::graph::add_pkg has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 3 (7 pts), match/switch 3 (6 pts), boolean chains 5 (nesting depth added 23). 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.
  • cargo::compiler::fingerprint::find_stale_file (cognitive 46) src/compiler/fingerprint/mod.rs:2100 β€” cargo::compiler::fingerprint::find_stale_file has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (36 pts), match/switch 4 (9 pts), loops 1 (nesting depth added 29). 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.
  • cargo::diagnostics::rules::unused_dependencies::lint_package_build_results (cognitive 46) src/diagnostics/rules/unused_dependencies.rs:223 β€” cargo::diagnostics::rules::unused_dependencies::lint_package_build_results has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (34 pts), loops 3 (6 pts), boolean chains 3, match/switch 1 (3 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.
  • cargo::compiler::rustc (cognitive 45) src/compiler/mod.rs:319 β€” cargo::compiler::rustc has cognitive complexity 45 (threshold 15). Drivers by points: if/else 27 (42 pts), loops 8 (15 pts), boolean chains 5, match/switch 3 (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. This shape REPEATS in the file: one other method here (cargo::compiler::rustc::add_native_deps) has the same decision points, in the same order, at the same nesting depths β€” so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • cargo::ops::cargo_fix::migrate_manifests (cognitive 45) src/ops/cargo_fix/mod.rs:320 β€” cargo::ops::cargo_fix::migrate_manifests has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (2 pts) (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.
  • cargo::sources::git::utils::with_authentication (cognitive 45) src/sources/git/utils.rs:657 β€” cargo::sources::git::utils::with_authentication has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (38 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (2 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.
  • cargo::bin::cargo::commands::remove::gc_workspace (cognitive 44) src/bin/cargo/commands/remove.rs:166 β€” cargo::bin::cargo::commands::remove::gc_workspace has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 5 (14 pts), boolean chains 1 (nesting depth added 28). 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.
  • cargo::ops::resolve::register_previous_locks (cognitive 42) src/ops/resolve.rs:595 β€” cargo::ops::resolve::register_previous_locks has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 7 (10 pts), boolean chains 4 (nesting depth added 18). Of this number, 40 points are the body's own statements and 2 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.
  • cargo::ops::cargo_new::mk (cognitive 40) src/ops/cargo_new.rs:724 β€” cargo::ops::cargo_new::mk has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 2, match/switch 2 (nesting depth added 20). 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.
  • cargo::ops::cargo_report::timings::prepare_context (cognitive 40) src/ops/cargo_report/timings.rs:135 β€” cargo::ops::cargo_report::timings::prepare_context has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 7 (16 pts), loops 2, boolean chains 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.
  • cargo::workspace::parser::prepare_toml_for_publish (cognitive 39) src/workspace/parser/mod.rs:3080 β€” cargo::workspace::parser::prepare_toml_for_publish has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (26 pts), match/switch 6 (10 pts), loops 2 (3 pts) (nesting depth added 11). Of this number, 25 points are the body's own statements and 14 belong to 4 function items inside it that branch. 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.
  • + 107 more in this group β€” see findings.md.
D1 Β· Cyclomatic Complexity Β· cargo Β· Γ—58
  • cargo::ops::cargo_compile::create_bcx (cyclomatic 47) src/ops/cargo_compile/mod.rs:252 β€” cargo::ops::cargo_compile::create_bcx has cyclomatic complexity 47 (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.
  • cargo::resolver::errors::activation_error (cyclomatic 46) src/resolver/errors.rs:77 β€” cargo::resolver::errors::activation_error has cyclomatic complexity 46 (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.
  • cargo::workspace::parser::to_real_manifest (cyclomatic 45) src/workspace/parser/mod.rs:1305 β€” cargo::workspace::parser::to_real_manifest has cyclomatic complexity 45 (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.
  • cargo::compiler::rustc (cyclomatic 42) src/compiler/mod.rs:319 β€” cargo::compiler::rustc has cyclomatic complexity 42 (threshold 15). Of this number, 31 points are the body's own statements and 11 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.
  • cargo::compiler::build_base_args (cyclomatic 42) src/compiler/mod.rs:1326 β€” cargo::compiler::build_base_args has cyclomatic complexity 42 (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.
  • cargo::compiler::custom_build::build_work (cyclomatic 41) src/compiler/custom_build.rs:332 β€” cargo::compiler::custom_build::build_work has cyclomatic complexity 41 (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.
  • cargo::ops::cargo_clean::clean_specs (cyclomatic 38) src/ops/cargo_clean.rs:188 β€” cargo::ops::cargo_clean::clean_specs has cyclomatic complexity 38 (threshold 15). 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.
  • cargo::ops::cargo_vendor::sync (cyclomatic 37) src/ops/cargo_vendor.rs:120 β€” cargo::ops::cargo_vendor::sync has cyclomatic complexity 37 (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.
  • cargo::ops::cargo_add::resolve_dependency (cyclomatic 32) src/ops/cargo_add/mod.rs:343 β€” cargo::ops::cargo_add::resolve_dependency has cyclomatic complexity 32 (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.
  • cargo::compiler::on_stderr_line_inner (cyclomatic 30) src/compiler/mod.rs:2154 β€” cargo::compiler::on_stderr_line_inner 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.
  • cargo::resolver::activate_deps_loop (cyclomatic 30) src/resolver/mod.rs:195 β€” cargo::resolver::activate_deps_loop 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.
  • cargo::ops::cargo_tree::graph::add_pkg (cyclomatic 29) src/ops/cargo_tree/graph.rs:406 β€” cargo::ops::cargo_tree::graph::add_pkg 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.
  • cargo::bin::cargo::commands::install::exec (cyclomatic 28) src/bin/cargo/commands/install.rs:110 β€” cargo::bin::cargo::commands::install::exec 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.
  • cargo::ops::registry::cargo_publish::publish (cyclomatic 28) src/ops/registry/cargo_publish.rs:72 β€” cargo::ops::registry::cargo_publish::publish 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.
  • cargo::ops::cargo_report::timings::prepare_context (cyclomatic 27) src/ops/cargo_report/timings.rs:135 β€” cargo::ops::cargo_report::timings::prepare_context has cyclomatic complexity 27 (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.
  • cargo::workspace::parser::prepare_toml_for_publish (cyclomatic 27) src/workspace/parser/mod.rs:3080 β€” cargo::workspace::parser::prepare_toml_for_publish has cyclomatic complexity 27 (threshold 15). Of this number, 16 points are the body's own statements and 11 belong to 4 function items inside it that branch. 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.
  • cargo::ops::cargo_add::add (cyclomatic 26) src/ops/cargo_add/mod.rs:75 β€” cargo::ops::cargo_add::add has cyclomatic complexity 26 (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.
  • cargo::sources::git::utils::with_authentication (cyclomatic 26) src/sources/git/utils.rs:657 β€” cargo::sources::git::utils::with_authentication has cyclomatic complexity 26 (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.
  • cargo::workspace::summary::build_feature_map (cyclomatic 26) src/workspace/summary.rs:201 β€” cargo::workspace::summary::build_feature_map has cyclomatic complexity 26 (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.
  • cargo::ops::resolve::register_previous_locks (cyclomatic 25) src/ops/resolve.rs:595 β€” cargo::ops::resolve::register_previous_locks has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 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.
  • cargo::workspace::parser::to_dependency_source_id (cyclomatic 25) src/workspace/parser/mod.rs:2413 β€” cargo::workspace::parser::to_dependency_source_id 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.
  • cargo::workspace::profiles::merge_profile (cyclomatic 24) src/workspace/profiles.rs:593 β€” cargo::workspace::profiles::merge_profile 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.
  • cargo::bin::cargo::commands::tree::parse_edge_kinds (cyclomatic 22) src/bin/cargo/commands/tree.rs:270 β€” cargo::bin::cargo::commands::tree::parse_edge_kinds 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.
  • cargo::workspace::parser::dep_to_dependency (cyclomatic 22) src/workspace/parser/mod.rs:2283 β€” cargo::workspace::parser::dep_to_dependency 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.
  • cargo::ops::cargo_new::mk (cyclomatic 21) src/ops/cargo_new.rs:724 β€” cargo::ops::cargo_new::mk 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.
  • + 33 more in this group β€” see findings.md.
D17 Β· Explicit Debt Β· TodoComment Β· Γ—52
  • TodoComment tests/testsuite/artifact_dep.rs:1401 β€” // TODO(ST): rename bar (dependency) to something else and un-ignore this with RFC-3176
  • TodoComment tests/testsuite/build_script_env.rs:158 β€” // TODO(embed-metadata): omission should be removed when 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.
  • TodoComment tests/testsuite/build_script_env.rs:207 β€” // TODO(embed-metadata): omission should be removed when 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.
  • TodoComment tests/testsuite/build_script_extra_link_arg.rs:124 β€” // TODO: Uncomment this if cdylib restriction is re-added (see β€” 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/testsuite/cache_lock.rs:326 β€” // TODO: Unfortunately this doesn't work on Windows. I don't have any β€” 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/testsuite/config.rs:508 β€” // TODO: don't use actual `tomlprofile`. β€” 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/testsuite/package_features.rs:921 β€” // TODO: This should not be allowed (future warning?) β€” 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/testsuite/package_features.rs:933 β€” // TODO: This should not be allowed (future warning?) β€” 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/testsuite/package_features.rs:967 β€” // TODO: This should not be allowed (future warning?) β€” 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/testsuite/package_features.rs:980 β€” // TODO: This should not be allowed (future warning?) β€” 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/testsuite/pkgid.rs:288 β€” // TODO, what should the `-p` value be here? β€” 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/testsuite/profile_config.rs:7 β€” // TODO: this should be remove once -Zprofile-rustflags is 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.
  • TodoComment tests/testsuite/profile_targets.rs:245 β€” // TODO: "PROFILE" says debug both times, though! β€” 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/testsuite/profile_trim_paths.rs:950 β€” // TODO: re-enable this check when rustc bootstrap disables remapping β€” 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/testsuite/profile_trim_paths.rs:1021 β€” // TODO: might want to move to test/testsuite/build_script.rs once 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.
  • TodoComment src/workspace/global_cache_tracker.rs:570 β€” // TODO: Investigate how slow this might be. β€” 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 src/workspace/global_cache_tracker.rs:1188 β€” // TODO: If delete crate, ensure src is also deleted. β€” 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 src/workspace/global_cache_tracker.rs:1829 β€” // contents. TODO: Verify behavior on Windows. β€” 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 src/workspace/global_cache_tracker.rs:1830 β€” // TODO: Or even better, switch to worktrees, and remove this. β€” 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 src/workspace/package.rs:48 β€” // TODO: is `manifest_path` a relic? β€” 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 src/workspace/registry.rs:957 β€” // TODO: In the future, it might be nice to add all of these β€” 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 src/util/command_prelude.rs:736 β€” // TODO Integrate into 'workspace' β€” 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 src/sources/path.rs:1170 β€” // TODO: Add a way to exclude folders? β€” 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 src/sources/path.rs:1198 β€” // TODO: filesystem/symlink implications? β€” 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 src/sources/git/utils.rs:341 β€” // TODO(git2): remove this when git2 supports shallow clone correctly β€” 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.
  • + 27 more in this group β€” see findings.md.
D3 Β· God Classes Β· FileTooLong Β· Γ—42
  • FileTooLong: parser/mod.rs src/workspace/parser/mod.rs β€” FileTooLong β€” 2619 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 54 free functions. The bar is 500 significant lines; this is 2119 over it, 5.24× 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: compiler/mod.rs src/compiler/mod.rs β€” FileTooLong β€” 1603 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 41 free functions. The bar is 500 significant lines; this is 1103 over it, 3.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: workspace/workspace.rs src/workspace/workspace.rs β€” FileTooLong β€” 1369 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: Workspace (2 blocks, 51-1842). The bar is 500 significant lines; this is 869 over it, 2.74× 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: manifest/mod.rs crates/cargo-util-schemas/src/manifest/mod.rs β€” FileTooLong β€” 1319 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 819 over it, 2.64× 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: context/mod.rs src/context/mod.rs β€” FileTooLong β€” 1290 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), about 73% of them inside a single declaration: GlobalContext (2 blocks, 154-1855). The bar is 500 significant lines; this is 790 over it, 2.58× 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: workspace/global_cache_tracker.rs src/workspace/global_cache_tracker.rs β€” FileTooLong β€” 1121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), about 65% of them inside a single declaration: GlobalCacheTracker (2 blocks, 335-1358). The bar is 500 significant lines; this is 621 over it, 2.24× 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: git/utils.rs src/sources/git/utils.rs β€” FileTooLong β€” 1070 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 570 over it, 2.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: util/command_prelude.rs src/util/command_prelude.rs β€” FileTooLong β€” 1062 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 562 over it, 2.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: fingerprint/mod.rs src/compiler/fingerprint/mod.rs β€” FileTooLong β€” 1017 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 517 over it, 2.03× 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: cargo_add/mod.rs src/ops/cargo_add/mod.rs β€” FileTooLong β€” 998 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 498 over it, 2.00× 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: parser/targets.rs src/workspace/parser/targets.rs β€” FileTooLong β€” 925 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), declaring 41 free functions. The bar is 500 significant lines; this is 425 over it, 1.85× 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: workspace/features.rs src/workspace/features.rs β€” FileTooLong β€” 918 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 418 over it, 1.84× 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: compiler/custom_build.rs src/compiler/custom_build.rs β€” FileTooLong β€” 866 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 366 over it, 1.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: cargo_package/mod.rs src/ops/cargo_package/mod.rs β€” FileTooLong β€” 847 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 347 over it, 1.69× 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: cargo_fix/mod.rs src/ops/cargo_fix/mod.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: workspace/profiles.rs src/workspace/profiles.rs β€” FileTooLong β€” 820 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 320 over it, 1.64× 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: cargo_compile/mod.rs src/ops/cargo_compile/mod.rs β€” FileTooLong β€” 808 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 308 over it, 1.62× 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: workspace/manifest.rs src/workspace/manifest.rs β€” FileTooLong β€” 807 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 307 over it, 1.61× 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: compiler/unit_dependencies.rs src/compiler/unit_dependencies.rs β€” FileTooLong β€” 733 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 233 over it, 1.47× 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: ops/cargo_update.rs src/ops/cargo_update.rs β€” FileTooLong β€” 727 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 227 over it, 1.45× 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: job_queue/mod.rs src/compiler/job_queue/mod.rs β€” FileTooLong β€” 715 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), about 69% of them inside a single declaration: DrainState (2 blocks, 173-1316). The bar is 500 significant lines; this is 215 over it, 1.43× 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: ops/cargo_install.rs src/ops/cargo_install.rs β€” FileTooLong β€” 711 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 211 over it, 1.42× 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: sources/path.rs src/sources/path.rs β€” FileTooLong β€” 698 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 198 over it, 1.40× 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: ops/cargo_new.rs src/ops/cargo_new.rs β€” FileTooLong β€” 679 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 179 over it, 1.36× 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: editor/dependency.rs src/workspace/editor/dependency.rs β€” FileTooLong β€” 657 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), about 70% of them inside a single declaration: Dependency (6 blocks, 25-730). The bar is 500 significant lines; this is 157 over it, 1.31× 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.
  • + 17 more in this group β€” see findings.md.
D3 Β· God Classes Β· FunctionTooLong Β· Γ—31
  • FunctionTooLong: cargo::workspace::parser::to_real_manifest src/workspace/parser/mod.rs:1305 β€” FunctionTooLong β€” cargo::workspace::parser::to_real_manifest runs 515 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 415 over it, 5.15× 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: cargo::ops::cargo_compile::create_bcx src/ops/cargo_compile/mod.rs:252 β€” FunctionTooLong β€” cargo::ops::cargo_compile::create_bcx runs 323 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 223 over it, 3.23× 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: cargo::resolver::errors::activation_error src/resolver/errors.rs:77 β€” FunctionTooLong β€” cargo::resolver::errors::activation_error runs 319 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 219 over it, 3.19× 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: cargo::compiler::custom_build::build_work src/compiler/custom_build.rs:332 β€” FunctionTooLong β€” cargo::compiler::custom_build::build_work runs 273 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 173 over it, 2.73× 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: cargo::workspace::parser::normalize_toml src/workspace/parser/mod.rs:314 β€” FunctionTooLong β€” cargo::workspace::parser::normalize_toml runs 269 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 169 over it, 2.69× 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: cargo::workspace::parser::prepare_toml_for_publish src/workspace/parser/mod.rs:3080 β€” FunctionTooLong β€” cargo::workspace::parser::prepare_toml_for_publish runs 230 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 130 over it, 2.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: cargo::ops::registry::cargo_publish::publish src/ops/registry/cargo_publish.rs:72 β€” FunctionTooLong β€” cargo::ops::registry::cargo_publish::publish runs 218 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 118 over it, 2.18× 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: cargo::workspace::parser::normalize_package_toml src/workspace/parser/mod.rs:644 β€” FunctionTooLong β€” cargo::workspace::parser::normalize_package_toml runs 198 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 98 over it, 1.98× 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: cargo::ops::cargo_vendor::sync src/ops/cargo_vendor.rs:120 β€” FunctionTooLong β€” cargo::ops::cargo_vendor::sync runs 197 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 97 over it, 1.97× 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: cargo::resolver::activate_deps_loop src/resolver/mod.rs:195 β€” FunctionTooLong β€” cargo::resolver::activate_deps_loop runs 194 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 94 over it, 1.94× 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: cargo::ops::cargo_clean::clean_specs src/ops/cargo_clean.rs:188 β€” FunctionTooLong β€” cargo::ops::cargo_clean::clean_specs runs 178 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 78 over it, 1.78× 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: cargo::ops::cargo_add::add src/ops/cargo_add/mod.rs:75 β€” FunctionTooLong β€” cargo::ops::cargo_add::add runs 175 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 75 over it, 1.75× 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: cargo::bin::cargo::commands::add::cli src/bin/cargo/commands/add.rs:16 β€” FunctionTooLong β€” cargo::bin::cargo::commands::add::cli runs 144 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 44 over it, 1.44× 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: cargo::ops::cargo_add::resolve_dependency src/ops/cargo_add/mod.rs:343 β€” FunctionTooLong β€” cargo::ops::cargo_add::resolve_dependency runs 144 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 44 over it, 1.44× 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: cargo::sources::git::known_hosts::certificate_check src/sources/git/known_hosts.rs:151 β€” FunctionTooLong β€” cargo::sources::git::known_hosts::certificate_check 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.
  • FunctionTooLong: cargo::ops::resolve::resolve_ws_with_opts src/ops/resolve.rs:152 β€” FunctionTooLong β€” cargo::ops::resolve::resolve_ws_with_opts 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.
  • FunctionTooLong: cargo::bin::cargo::cli::cli src/bin/cargo/cli.rs:608 β€” FunctionTooLong β€” cargo::bin::cargo::cli::cli runs 136 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 36 over it, 1.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.
  • FunctionTooLong: cargo::ops::registry::cargo_info::view::pretty_view src/ops/registry/cargo_info/view.rs:16 β€” FunctionTooLong β€” cargo::ops::registry::cargo_info::view::pretty_view runs 124 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 24 over it, 1.24× 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: cargo::diagnostics::rules::non_kebab_case_bins::lint_package_inner src/diagnostics/rules/non_kebab_case_bins.rs:84 β€” FunctionTooLong β€” cargo::diagnostics::rules::non_kebab_case_bins::lint_package_inner runs 123 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 23 over it, 1.23× 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: cargo::workspace::parser::to_dependency_source_id src/workspace/parser/mod.rs:2413 β€” FunctionTooLong β€” cargo::workspace::parser::to_dependency_source_id runs 121 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 21 over it, 1.21× 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: cargo::ops::cargo_new::mk src/ops/cargo_new.rs:724 β€” FunctionTooLong β€” cargo::ops::cargo_new::mk runs 120 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 20 over it, 1.20× 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: cargo::compiler::fingerprint::calculate_normal src/compiler/fingerprint/mod.rs:1552 β€” FunctionTooLong β€” cargo::compiler::fingerprint::calculate_normal runs 118 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 18 over it, 1.18× 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: cargo::ops::cargo_install::install src/ops/cargo_install.rs:708 β€” FunctionTooLong β€” cargo::ops::cargo_install::install runs 116 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 16 over it, 1.16× 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: cargo::sources::git::utils::with_authentication src/sources/git/utils.rs:657 β€” FunctionTooLong β€” cargo::sources::git::utils::with_authentication runs 115 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 15 over it, 1.15× 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: cargo::compiler::future_incompat::save_and_display_report src/compiler/future_incompat.rs:372 β€” FunctionTooLong β€” cargo::compiler::future_incompat::save_and_display_report 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.
  • + 6 more in this group β€” see findings.md.
D17 Β· Explicit Debt Β· HackComment Β· Γ—24
  • HackComment tests/testsuite/cache_messages.rs:72 β€” // Hack for issue in fwdansi 1.1. It is squashing multiple resets β€” 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 tests/build-std/main.rs:141 β€” // HACK: use an isolated the isolated CARGO_HOME environment (`build_std_isolated`) β€” 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 src/workspace/parser/embedded.rs:35 β€” // HACK: Since frontmatter open isn't valid TOML, we insert a comment β€” 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 src/sources/registry/mod.rs:776 β€” // HACK: While source knows nothing about yank policy, β€” 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 src/sources/git/utils.rs:934 β€” // Hack: libgit2 disallows overriding the error from check_cb since v1.8.0, β€” 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 src/resolver/dep_cache.rs:215 β€” /// HACK: `first_version` is not kept in the cache key is it is 1:1 with β€” 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 src/resolver/errors.rs:273 β€” // HACK: If this was a real candidate, we wouldn't hit this case. β€” 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 src/resolver/errors.rs:287 β€” // HACK: technically its unsupported and we shouldn't make assumptions β€” 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 src/ops/cargo_vendor.rs:492 β€” /// HACK: Perform the bare minimum of `prepare_for_publish` needed for #14348. β€” 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 src/ops/cargo_fix/mod.rs:325 β€” // HACK: Duplicate workspace migration logic between virtual manifests and real manifests to β€” 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 src/ops/cargo_fix/mod.rs:359 β€” // HACK: As workspace migration is a special case, only report it if something β€” 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 src/context/target.rs:137 β€” // HACK: support tables like `[target.thumbv8m.main-none-eabihf]` for β€” 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 src/compiler/build_context/target_info.rs:881 β€” // HACK: support tables like `[target.thumbv8m.main-none-eabihf]` for β€” 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 src/compiler/compilation.rs:379 β€” // HACK: `rustdoc --test` not only compiles but executes doctests. β€” 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 src/compiler/compilation.rs:383 β€” // hack is added for both phases. β€” 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 src/compiler/build_runner/compilation_files.rs:840 β€” // HACK: This is a temporary hack for fixing rust-lang/cargo#14253 β€” 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 src/compiler/build_runner/compilation_files.rs:916 β€” /// HACK: Detect the *potential* presence of `--remap-path-prefix` β€” 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 src/compiler/build_context/target_info.rs:265 β€” // HACK: abuse `--print=crate-name` to use `___` as a delimiter. β€” 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 crates/xtask-lint-docs/src/main.rs:135 β€” // HACK: `default` is a secondary group without its own level β€” 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 crates/cargo-util-schemas/src/schema.rs:16 β€” // HACK: this is both more and less permissive than `TomlValue` but its close β€” 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 crates/cargo-util-schemas/src/core/partial_version.rs:89 β€” // HACK: Leverage `VersionReq` for partial version parsing β€” 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 crates/cargo-util/src/paths.rs:452 β€” //HACK: avoid reading `~/.cargo/config` when testing Cargo itself. β€” 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 crates/build-rs/src/lib.rs:8 β€” // HACK: deferred resoling this β€” 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 crates/build-rs/src/lib.rs:9 β€” // HACK: deferred resoling this β€” 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.
D3 Β· God Classes Β· MethodTooLong Β· Γ—18
  • MethodTooLong: BuildOutput.parse src/compiler/custom_build.rs:806 β€” MethodTooLong β€” parse 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: TextRenderer.push_md crates/mdman/src/format/text.rs:93 β€” MethodTooLong β€” push_md runs 208 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 108 over it, 2.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: InstallablePackage.install_one src/ops/cargo_install.rs:337 β€” MethodTooLong β€” install_one runs 206 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 106 over it, 2.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.
  • MethodTooLong: ManRenderer.push_man crates/mdman/src/format/man.rs:102 β€” MethodTooLong β€” push_man runs 186 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 86 over it, 1.86× 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: InstallablePackage.new src/ops/cargo_install.rs:98 β€” MethodTooLong β€” new runs 155 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 55 over it, 1.55× 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: TargetInfo.new src/compiler/build_context/target_info.rs:176 β€” MethodTooLong β€” new runs 138 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 38 over it, 1.38× 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: DirtyReason.present_to src/compiler/fingerprint/dirty_reason.rs:151 β€” MethodTooLong β€” present_to runs 138 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 38 over it, 1.38× 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: ScriptSource.parse src/util/frontmatter.rs:23 β€” MethodTooLong β€” parse runs 128 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 28 over it, 1.28× 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: Dependency.from_toml src/workspace/editor/dependency.rs:224 β€” MethodTooLong β€” from_toml runs 128 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 28 over it, 1.28× 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: Dependency.update_toml src/workspace/editor/dependency.rs:508 β€” MethodTooLong β€” update_toml 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: SvgRenderer.render_pipeline_graph src/compiler/timings/timings.js:126 β€” MethodTooLong β€” render_pipeline_graph runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× 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: SvgRenderer.render_timing_graph src/compiler/timings/timings.js:360 β€” MethodTooLong β€” render_timing_graph runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× 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: DrainState.handle_event src/compiler/job_queue/mod.rs:616 β€” MethodTooLong β€” handle_event runs 119 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 19 over it, 1.19× 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: RegistrySource.query src/sources/registry/mod.rs:678 β€” MethodTooLong β€” query runs 110 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 10 over it, 1.10× 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: Workspace.missing_feature_spelling_suggestions src/workspace/workspace.rs:1400 β€” MethodTooLong β€” missing_feature_spelling_suggestions 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: PackageRegistry.patch src/workspace/registry.rs:324 β€” MethodTooLong β€” patch 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.
  • MethodTooLong: ArgMatchesExt.compile_options src/util/command_prelude.rs:743 β€” MethodTooLong β€” compile_options 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.
  • MethodTooLong: Fingerprint.compare src/compiler/fingerprint/mod.rs:1080 β€” MethodTooLong β€” compare 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.
D17 Β· Explicit Debt Β· FixmeComment Β· Γ—17
  • FixmeComment tests/testsuite/build_dir.rs:673 β€” // FIXME: The `.cargo-lock` file should be in target-dir not build-dir. See #16707
  • FixmeComment tests/testsuite/build_dir_fine_grain_locking.rs:601 β€” // FIXME: The `.cargo-lock` file should be in target-dir not build-dir. See #16707
  • FixmeComment tests/testsuite/build_dir_legacy.rs:614 β€” // FIXME: The `.cargo-lock` file should be in target-dir not build-dir. See #16707
  • FixmeComment tests/testsuite/freshness_mtime.rs:1412 β€” // FIXME: This is not rebuilding when it should. β€” 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/testsuite/pkgid.rs:276 β€” // FIXME: This fails since xyz is ambiguous, but the β€” 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/testsuite/script/rustc_fixtures/location-after-tokens.rs:5 β€” // FIXME(frontmatter): make this diagnostic better β€” 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/testsuite/script/rustc_fixtures/multifrontmatter.rs:6 β€” // FIXME(frontmatter): make this diagnostic better β€” 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 src/sources/git/known_hosts.rs:486 β€” // FIXME: Ideally the error message should include the IP address of the β€” 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 src/resolver/features.rs:844 β€” // FIXME: this needs to interact with the `default-target` β€” 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 src/ops/cargo_clean.rs:94 β€” // FIXME: https://github.com/rust-lang/cargo/issues/8790
  • FixmeComment src/ops/cargo_package/verify.rs:87 β€” // FIXME: Turn this on at some point in the future β€” 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 src/ops/cargo_fix/mod.rs:776 β€” // FIXME: The error message here is not correct with --broken-code. β€” 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 src/compiler/custom_build.rs:448 β€” // FIXME: We should handle raw-idents somehow instead of pretending they β€” 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 src/compiler/fingerprint/mod.rs:579 β€” // FIXME: it's basically buggy that we pass `None` to `call_box` β€” 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 src/compiler/fingerprint/mod.rs:1827 β€” /// FIXME(#6779) - see all the words above
  • FixmeComment src/compiler/fingerprint/mod.rs:1872 β€” // FIXME: this is somewhat buggy with respect to docker and β€” 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 crates/cargo-util/src/paths.rs:630 β€” // FIXME: This should probably panic or have a copy fallback. Symlinks β€” 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.
D15 Β· Churn × Complexity Hotspots Β· Hotspot Β· Γ—15
  • Hotspot: src/workspace/parser/mod.rs src/workspace/parser/mod.rs:1305 β€” src/workspace/parser/mod.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in cargo::workspace::parser::to_real_manifest at line 1305. 10 of those changes were fix/bug commits, and the other 11 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/workspace/parser/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: src/compiler/mod.rs src/compiler/mod.rs:319 β€” src/compiler/mod.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in cargo::compiler::rustc at line 319. 4 of those changes were fix/bug commits, and the other 17 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/compiler/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: src/workspace/features.rs src/workspace/features.rs:474 β€” src/workspace/features.rs changed 14 times in last 90 days, max cyclomatic complexity 31 in Features::status at line 474. 3 of those changes were fix/bug commits, and the other 11 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/workspace/features.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/sources/git/utils.rs src/sources/git/utils.rs:1028 β€” src/sources/git/utils.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in cargo::sources::git::utils::fetch at line 1028. 11 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/sources/git/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: src/compiler/custom_build.rs src/compiler/custom_build.rs:332 β€” src/compiler/custom_build.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in cargo::compiler::custom_build::build_work at line 332. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/compiler/custom_build.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/compiler/fingerprint/mod.rs src/compiler/fingerprint/mod.rs:1552 β€” src/compiler/fingerprint/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in cargo::compiler::fingerprint::calculate_normal at line 1552. 4 of those changes were fix/bug commits, and the other 8 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/compiler/fingerprint/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: src/workspace/profiles.rs src/workspace/profiles.rs:593 β€” src/workspace/profiles.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in cargo::workspace::profiles::merge_profile at line 593. 3 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/workspace/profiles.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/compiler/build_context/target_info.rs src/compiler/build_context/target_info.rs:176 β€” src/compiler/build_context/target_info.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in TargetInfo::new at line 176. 4 of those changes were fix/bug commits, and the other 8 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/compiler/build_context/target_info.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/ops/resolve.rs src/ops/resolve.rs:595 β€” src/ops/resolve.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in cargo::ops::resolve::register_previous_locks at line 595. 3 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/ops/resolve.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/ops/cargo_clean.rs src/ops/cargo_clean.rs:188 β€” src/ops/cargo_clean.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in cargo::ops::cargo_clean::clean_specs at line 188. 1 of those changes was a fix/bug commit, 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/ops/cargo_clean.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/sources/registry/mod.rs src/sources/registry/mod.rs:678 β€” src/sources/registry/mod.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in RegistrySource::query at line 678. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/sources/registry/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: src/bin/cargo/commands/install.rs src/bin/cargo/commands/install.rs:110 β€” src/bin/cargo/commands/install.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in cargo::bin::cargo::commands::install::exec at line 110. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/bin/cargo/commands/install.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/compiler/job_queue/mod.rs src/compiler/job_queue/mod.rs:616 β€” src/compiler/job_queue/mod.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in DrainState::handle_event at line 616. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/compiler/job_queue/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: crates/cargo-util/src/process_builder.rs crates/cargo-util/src/process_builder.rs:390 β€” crates/cargo-util/src/process_builder.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in ProcessBuilder::exec_with_streaming at line 390. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- crates/cargo-util/src/process_builder.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/diagnostics/rules/unused_dependencies.rs src/diagnostics/rules/unused_dependencies.rs:223 β€” src/diagnostics/rules/unused_dependencies.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in cargo::diagnostics::rules::unused_dependencies::lint_package_build_results at line 223. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/diagnostics/rules/unused_dependencies.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.
D4 Β· Code Duplication Β· Duplicated block (8 lines × 2) Β· Γ—13
  • Duplicated block (8 lines × 2) src/bin/cargo/commands/add.rs:198 β€” src/bin/cargo/commands/add.rs:198-205 | src/bin/cargo/commands/remove.rs:80-87 β€” before extracting anything, compare `src/bin/cargo/commands/add.rs` and `src/bin/cargo/commands/remove.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/bin/cargo/commands/add.rs:198` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) src/compiler/mod.rs:360 β€” src/compiler/mod.rs:360-367 | src/compiler/mod.rs:1079-1086 β€” 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) src/diagnostics/rules/min_opt_level_hint.rs:68 β€” src/diagnostics/rules/min_opt_level_hint.rs:68-75 | src/diagnostics/rules/mostly_unused_hint.rs:45-52 β€” 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) src/ops/cargo_update.rs:570 β€” src/ops/cargo_update.rs:570-577 | src/ops/cargo_update.rs:596-603 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_update.rs:570` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) src/workspace/features.rs:1116 β€” src/workspace/features.rs:1116-1123 | src/workspace/features.rs:1215-1222 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/features.rs:1116` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) src/workspace/package_id.rs:138 β€” src/workspace/package_id.rs:138-145 | src/workspace/source_id.rs:124-131 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/package_id.rs:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/workspace/global_cache_tracker.rs:1063 β€” src/workspace/global_cache_tracker.rs:1063-1070 | src/workspace/global_cache_tracker.rs:1121-1128 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/global_cache_tracker.rs:1063` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/ops/cargo_vendor.rs:507 β€” src/ops/cargo_vendor.rs:507-514 | src/workspace/parser/mod.rs:3050-3057 β€” before extracting anything, compare `src/ops/cargo_vendor.rs` and `src/workspace/parser/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_vendor.rs:507` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) src/util/diagnostic_server.rs:310 β€” src/util/diagnostic_server.rs:310-317 | src/util/lockserver.rs:149-156 β€” 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) src/diagnostics/rules/non_kebab_case_packages.rs:124 β€” src/diagnostics/rules/non_kebab_case_packages.rs:124-131 | src/diagnostics/rules/non_snake_case_packages.rs:124-131 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_packages.rs` and `src/diagnostics/rules/non_snake_case_packages.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/non_kebab_case_packages.rs:124` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) src/sources/git/oxide.rs:133 β€” src/sources/git/oxide.rs:133-140 | src/sources/git/oxide.rs:157-164 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/sources/git/oxide.rs:133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/ops/cargo_add/mod.rs:851 β€” src/ops/cargo_add/mod.rs:851-858 | src/ops/cargo_add/mod.rs:1011-1018 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_add/mod.rs:851` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/cargo-util/src/process_error.rs:73 β€” crates/cargo-util/src/process_error.rs:73-80 | crates/cargo-util/src/process_error.rs:82-89 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cargo-util/src/process_error.rs:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 2) Β· Γ—9
  • Duplicated block (10 lines × 2) crates/mdman/src/format/man.rs:308 β€” crates/mdman/src/format/man.rs:308-317 | crates/mdman/src/format/text.rs:267-276 β€” before extracting anything, compare `crates/mdman/src/format/man.rs` and `crates/mdman/src/format/text.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/mdman/src/format/man.rs:308` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) credential/cargo-credential-1password/src/main.rs:94 β€” credential/cargo-credential-1password/src/main.rs:94-103 | credential/cargo-credential-1password/src/main.rs:141-150 β€” 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `credential/cargo-credential-1password/src/main.rs:140` calls `run_cmd` and `credential/cargo-credential-1password/src/main.rs:93` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) src/compiler/compilation.rs:533 β€” src/compiler/compilation.rs:533-542 | src/compiler/compilation.rs:581-590 β€” 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) src/diagnostics/rules/non_kebab_case_packages.rs:91 β€” src/diagnostics/rules/non_kebab_case_packages.rs:91-100 | src/diagnostics/rules/non_snake_case_packages.rs:91-100 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_packages.rs` and `src/diagnostics/rules/non_snake_case_packages.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/non_kebab_case_packages.rs:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/ops/cargo_add/mod.rs:375 β€” src/ops/cargo_add/mod.rs:375-384 | src/ops/cargo_add/mod.rs:412-421 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_add/mod.rs:375` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/ops/cargo_package/vcs.rs:311 β€” src/ops/cargo_package/vcs.rs:311-320 | src/ops/cargo_package/vcs.rs:433-442 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_package/vcs.rs:311` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/ops/cargo_update.rs:576 β€” src/ops/cargo_update.rs:576-585 | src/ops/cargo_update.rs:623-632 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_update.rs:576` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/compiler/build_runner/compilation_files.rs:1041 β€” src/compiler/build_runner/compilation_files.rs:1041-1050 | src/compiler/build_runner/compilation_files.rs:1090-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/diagnostics/rules/unused_workspace_dependencies.rs:154 β€” src/diagnostics/rules/unused_workspace_dependencies.rs:154-163 | src/diagnostics/rules/unused_workspace_package_fields.rs:123-132 β€” before extracting anything, compare `src/diagnostics/rules/unused_workspace_dependencies.rs` and `src/diagnostics/rules/unused_workspace_package_fields.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/unused_workspace_dependencies.rs:154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 2) Β· Γ—9
  • Duplicated block (6 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs:84 β€” src/diagnostics/rules/text_direction_codepoint_in_comment.rs:84-89 | src/diagnostics/rules/text_direction_codepoint_in_literal.rs:85-90 β€” before extracting anything, compare `src/diagnostics/rules/text_direction_codepoint_in_comment.rs` and `src/diagnostics/rules/text_direction_codepoint_in_literal.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/text_direction_codepoint_in_comment.rs:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs:101 β€” src/diagnostics/rules/text_direction_codepoint_in_comment.rs:101-106 | src/diagnostics/rules/text_direction_codepoint_in_literal.rs:103-108 β€” before extracting anything, compare `src/diagnostics/rules/text_direction_codepoint_in_comment.rs` and `src/diagnostics/rules/text_direction_codepoint_in_literal.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/text_direction_codepoint_in_comment.rs:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs:111 β€” src/diagnostics/rules/text_direction_codepoint_in_comment.rs:111-116 | src/diagnostics/rules/text_direction_codepoint_in_literal.rs:152-157 β€” before extracting anything, compare `src/diagnostics/rules/text_direction_codepoint_in_comment.rs` and `src/diagnostics/rules/text_direction_codepoint_in_literal.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/text_direction_codepoint_in_comment.rs:111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/workspace/editor/dependency.rs:269 β€” src/workspace/editor/dependency.rs:269-274 | src/workspace/editor/dependency.rs:302-307 β€” 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) crates/crates-io/lib.rs:335 β€” crates/crates-io/lib.rs:335-340 | crates/crates-io/lib.rs:342-347 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/crates-io/lib.rs:335` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/cargo-util-schemas/src/core/partial_version.rs:156 β€” crates/cargo-util-schemas/src/core/partial_version.rs:156-161 | crates/cargo-util-schemas/src/manifest/rust_version.rs:113-118 β€” 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 (6 lines × 2) src/sources/source.rs:61 β€” src/sources/source.rs:61-66 | src/workspace/registry.rs:53-58 β€” 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 (6 lines × 2) src/compiler/build_context/target_info.rs:1151 β€” src/compiler/build_context/target_info.rs:1151-1156 | src/compiler/build_runner/compilation_files.rs:197-202 β€” 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 (6 lines × 2) src/compiler/build_runner/mod.rs:635 β€” src/compiler/build_runner/mod.rs:635-640 | src/compiler/build_runner/mod.rs:729-737 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/compiler/build_runner/mod.rs:635` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D3 Β· God Classes Β· TooManyMethods Β· Γ—8
  • TooManyMethods: GlobalContext src/context/mod.rs:154 β€” TooManyMethods β€” 94 methods. The bar is 30 methods; this is 64 over it, 3.13× the bar. This type is on a published API surface β€” a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual β€” so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
  • TooManyMethods: Workspace src/workspace/workspace.rs:51 β€” TooManyMethods β€” 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. This type is on a published API surface β€” a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual β€” so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
  • TooManyMethods: Target src/workspace/manifest.rs:313 β€” TooManyMethods β€” 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. This type is on a published API surface β€” a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual β€” so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
  • TooManyMethods: SourceId src/workspace/source_id.rs:40 β€” TooManyMethods β€” 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. This type is on a published API surface β€” a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual β€” so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
  • TooManyMethods: Manifest src/workspace/manifest.rs:66 β€” TooManyMethods β€” 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. This type is on a published API surface β€” a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual β€” so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
  • TooManyMethods: Shell crates/cargo-util-terminal/src/shell.rs:17 β€” TooManyMethods β€” 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. This type is on a published API surface β€” a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual β€” so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
  • TooManyMethods: Dependency src/workspace/dependency.rs:23 β€” TooManyMethods β€” 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. This type is on a published API surface β€” a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual β€” so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
  • TooManyMethods: ProcessBuilder crates/cargo-util/src/process_builder.rs:29 β€” TooManyMethods β€” 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. This type is on a published API surface β€” a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual β€” so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 2) Β· Γ—8
  • Duplicated block (9 lines × 2) crates/home/src/env.rs:69 β€” crates/home/src/env.rs:69-77 | crates/home/src/env.rs:102-110 β€” 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) src/compiler/mod.rs:847 β€” src/compiler/mod.rs:847-856 | src/compiler/mod.rs:926-934 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/compiler/mod.rs:847` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/diagnostics/rules/non_kebab_case_packages.rs:146 β€” src/diagnostics/rules/non_kebab_case_packages.rs:146-154 | src/diagnostics/rules/non_snake_case_packages.rs:146-154 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_packages.rs` and `src/diagnostics/rules/non_snake_case_packages.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/non_kebab_case_packages.rs:146` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/ops/cargo_add/mod.rs:76 β€” src/ops/cargo_add/mod.rs:76-84 | src/ops/cargo_remove.rs:27-35 β€” 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&AddOptions<'_>` in one and `&RemoveOptions<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) src/ops/registry/cargo_info/mod.rs:144 β€” src/ops/registry/cargo_info/mod.rs:144-152 | src/ops/registry/cargo_info/mod.rs:155-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/registry/cargo_info/mod.rs:144` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/compiler/timings/mod.rs:136 β€” src/compiler/timings/mod.rs:136-144 | src/ops/cargo_report/util.rs:96-104 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/compiler/timings/mod.rs:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/compiler/build_context/target_info.rs:449 β€” src/compiler/build_context/target_info.rs:449-457 | src/compiler/build_context/target_info.rs:485-499 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/compiler/build_context/target_info.rs:449` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) src/util/command_prelude.rs:782 β€” src/util/command_prelude.rs:782-792 | src/util/command_prelude.rs:793-801 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/util/command_prelude.rs:782` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 2) Β· Γ—8
  • Duplicated block (7 lines × 2) src/bin/cargo/commands/help/mod.rs:239 β€” src/bin/cargo/commands/help/mod.rs:239-245 | src/bin/cargo/commands/help/mod.rs:248-254 β€” 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) src/ops/cargo_clean.rs:66 β€” src/ops/cargo_clean.rs:66-72 | src/ops/cargo_clean.rs:84-90 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_clean.rs:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/ops/cargo_install.rs:832 β€” src/ops/cargo_install.rs:832-838 | src/ops/cargo_uninstall.rs:49-59 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_install.rs:832` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/util/command_prelude.rs:224 β€” src/util/command_prelude.rs:224-230 | src/util/command_prelude.rs:248-254 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/util/command_prelude.rs:224` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) src/bin/cargo/commands/remove.rs:253 β€” src/bin/cargo/commands/remove.rs:253-259 | src/bin/cargo/commands/remove.rs:350-356 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/bin/cargo/commands/remove.rs:253` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/workspace/global_cache_tracker.rs:1290 β€” src/workspace/global_cache_tracker.rs:1290-1296 | src/workspace/global_cache_tracker.rs:1344-1350 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/global_cache_tracker.rs:1290` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/workspace/global_cache_tracker.rs:1301` calls `push`, `join` and `src/workspace/global_cache_tracker.rs:1355` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) src/sources/git/utils.rs:1220 β€” src/sources/git/utils.rs:1220-1226 | src/sources/git/utils.rs:1228-1234 β€” 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) crates/cargo-test-macro/src/lib.rs:143 β€” crates/cargo-test-macro/src/lib.rs:143-149 | crates/cargo-test-macro/src/lib.rs:154-160 β€” 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 Β· Γ—7
  • ClassTooLong: Workspace src/workspace/workspace.rs:51 β€” ClassTooLong β€” 1027 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), 72 methods, 2 blocks, lines 51-1842. The bar is 400 significant lines; this is 627 over it, 2.57× 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: GlobalContext src/context/mod.rs:154 β€” ClassTooLong β€” 944 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), 94 methods, 2 blocks, lines 154-1855. The bar is 400 significant lines; this is 544 over it, 2.36× 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: GlobalCacheTracker src/workspace/global_cache_tracker.rs:335 β€” ClassTooLong β€” 725 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), 29 methods, 2 blocks, lines 335-1358. The bar is 400 significant lines; this is 325 over it, 1.81× 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: UnitGenerator src/ops/cargo_compile/unit_generator.rs:50 β€” ClassTooLong β€” 497 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), 13 methods, 2 blocks, lines 50-794. The bar is 400 significant lines; this is 97 over it, 1.24× 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: DrainState src/compiler/job_queue/mod.rs:173 β€” ClassTooLong β€” 494 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), 15 methods, 2 blocks, lines 173-1316. The bar is 400 significant lines; this is 94 over it, 1.24× 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: BuildRunner src/compiler/build_runner/mod.rs:40 β€” ClassTooLong β€” 474 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), 23 methods, 2 blocks, lines 40-818. The bar is 400 significant lines; this is 74 over it, 1.19× 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: Dependency src/workspace/editor/dependency.rs:25 β€” ClassTooLong β€” 462 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β€” #[cfg(test)] modules and bare #[test] functions β€” not counted), 23 methods, 6 blocks, lines 25-730. The bar is 400 significant lines; this is 62 over it, 1.16× 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.
D5 Β· Coupling Β· Off the main sequence Β· Γ—7
  • Off the main sequence: cargo-platform β€” cargo-platform: 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: cargo-util β€” cargo-util: abstractness 0.00, instability 0.00, distance 1.00 β€” zone of pain β€” concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: cargo-util-schemas β€” cargo-util-schemas: 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: rustfix β€” rustfix: 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: crates-io β€” crates-io: abstractness 0.07, instability 0.00, distance 0.93 β€” zone of pain β€” concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: cargo-credential β€” cargo-credential: abstractness 0.10, instability 0.00, distance 0.90 β€” zone of pain β€” concrete and depended on by 6 project(s), so it's rigid to change.
  • Off the main sequence: cargo-util-terminal β€” cargo-util-terminal: abstractness 0.00, instability 0.25, distance 0.75 β€” zone of pain β€” concrete and depended on by 3 project(s), so it's rigid to change.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 2) Β· Γ—6
  • Duplicated block (11 lines × 2) src/diagnostics/rules/non_kebab_case_features.rs:90 β€” src/diagnostics/rules/non_kebab_case_features.rs:90-100 | src/diagnostics/rules/non_snake_case_features.rs:90-100 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_features.rs` and `src/diagnostics/rules/non_snake_case_features.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/non_kebab_case_features.rs:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs:149 β€” src/diagnostics/rules/text_direction_codepoint_in_comment.rs:149-159 | src/diagnostics/rules/text_direction_codepoint_in_literal.rs:191-201 β€” before extracting anything, compare `src/diagnostics/rules/text_direction_codepoint_in_comment.rs` and `src/diagnostics/rules/text_direction_codepoint_in_literal.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/text_direction_codepoint_in_comment.rs:149` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/util/semver_eval_ext.rs:168 β€” src/util/semver_eval_ext.rs:168-178 | src/util/semver_eval_ext.rs:204-214 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/util/semver_eval_ext.rs:168` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/workspace/workspace.rs:1506 β€” src/workspace/workspace.rs:1506-1516 | src/workspace/workspace.rs:1522-1532 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/workspace.rs:1506` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/bin/cargo/commands/package.rs:63 β€” src/bin/cargo/commands/package.rs:63-73 | src/bin/cargo/commands/publish.rs:46-56 β€” 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 (11 lines × 2) src/ops/registry/cargo_info/view.rs:286 β€” src/ops/registry/cargo_info/view.rs:286-296 | src/ops/registry/cargo_info/view.rs:373-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/registry/cargo_info/view.rs:286` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 Β· Cognitive Complexity Β· DrainState Β· Γ—5
  • DrainState::report_warning_count (cognitive 26) src/compiler/job_queue/mod.rs:1111 β€” DrainState::report_warning_count has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 3, match/switch 2 (nesting depth added 12). 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.
  • DrainState::drain_the_queue (cognitive 25) src/compiler/job_queue/mod.rs:806 β€” DrainState::drain_the_queue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 2 (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.
  • DrainState::note_working_on (cognitive 20) src/compiler/job_queue/mod.rs:1231 β€” DrainState::note_working_on has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, 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.
  • DrainState::handle_event (cognitive 18) src/compiler/job_queue/mod.rs:616 β€” DrainState::handle_event has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 9). 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.
  • DrainState::emit_log_messages (cognitive 18) src/compiler/job_queue/mod.rs:1042 β€” DrainState::emit_log_messages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 2 (5 pts), match/switch 1 (5 pts), boolean chains 2 (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.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 2) Β· Γ—5
  • Duplicated block (12 lines × 2) crates/cargo-util-terminal/src/shell.rs:329 β€” crates/cargo-util-terminal/src/shell.rs:329-340 | crates/cargo-util-terminal/src/shell.rs:343-354 β€” 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) src/bin/cargo/commands/add.rs:184 β€” src/bin/cargo/commands/add.rs:184-195 | src/bin/cargo/commands/remove.rs:65-76 β€” before extracting anything, compare `src/bin/cargo/commands/add.rs` and `src/bin/cargo/commands/remove.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/bin/cargo/commands/add.rs:184` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/ops/cargo_add/mod.rs:197 β€” src/ops/cargo_add/mod.rs:197-208 | src/ops/cargo_add/mod.rs:221-232 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_add/mod.rs:197` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/ops/cargo_update.rs:613 β€” src/ops/cargo_update.rs:613-624 | src/ops/cargo_update.rs:634-645 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_update.rs:613` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/compiler/compilation.rs:545 β€” src/compiler/compilation.rs:545-556 | src/compiler/compilation.rs:593-604 β€” 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.
D30 Β· Dependency Vulnerabilities Β· Medium advisory (unmaintained) Β· Γ—4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· Medium vulnerability Β· Γ—4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 Β· Code Duplication Β· Edited copy of a member (18 corresponding lines) Β· Γ—4
  • Edited copy of a member (18 corresponding lines) src/workspace/editor/manifest.rs:102 β€” src/workspace/editor/manifest.rs:102-119 | src/workspace/editor/manifest.rs:125-147 β€” These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/util/workspace.rs:49 β€” src/util/workspace.rs:49-66 | src/util/workspace.rs:68-92 β€” These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/bin/cargo/commands/add.rs:390 β€” src/bin/cargo/commands/add.rs:390-407 | src/bin/cargo/commands/remove.rs:142-162 β€” These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/util/cache_lock.rs:218 β€” src/util/cache_lock.rs:218-236 | src/util/cache_lock.rs:239-256 β€” These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (11 corresponding lines) Β· Γ—4
  • Edited copy of a member (11 corresponding lines) crates/cargo-util-schemas/src/sbom.rs:55 β€” crates/cargo-util-schemas/src/sbom.rs:55-65 | src/workspace/manifest.rs:233-243 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/cargo-platform/src/cfg.rs:109 β€” crates/cargo-platform/src/cfg.rs:109-119 | crates/cargo-platform/src/cfg.rs:181-191 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/compiler/compilation.rs:295 β€” src/compiler/compilation.rs:295-305 | src/compiler/compilation.rs:316-329 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/cargo-test-support/src/compare.rs:108 β€” crates/cargo-test-support/src/compare.rs:108-118 | crates/cargo-test-support/src/compare.rs:163-175 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (14 corresponding lines) Β· Γ—4
  • Edited copy of a member (14 corresponding lines) src/workspace/workspace.rs:639 β€” src/workspace/workspace.rs:639-652 | src/workspace/workspace.rs:666-683 β€” These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/sources/replaced.rs:99 β€” src/sources/replaced.rs:99-117 | src/sources/replaced.rs:119-132 β€” These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/workspace/global_cache_tracker.rs:1737 β€” src/workspace/global_cache_tracker.rs:1737-1755 | src/workspace/global_cache_tracker.rs:1765-1778 β€” These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/compiler/trim_paths.rs:45 β€” src/compiler/trim_paths.rs:45-58 | src/compiler/trim_paths.rs:70-84 β€” These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (6 corresponding lines) Β· Γ—4
  • Edited copy of a member (6 corresponding lines) crates/crates-io/lib.rs:258 β€” crates/crates-io/lib.rs:258-263 | crates/crates-io/lib.rs:265-270 β€” These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/cargo-test-macro/src/lib.rs:422 β€” crates/cargo-test-macro/src/lib.rs:422-427 | src/bin/cargo/main.rs:332-337 β€” These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/cargo-util-schemas/src/manifest/mod.rs:2002 β€” crates/cargo-util-schemas/src/manifest/mod.rs:2002-2008 | crates/cargo-util-config/src/schema.rs:643-648 β€” These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/resolver-tests/src/helpers.rs:160 β€” crates/resolver-tests/src/helpers.rs:160-166 | crates/resolver-tests/src/helpers.rs:211-216 β€” These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (13 lines × 2) Β· Γ—4
  • Duplicated block (13 lines × 2) src/ops/cargo_clean.rs:295 β€” src/ops/cargo_clean.rs:295-307 | src/ops/cargo_clean.rs:377-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_clean.rs:295` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/ops/cargo_update.rs:749 β€” src/ops/cargo_update.rs:749-761 | src/ops/cargo_update.rs:764-776 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_update.rs:749` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/sources/path.rs:156 β€” src/sources/path.rs:156-168 | src/sources/path.rs:354-366 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/sources/path.rs:156` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) credential/cargo-credential-libsecret/src/lib.rs:219 β€” credential/cargo-credential-libsecret/src/lib.rs:219-231 | credential/cargo-credential-libsecret/src/lib.rs:241-253 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `credential/cargo-credential-libsecret/src/lib.rs:219` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 Β· Cyclomatic Complexity Β· Dependency Β· Γ—3
  • Dependency::update_toml (cyclomatic 27) src/workspace/editor/dependency.rs:508 β€” Dependency::update_toml 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.
  • Dependency::to_toml (cyclomatic 20) src/workspace/editor/dependency.rs:401 β€” Dependency::to_toml 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.
  • Dependency::from_toml (cyclomatic 18) src/workspace/editor/dependency.rs:224 β€” Dependency::from_toml 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.
D2 Β· Cognitive Complexity Β· Dependency Β· Γ—3
  • Dependency::update_toml (cognitive 65) src/workspace/editor/dependency.rs:508 β€” Dependency::update_toml has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (43 pts), loops 4 (12 pts), match/switch 5 (10 pts) (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.
  • Dependency::from_toml (cognitive 36) src/workspace/editor/dependency.rs:224 β€” Dependency::from_toml has cognitive complexity 36 (threshold 15). Drivers by points: if/else 23 (36 pts) (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.
  • Dependency::to_toml (cognitive 30) src/workspace/editor/dependency.rs:401 β€” Dependency::to_toml has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (27 pts), match/switch 2 (3 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 Β· BuildRunner Β· Γ—3
  • BuildRunner::compile (cognitive 60) src/compiler/build_runner/mod.rs:169 β€” BuildRunner::compile has cognitive complexity 60 (threshold 15). Drivers by points: loops 11 (31 pts), if/else 8 (26 pts), match/switch 1 (3 pts) (nesting depth added 40). 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.
  • BuildRunner::check_collisions (cognitive 38) src/compiler/build_runner/mod.rs:609 β€” BuildRunner::check_collisions has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 2 (3 pts), boolean chains 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.
  • BuildRunner::prepare (cognitive 18) src/compiler/build_runner/mod.rs:466 β€” BuildRunner::prepare has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 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 Β· UnitGenerator Β· Γ—3
  • UnitGenerator::find_named_targets (cognitive 43) src/ops/cargo_compile/unit_generator.rs:234 β€” UnitGenerator::find_named_targets has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 5 (16 pts), match/switch 2 (5 pts), boolean chains 3 (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.
  • UnitGenerator::create_proposals (cognitive 40) src/ops/cargo_compile/unit_generator.rs:375 β€” UnitGenerator::create_proposals has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 5 (10 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 22). 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.
  • UnitGenerator::validate_required_features (cognitive 16) src/ops/cargo_compile/unit_generator.rs:629 β€” UnitGenerator::validate_required_features has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), match/switch 3 (6 pts), boolean chains 2, loops 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 Β· Workspace Β· Γ—3
  • Workspace::validate_manifest (cognitive 24) src/workspace/workspace.rs:1177 β€” Workspace::validate_manifest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 1 (2 pts) (nesting depth added 14). 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.
  • Workspace::find_members (cognitive 22) src/workspace/workspace.rs:848 β€” Workspace::find_members has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (3 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.
  • Workspace::set_resolve_behavior (cognitive 17) src/workspace/workspace.rs:321 β€” Workspace::set_resolve_behavior has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 4 (7 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.
D3 Β· God Classes Β· TooManyFields Β· Γ—3
  • TooManyFields: GlobalContext src/context/mod.rs:154 β€” TooManyFields β€” 40 stored fields beside 94 methods. The bar is 30 stored fields; this is 10 over it, 1.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member β€” each reader then names only the group it uses.
  • TooManyFields: TomlPackage crates/cargo-util-schemas/src/manifest/mod.rs:176 β€” TooManyFields β€” 33 stored fields beside 19 methods. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member β€” each reader then names only the group it uses.
  • TooManyFields: Features src/workspace/features.rs:434 β€” TooManyFields β€” 32 stored fields beside 7 methods. The bar is 30 stored fields; this is 2 over it, 1.07× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member β€” each reader then names only the group it uses.
D30 Β· Dependency Vulnerabilities Β· Medium advisory (unsound) Β· Γ—3
  • REDACTED
  • REDACTED
  • REDACTED
D4 Β· Code Duplication Β· Edited copy of a member (21 corresponding lines) Β· Γ—3
  • Edited copy of a member (21 corresponding lines) src/workspace/parser/mod.rs:2931 β€” src/workspace/parser/mod.rs:2931-2954 | src/workspace/parser/mod.rs:2961-2981 β€” These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/util/cache_lock.rs:285 β€” src/util/cache_lock.rs:285-318 | src/util/cache_lock.rs:321-341 β€” These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) src/bin/cargo/commands/owner.rs:6 β€” src/bin/cargo/commands/owner.rs:6-34 | src/bin/cargo/commands/yank.rs:7-27 β€” These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (9 corresponding lines) Β· Γ—3
  • Edited copy of a member (9 corresponding lines) src/workspace/parser/targets.rs:771 β€” src/workspace/parser/targets.rs:771-779 | src/workspace/parser/targets.rs:781-794 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/compiler/build_context/target_info.rs:924 β€” src/compiler/build_context/target_info.rs:924-934 | src/compiler/build_context/target_info.rs:938-946 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/sources/registry/git_remote.rs:281 β€” src/sources/registry/git_remote.rs:281-289 | src/sources/registry/http_remote.rs:239-247 β€” These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (8 corresponding lines) Β· Γ—3
  • Edited copy of a member (8 corresponding lines) src/util/semver_ext.rs:95 β€” src/util/semver_ext.rs:95-106 | src/util/semver_ext.rs:111-118 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/ops/common_for_install_and_uninstall.rs:389 β€” src/ops/common_for_install_and_uninstall.rs:389-396 | src/ops/common_for_install_and_uninstall.rs:509-516 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/cargo-test-support/src/compare.rs:456 β€” crates/cargo-test-support/src/compare.rs:456-463 | crates/cargo-test-support/src/compare.rs:466-474 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 3) Β· Γ—3
  • Duplicated block (7 lines × 3) src/diagnostics/rules/manual_readme.rs:115 β€” src/diagnostics/rules/manual_readme.rs:115-123 | src/diagnostics/rules/non_kebab_case_packages.rs:92-98 | src/diagnostics/rules/non_snake_case_packages.rs:92-98 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_packages.rs` and `src/diagnostics/rules/non_snake_case_packages.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/manual_readme.rs:115` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 3) src/diagnostics/rules/non_kebab_case_bins.rs:236 β€” src/diagnostics/rules/non_kebab_case_bins.rs:236-242 | src/diagnostics/rules/non_kebab_case_packages.rs:145-151 | src/diagnostics/rules/non_snake_case_packages.rs:145-151 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_packages.rs` and `src/diagnostics/rules/non_snake_case_packages.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/non_kebab_case_bins.rs:236` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) src/workspace/global_cache_tracker.rs:434 β€” src/workspace/global_cache_tracker.rs:434-440 | src/workspace/global_cache_tracker.rs:458-464 | src/workspace/global_cache_tracker.rs:498-504 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/global_cache_tracker.rs:434` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 2) Β· Γ—3
  • Duplicated block (5 lines × 2) crates/cargo-util-config/src/schema.rs:389 β€” crates/cargo-util-config/src/schema.rs:389-393 | crates/cargo-util-config/src/schema.rs:846-850 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cargo-util-config/src/schema.rs:389` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/workspace/global_cache_tracker.rs:850 β€” src/workspace/global_cache_tracker.rs:850-855 | src/workspace/global_cache_tracker.rs:877-881 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/global_cache_tracker.rs:850` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/diagnostics/report.rs:17 β€” src/diagnostics/report.rs:17-21 | src/util/workspace.rs:137-141 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/report.rs:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 Β· Cyclomatic Complexity Β· InstallablePackage Β· Γ—2
  • InstallablePackage::install_one (cyclomatic 36) src/ops/cargo_install.rs:337 β€” InstallablePackage::install_one 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.
  • InstallablePackage::new (cyclomatic 23) src/ops/cargo_install.rs:98 β€” InstallablePackage::new 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 Β· DrainState Β· Γ—2
  • DrainState::handle_event (cyclomatic 22) src/compiler/job_queue/mod.rs:616 β€” DrainState::handle_event 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.
  • DrainState::drain_the_queue (cyclomatic 16) src/compiler/job_queue/mod.rs:806 β€” DrainState::drain_the_queue 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 Β· UnitGenerator Β· Γ—2
  • UnitGenerator::find_named_targets (cyclomatic 20) src/ops/cargo_compile/unit_generator.rs:234 β€” UnitGenerator::find_named_targets 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.
  • UnitGenerator::create_proposals (cyclomatic 18) src/ops/cargo_compile/unit_generator.rs:375 β€” UnitGenerator::create_proposals 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 Β· TargetInfo Β· Γ—2
  • TargetInfo::new (cyclomatic 17) src/compiler/build_context/target_info.rs:176 β€” TargetInfo::new 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.
  • TargetInfo::file_types (cyclomatic 17) src/compiler/build_context/target_info.rs:408 β€” TargetInfo::file_types has cyclomatic complexity 17 (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 Β· InstallablePackage Β· Γ—2
  • InstallablePackage::install_one (cognitive 66) src/ops/cargo_install.rs:337 β€” InstallablePackage::install_one has cognitive complexity 66 (threshold 15). Drivers by points: if/else 33 (54 pts), loops 5 (8 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 25). Of this number, 64 points are the body's own statements and 2 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.
  • InstallablePackage::new (cognitive 36) src/ops/cargo_install.rs:98 β€” InstallablePackage::new has cognitive complexity 36 (threshold 15). Drivers by points: if/else 26 (34 pts), boolean chains 2 (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.
D2 Β· Cognitive Complexity Β· TargetInfo Β· Γ—2
  • TargetInfo::new (cognitive 32) src/compiler/build_context/target_info.rs:176 β€” TargetInfo::new has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (7 pts), match/switch 3 (7 pts), boolean chains 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.
  • TargetInfo::file_types (cognitive 23) src/compiler/build_context/target_info.rs:408 β€” TargetInfo::file_types has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5, match/switch 1 (nesting depth added 4). 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 Β· Features Β· Γ—2
  • Features::status (cognitive 30) src/workspace/features.rs:474 β€” Features::status has cognitive complexity 30 (threshold 15). Drivers by points: if/else 30. 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.
  • Features::add (cognitive 19) src/workspace/features.rs:625 β€” Features::add has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 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.
D2 Β· Cognitive Complexity Β· FeatureResolver Β· Γ—2
  • FeatureResolver::activate_dep_feature (cognitive 23) src/resolver/features.rs:674 β€” FeatureResolver::activate_dep_feature has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 2 (3 pts), boolean chains 1 (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.
  • FeatureResolver::deps (cognitive 22) src/resolver/features.rs:775 β€” FeatureResolver::deps has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7, match/switch 3 (7 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 6). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 2 function items inside it that branch (artifact_features_for, platform_activated). 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.
D2 Β· Cognitive Complexity Β· PackageRegistry Β· Γ—2
  • PackageRegistry::query (cognitive 22) src/workspace/registry.rs:659 β€” PackageRegistry::query has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (5 pts), loops 2 (4 pts), boolean chains 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.
  • PackageRegistry::patch (cognitive 17) src/workspace/registry.rs:324 β€” PackageRegistry::patch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3, 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.
D3 Β· God Classes Β· TooManyFunctions Β· Γ—2
  • TooManyFunctions: build_rs::input crates/build-rs/src/input.rs:72 β€” TooManyFunctions β€” 45 free functions. The bar is 30 free functions; this is 15 over it, 1.50× the bar. This type is on a published API surface β€” a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual β€” so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
  • TooManyFunctions: cargo_util::paths crates/cargo-util/src/paths.rs:20 β€” TooManyFunctions β€” 43 free functions. The bar is 30 free functions; this is 13 over it, 1.43× the bar. This type is on a published API surface β€” a cargo-semver-checks gate in CI (REDACTED) declares its compatibility contractual β€” so moving members onto a smaller type is a breaking change for every consumer, not a local refactor. To reduce it, treat the split as an API migration: move each cohesive group onto its own published type and keep the old members as deprecated forwards for a deprecation period, removing them at the next compatibility break. Where the surface has to stay as it is, that is a decision to record rather than a change to make.
D30 Β· Dependency Vulnerabilities Β· Medium CVE Β· Γ—2
  • REDACTED
  • REDACTED
D36 Β· Supply-chain Provenance & Signing Β· REDACTED
  • REDACTED
  • REDACTED
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 21+ corresponding lines) Β· Γ—2
  • Edited copies of one member (3 members, 21+ corresponding lines) src/workspace/global_cache_tracker.rs:1050 β€” src/workspace/global_cache_tracker.rs:1050-1070 | src/workspace/global_cache_tracker.rs:1080-1128 | src/workspace/global_cache_tracker.rs:1313-1333 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) src/workspace/global_cache_tracker.rs:1656 β€” src/workspace/global_cache_tracker.rs:1656-1677 | src/workspace/global_cache_tracker.rs:1681-1703 | src/workspace/global_cache_tracker.rs:1707-1727 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (25 corresponding lines) Β· Γ—2
  • Edited copy of a member (25 corresponding lines) src/bin/cargo/commands/doc.rs:53 β€” src/bin/cargo/commands/doc.rs:53-77 | src/bin/cargo/commands/rustdoc.rs:54-88 β€” These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) src/util/semver_eval_ext.rs:78 β€” src/util/semver_eval_ext.rs:78-102 | src/util/semver_eval_ext.rs:105-129 β€” These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (15 corresponding lines) Β· Γ—2
  • Edited copy of a member (15 corresponding lines) crates/home/src/env.rs:67 β€” crates/home/src/env.rs:67-81 | crates/home/src/env.rs:100-114 β€” These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/diagnostics/rules/text_direction_codepoint_in_comment.rs:144 β€” src/diagnostics/rules/text_direction_codepoint_in_comment.rs:144-159 | src/diagnostics/rules/text_direction_codepoint_in_literal.rs:187-201 β€” These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (16 corresponding lines) Β· Γ—2
  • Edited copy of a member (16 corresponding lines) src/workspace/global_cache_tracker.rs:1288 β€” src/workspace/global_cache_tracker.rs:1288-1304 | src/workspace/global_cache_tracker.rs:1342-1357 β€” These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/bin/cargo/commands/init.rs:5 β€” src/bin/cargo/commands/init.rs:5-20 | src/bin/cargo/commands/new.rs:5-20 β€” These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (12 corresponding lines) Β· Γ—2
  • Edited copy of a member (12 corresponding lines) src/workspace/package_id.rs:131 β€” src/workspace/package_id.rs:131-147 | src/workspace/source_id.rs:122-133 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/util/command_prelude.rs:600 β€” src/util/command_prelude.rs:600-611 | src/util/command_prelude.rs:613-624 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (7 corresponding lines) Β· Γ—2
  • Edited copy of a member (7 corresponding lines) src/util/flock.rs:526 β€” src/util/flock.rs:526-532 | src/util/flock.rs:538-544 β€” These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/diagnostics/rules/min_opt_level_hint.rs:85 β€” src/diagnostics/rules/min_opt_level_hint.rs:85-91 | src/diagnostics/rules/mostly_unused_hint.rs:80-86 β€” These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (24 lines × 2) Β· Γ—2
  • Duplicated block (24 lines × 2) src/diagnostics/rules/unused_workspace_dependencies.rs:74 β€” src/diagnostics/rules/unused_workspace_dependencies.rs:74-97 | src/diagnostics/rules/unused_workspace_dependencies.rs:99-122 β€” 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 (24 lines × 2) src/util/network/http.rs:175 β€” src/util/network/http.rs:175-198 | src/util/network/http.rs:205-228 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/util/network/http.rs:175` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (15–18 lines × 2) Β· Γ—2
  • Duplicated block (15–18 lines × 2) src/compiler/custom_build.rs:897 β€” src/compiler/custom_build.rs:897-911 | src/compiler/custom_build.rs:918-935 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/compiler/custom_build.rs:897` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15–18 lines × 2) src/diagnostics/rules/unused_workspace_dependencies.rs:126 β€” src/diagnostics/rules/unused_workspace_dependencies.rs:126-140 | src/diagnostics/rules/unused_workspace_package_fields.rs:92-109 β€” before extracting anything, compare `src/diagnostics/rules/unused_workspace_dependencies.rs` and `src/diagnostics/rules/unused_workspace_package_fields.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/unused_workspace_dependencies.rs:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (15 lines × 2) Β· Γ—2
  • Duplicated block (15 lines × 2) src/diagnostics/rules/non_kebab_case_features.rs:139 β€” src/diagnostics/rules/non_kebab_case_features.rs:139-153 | src/diagnostics/rules/non_snake_case_features.rs:139-153 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_features.rs` and `src/diagnostics/rules/non_snake_case_features.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/non_kebab_case_features.rs:139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) src/ops/cargo_update.rs:554 β€” src/ops/cargo_update.rs:554-568 | src/ops/cargo_update.rs:580-594 β€” 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) Β· Γ—2
  • Duplicated block (14 lines × 2) src/bin/cargo/commands/add.rs:394 β€” src/bin/cargo/commands/add.rs:394-407 | src/bin/cargo/commands/remove.rs:149-162 β€” before extracting anything, compare `src/bin/cargo/commands/add.rs` and `src/bin/cargo/commands/remove.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/bin/cargo/commands/add.rs:394` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/ops/cargo_update.rs:307 β€” src/ops/cargo_update.rs:307-320 | src/ops/cargo_update.rs:358-371 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_update.rs:307` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (13–14 lines × 2) Β· Γ—2
  • Duplicated block (13–14 lines × 2) src/util/semver_eval_ext.rs:184 β€” src/util/semver_eval_ext.rs:184-197 | src/util/semver_eval_ext.rs:216-228 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/util/semver_eval_ext.rs:184` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–14 lines × 2) src/diagnostics/rules/manual_readme.rs:135 β€” src/diagnostics/rules/manual_readme.rs:135-147 | src/diagnostics/rules/redundant_homepage.rs:130-143 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/manual_readme.rs:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 3) Β· Γ—2
  • Duplicated block (12 lines × 3) src/diagnostics/rules/non_kebab_case_bins.rs:223 β€” src/diagnostics/rules/non_kebab_case_bins.rs:223-234 | src/diagnostics/rules/non_kebab_case_packages.rs:132-143 | src/diagnostics/rules/non_snake_case_packages.rs:132-143 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_packages.rs` and `src/diagnostics/rules/non_snake_case_packages.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/non_kebab_case_bins.rs:223` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) credential/cargo-credential-libsecret/src/lib.rs:180 β€” credential/cargo-credential-libsecret/src/lib.rs:180-191 | credential/cargo-credential-libsecret/src/lib.rs:219-230 | credential/cargo-credential-libsecret/src/lib.rs:241-252 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `credential/cargo-credential-libsecret/src/lib.rs:180` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (7–8 lines × 2) Β· Γ—2
  • Duplicated block (7–8 lines × 2) src/workspace/global_cache_tracker.rs:1056 β€” src/workspace/global_cache_tracker.rs:1056-1062 | src/workspace/global_cache_tracker.rs:1318-1325 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/global_cache_tracker.rs:1318` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) src/workspace/parser/mod.rs:2935 β€” src/workspace/parser/mod.rs:2935-2942 | src/workspace/parser/mod.rs:2967-2973 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/parser/mod.rs:2935` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D6 Β· Cohesion (LCOM4) Β· Low cohesion Β· Γ—2
  • Low cohesion: GlobalContext (LCOM4 5) src/context/mod.rs:154 β€” GlobalContext's methods fall into 5 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 5 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.
  • Low cohesion: LocalManifest (LCOM4 4) src/workspace/editor/manifest.rs:239 β€” LocalManifest'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.
D1 Β· Cyclomatic Complexity Β· TextRenderer Β· Γ—1
  • TextRenderer::push_md (cyclomatic 68) crates/mdman/src/format/text.rs:93 β€” TextRenderer::push_md has cyclomatic complexity 68 (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 Β· ManRenderer Β· Γ—1
  • ManRenderer::push_man (cyclomatic 64) crates/mdman/src/format/man.rs:102 β€” ManRenderer::push_man has cyclomatic complexity 64 (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 Β· BuildOutput Β· Γ—1
  • BuildOutput::parse (cyclomatic 43) src/compiler/custom_build.rs:806 β€” BuildOutput::parse has cyclomatic complexity 43 (threshold 15). Of this number, 37 points are the body's own statements and 6 belong to 3 function items inside it that branch. 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 Β· Features Β· Γ—1
  • Features::status (cyclomatic 31) src/workspace/features.rs:474 β€” Features::status has cyclomatic complexity 31 (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 Β· Fingerprint Β· Γ—1
  • Fingerprint::compare (cyclomatic 28) src/compiler/fingerprint/mod.rs:1080 β€” Fingerprint::compare 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.
D1 Β· Cyclomatic Complexity Β· RegistrySource Β· Γ—1
  • RegistrySource::query (cyclomatic 27) src/sources/registry/mod.rs:678 β€” RegistrySource::query 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 Β· TomlProfile Β· Γ—1
  • TomlProfile::merge (cyclomatic 24) crates/cargo-util-schemas/src/manifest/mod.rs:1147 β€” TomlProfile::merge 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.
D1 Β· Cyclomatic Complexity Β· ArgMatchesExt Β· Γ—1
  • ArgMatchesExt::compile_options (cyclomatic 22) src/util/command_prelude.rs:743 β€” ArgMatchesExt::compile_options 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.
D1 Β· Cyclomatic Complexity Β· BuildRunner Β· Γ—1
  • BuildRunner::compile (cyclomatic 21) src/compiler/build_runner/mod.rs:169 β€” BuildRunner::compile has cyclomatic complexity 21 (threshold 15). 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.
D1 Β· Cyclomatic Complexity Β· ProcessBuilder Β· Γ—1
  • ProcessBuilder::exec_with_streaming (cyclomatic 19) crates/cargo-util/src/process_builder.rs:390 β€” ProcessBuilder::exec_with_streaming 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 Β· Compilation Β· Γ—1
  • Compilation::fill_env (cyclomatic 19) src/compiler/compilation.rs:368 β€” Compilation::fill_env 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 Β· xtask_bump_check Β· Γ—1
  • xtask_bump_check::xtask::bump_check (cyclomatic 19) crates/xtask-bump-check/src/xtask.rs:114 β€” xtask_bump_check::xtask::bump_check 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 Β· Tokenizer Β· Γ—1
  • Tokenizer::next (cyclomatic 18) crates/cargo-platform/src/cfg.rs:385 β€” Tokenizer::next 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 Β· UnusedDepState Β· Γ—1
  • UnusedDepState::new (cyclomatic 17) src/compiler/unused_deps.rs:23 β€” UnusedDepState::new 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 Β· FeatureResolver Β· Γ—1
  • FeatureResolver::deps (cyclomatic 17) src/resolver/features.rs:775 β€” FeatureResolver::deps has cyclomatic complexity 17 (threshold 15). 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 (artifact_features_for, platform_activated). 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.
D1 Β· Cyclomatic Complexity Β· HandleConfiguration Β· Γ—1
  • HandleConfiguration::new (cyclomatic 17) src/util/network/http.rs:69 β€” HandleConfiguration::new has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to one function item inside it that branches. 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 Β· mdman Β· Γ—1
  • mdman::process_args (cyclomatic 16) crates/mdman/src/main.rs:63 β€” mdman::process_args has cyclomatic complexity 16 (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 Β· RegistryQueryerAsync Β· Γ—1
  • RegistryQueryerAsync::query (cyclomatic 16) src/resolver/dep_cache.rs:66 β€” RegistryQueryerAsync::query 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 Β· HttpBackend Β· Γ—1
  • HttpBackend::fetch_uncached_no_retry (cyclomatic 16) src/sources/registry/http_remote.rs:503 β€” HttpBackend::fetch_uncached_no_retry has cyclomatic complexity 16 (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.
D15 Β· Churn × Complexity Hotspots Β· Repeated repair Β· Γ—1
  • Repeated repair: src/compiler/trim_paths.rs src/compiler/trim_paths.rs:315 β€” src/compiler/trim_paths.rs changed 11 times in last 90 days and 6 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 cargo::compiler::trim_paths::write_unremap_file at line 315), AT OR 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(trim-paths): sanitize absolute source paths in fingerprint”; β€œfix(trim-paths): trim-paths as "none" by default”; β€œfix(trim-paths)!: unremap file in one JSON doc”; β€œfix(trim-paths)!: limit options to `none|object|all`”. 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:13 +00:00' --until='2026-11-14 14:06:13 +00:00' --full-history --no-merges -- src/compiler/trim_paths.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.
D17 Β· Explicit Debt Β· XxxComment Β· Γ—1
  • XxxComment src/workspace/workspace.rs:607 β€” // XXX: should this also take into account version numbers? β€” 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 Β· TextRenderer Β· Γ—1
  • TextRenderer::push_md (cognitive 104) crates/mdman/src/format/text.rs:93 β€” TextRenderer::push_md has cognitive complexity 104 (threshold 15). Drivers by points: if/else 22 (63 pts), match/switch 7 (26 pts), loops 4 (15 pts) (nesting depth added 71). 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 Β· ManRenderer Β· Γ—1
  • ManRenderer::push_man (cognitive 68) crates/mdman/src/format/man.rs:102 β€” ManRenderer::push_man has cognitive complexity 68 (threshold 15). Drivers by points: if/else 13 (37 pts), match/switch 8 (30 pts), loops 1 (nesting depth added 46). 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 Β· BuildOutput Β· Γ—1
  • BuildOutput::parse (cognitive 61) src/compiler/custom_build.rs:806 β€” BuildOutput::parse has cognitive complexity 61 (threshold 15). Drivers by points: if/else 23 (48 pts), match/switch 5 (10 pts), boolean chains 2, loops 1 (nesting depth added 30). Of this number, 51 points are the body's own statements and 10 belong to 3 function items inside it that branch. 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 Β· ArgMatchesExt Β· Γ—1
  • ArgMatchesExt::compile_options (cognitive 46) src/util/command_prelude.rs:743 β€” ArgMatchesExt::compile_options has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (28 pts), match/switch 4 (15 pts), loops 2 (3 pts) (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.
D2 Β· Cognitive Complexity Β· Fingerprint Β· Γ—1
  • Fingerprint::compare (cognitive 41) src/compiler/fingerprint/mod.rs:1080 β€” Fingerprint::compare has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (37 pts), loops 2, 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.
D2 Β· Cognitive Complexity Β· Tokenizer Β· Γ—1
  • Tokenizer::next (cognitive 40) crates/cargo-platform/src/cfg.rs:385 β€” Tokenizer::next has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 3 (7 pts), 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.
D2 Β· Cognitive Complexity Β· Compilation Β· Γ—1
  • Compilation::fill_env (cognitive 36) src/compiler/compilation.rs:368 β€” Compilation::fill_env has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 3 (7 pts), boolean chains 3 (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 Β· ManifestErrorContext Β· Γ—1
  • ManifestErrorContext::find_crate_span (cognitive 35) src/compiler/mod.rs:2524 β€” ManifestErrorContext::find_crate_span has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (30 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 21). 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 Β· RegistrySource Β· Γ—1
  • RegistrySource::query (cognitive 34) src/sources/registry/mod.rs:678 β€” RegistrySource::query has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (21 pts), match/switch 4 (6 pts), boolean chains 5, 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.
D2 Β· Cognitive Complexity Β· UnusedDepState Β· Γ—1
  • UnusedDepState::new (cognitive 33) src/compiler/unused_deps.rs:23 β€” UnusedDepState::new has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 5 (9 pts), boolean chains 4 (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 Β· semver_check Β· Γ—1
  • semver_check::doit (cognitive 33) crates/semver-check/src/main.rs:32 β€” semver_check::doit has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 2 (6 pts), loops 3 (5 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.
D2 Β· Cognitive Complexity Β· Display Β· Γ—1
  • Display::fmt (cognitive 32) src/ops/cargo_tree/format/mod.rs:60 β€” Display::fmt has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (24 pts), match/switch 3 (6 pts), loops 1 (2 pts) (nesting depth added 21). 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 Β· WorkerServer Β· Γ—1
  • WorkerServer::worker_loop (cognitive 32) src/util/network/http_async.rs:309 β€” WorkerServer::worker_loop has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (23 pts), match/switch 2 (6 pts), loops 2 (3 pts) (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 Β· xtask_bump_check Β· Γ—1
  • xtask_bump_check::xtask::bump_check (cognitive 32) crates/xtask-bump-check/src/xtask.rs:114 β€” xtask_bump_check::xtask::bump_check has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 5 (9 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 Β· ProcessBuilder Β· Γ—1
  • ProcessBuilder::exec_with_streaming (cognitive 30) crates/cargo-util/src/process_builder.rs:390 β€” ProcessBuilder::exec_with_streaming has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (24 pts), match/switch 3 (5 pts), loops 1 (nesting depth added 6). 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 Β· TomlProfile Β· Γ—1
  • TomlProfile::merge (cognitive 30) crates/cargo-util-schemas/src/manifest/mod.rs:1147 β€” TomlProfile::merge has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, match/switch 3 (8 pts), loops 1 (3 pts) (nesting depth added 7). 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 Β· ConflictStoreTrie Β· Γ—1
  • ConflictStoreTrie::find (cognitive 29) src/resolver/conflict_cache.rs:25 β€” ConflictStoreTrie::find has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 18). 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 Β· HttpBackend Β· Γ—1
  • HttpBackend::fetch_uncached_no_retry (cognitive 29) src/sources/registry/http_remote.rs:503 β€” HttpBackend::fetch_uncached_no_retry has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (10 pts), match/switch 2 (5 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.
D2 Β· Cognitive Complexity Β· RequirementError Β· Γ—1
  • RequirementError::into_activate_error (cognitive 28) src/resolver/dep_cache.rs:576 β€” RequirementError::into_activate_error has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 5 (9 pts), loops 1 (5 pts) (nesting depth added 17). 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 Β· LocalFingerprint Β· Γ—1
  • LocalFingerprint::find_stale_item (cognitive 26) src/compiler/fingerprint/mod.rs:933 β€” LocalFingerprint::find_stale_item has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 15). 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 Β· RegistryQueryerAsync Β· Γ—1
  • RegistryQueryerAsync::query (cognitive 25) src/resolver/dep_cache.rs:66 β€” RegistryQueryerAsync::query has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 2 (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 Β· PackageChange Β· Γ—1
  • PackageChange::with_diff (cognitive 24) src/ops/cargo_update.rs:700 β€” PackageChange::with_diff has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 6 (12 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 Β· GlobalContext Β· Γ—1
  • GlobalContext::include_paths (cognitive 22) src/context/mod.rs:1169 β€” GlobalContext::include_paths has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (9 pts), loops 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 Β· ConfigValue Β· Γ—1
  • ConfigValue::merge_helper (cognitive 20) crates/cargo-util-config/src/config_value.rs:150 β€” ConfigValue::merge_helper has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). 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 Β· InstallTracker Β· Γ—1
  • InstallTracker::check_upgrade (cognitive 20) src/ops/common_for_install_and_uninstall.rs:166 β€” InstallTracker::check_upgrade has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (2 pts), match/switch 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.
D2 Β· Cognitive Complexity Β· mdman Β· Γ—1
  • mdman::process_args (cognitive 19) crates/mdman/src/main.rs:63 β€” mdman::process_args has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 4 (7 pts), loops 1 (nesting depth added 10). 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 Β· SourceConfigMap Β· Γ—1
  • SourceConfigMap::add_config (cognitive 19) src/sources/config.rs:236 β€” SourceConfigMap::add_config has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 7 (8 pts), boolean chains 1 (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 Β· LockServer Β· Γ—1
  • LockServer::run (cognitive 19) src/util/lockserver.rs:77 β€” LockServer::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 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 Β· cargo_util Β· Γ—1
  • cargo_util::read2::imp::read2 (cognitive 18) crates/cargo-util/src/read2.rs:20 β€” cargo_util::read2::imp::read2 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 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 Β· ResolverContext Β· Γ—1
  • ResolverContext::flag_activated (cognitive 18) src/resolver/context.rs:64 β€” ResolverContext::flag_activated has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 2, match/switch 2 (nesting depth added 9). 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 Β· RemainingCandidates Β· Γ—1
  • RemainingCandidates::next (cognitive 17) src/resolver/mod.rs:750 β€” RemainingCandidates::next has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 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 Β· AuthorizationError Β· Γ—1
  • AuthorizationError::fmt (cognitive 17) src/util/auth/mod.rs:206 β€” AuthorizationError::fmt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 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 Β· DiagnosticPrinter Β· Γ—1
  • DiagnosticPrinter::print (cognitive 17) src/util/diagnostic_server.rs:106 β€” DiagnosticPrinter::print has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 1 (nesting depth added 6). 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 Β· ScriptSource Β· Γ—1
  • ScriptSource::parse (cognitive 17) src/util/frontmatter.rs:23 β€” ScriptSource::parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 4). 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 Β· ConfigMapAccess Β· Γ—1
  • ConfigMapAccess::new_struct (cognitive 16) crates/cargo-util-config/src/de.rs:284 β€” ConfigMapAccess::new_struct has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (7 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.
D2 Β· Cognitive Complexity Β· CompilationFiles Β· Γ—1
  • CompilationFiles::calc_outputs (cognitive 16) src/compiler/build_runner/compilation_files.rs:543 β€” CompilationFiles::calc_outputs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 5). 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 Β· CleanContext Β· Γ—1
  • CleanContext::rm_rf (cognitive 16) src/ops/cargo_clean.rs:527 β€” CleanContext::rm_rf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1, 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.
D2 Β· Cognitive Complexity Β· IgnoreList Β· Γ—1
  • IgnoreList::format_existing (cognitive 16) src/ops/cargo_new.rs:602 β€” IgnoreList::format_existing has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (6 pts), loops 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.
D35 Β· Change Coupling Β· Change coupling Β· Γ—1
  • Change coupling: mod.rs ↔ cargo_fetch.rs src/ops/cargo_compile/mod.rs:1 β€” `src/ops/cargo_compile/mod.rs` and `src/ops/cargo_fetch.rs` change together 85% of the time (11 of the 13 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 11 shared commits counted here, the most recent 3 are `301e7be5` docs: Update code comments to use 'target tuple'; `4a765759` feat(diag): Support build.warnings=deny in parse pass (at that commit the files were still `src/cargo/ops/cargo_compile/mod.rs` and `src/cargo/ops/cargo_fetch.rs`); `66d01408` refactor(diag): Put the caller in charge of parse pass rules (at that commit the files were still `src/cargo/ops/cargo_compile/mod.rs` and `src/cargo/ops/cargo_fetch.rs`) β€” run `git show` on any of them.
D35 Β· Change Coupling Β· Change coupling clique Β· Γ—1
  • Change coupling clique: blanket_hint_mostly_unused.rs, im_a_teapot.rs, unknown_lints.rs src/diagnostics/rules/blanket_hint_mostly_unused.rs β€” 3 files β€” `src/diagnostics/rules/blanket_hint_mostly_unused.rs`, `src/diagnostics/rules/im_a_teapot.rs`, `src/diagnostics/rules/unknown_lints.rs` β€” all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once β€” you do not need to break each pair individually.
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D4 Β· Code Duplication Β· Near-duplicate member family (4 members, 15 shared lines) Β· Γ—1
  • Near-duplicate member family (4 members, 15 shared lines) src/diagnostics/rules/non_kebab_case_features.rs:86 β€” src/diagnostics/rules/non_kebab_case_features.rs:86-153 | src/diagnostics/rules/non_kebab_case_packages.rs:86-154 | src/diagnostics/rules/non_snake_case_features.rs:86-153 | src/diagnostics/rules/non_snake_case_packages.rs:86-154 β€” These 4 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 Β· Near-duplicate member pair (69 shared lines) Β· Γ—1
  • Near-duplicate member pair (69 shared lines) crates/mdman/src/format/man.rs:102 β€” crates/mdman/src/format/man.rs:102-380 | crates/mdman/src/format/text.rs:93-371 β€” These two members are variants of one another: 69 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 Β· Near-duplicate member pair (43 shared lines) Β· Γ—1
  • Near-duplicate member pair (43 shared lines) src/diagnostics/rules/text_direction_codepoint_in_comment.rs:57 β€” src/diagnostics/rules/text_direction_codepoint_in_comment.rs:57-125 | src/diagnostics/rules/text_direction_codepoint_in_literal.rs:58-168 β€” These two members are variants of one another: 43 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 Β· Edited copy of a member (55 corresponding lines) Β· Γ—1
  • Edited copy of a member (55 corresponding lines) src/diagnostics/rules/manual_readme.rs:92 β€” src/diagnostics/rules/manual_readme.rs:92-147 | src/diagnostics/rules/redundant_homepage.rs:89-143 β€” These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (48 corresponding lines) Β· Γ—1
  • Edited copy of a member (48 corresponding lines) src/ops/cargo_update.rs:223 β€” src/ops/cargo_update.rs:223-272 | src/ops/cargo_update.rs:279-326 β€” These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (47 corresponding lines) Β· Γ—1
  • Edited copy of a member (47 corresponding lines) src/workspace/features.rs:1083 β€” src/workspace/features.rs:1083-1129 | src/workspace/features.rs:1182-1228 β€” These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (40 corresponding lines) Β· Γ—1
  • Edited copy of a member (40 corresponding lines) src/compiler/compilation.rs:524 β€” src/compiler/compilation.rs:524-563 | src/compiler/compilation.rs:566-606 β€” These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (60 corresponding lines) Β· Γ—1
  • Edited copy of a member (60 corresponding lines) src/workspace/parser/targets.rs:301 β€” src/workspace/parser/targets.rs:301-367 | src/workspace/parser/targets.rs:664-723 β€” These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (31 corresponding lines) Β· Γ—1
  • Edited copy of a member (31 corresponding lines) src/ops/cargo_vendor.rs:501 β€” src/ops/cargo_vendor.rs:501-531 | src/workspace/parser/mod.rs:3043-3075 β€” These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (29 corresponding lines) Β· Γ—1
  • Edited copy of a member (29 corresponding lines) src/util/network/http.rs:174 β€” src/util/network/http.rs:174-202 | src/util/network/http.rs:204-234 β€” These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (36 corresponding lines) Β· Γ—1
  • Edited copy of a member (36 corresponding lines) src/diagnostics/rules/missing_lints_features.rs:28 β€” src/diagnostics/rules/missing_lints_features.rs:28-63 | src/diagnostics/rules/unknown_lints.rs:59-110 β€” These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (38 corresponding lines) Β· Γ—1
  • Edited copy of a member (38 corresponding lines) src/bin/cargo/commands/package.rs:60 β€” src/bin/cargo/commands/package.rs:60-106 | src/bin/cargo/commands/publish.rs:43-80 β€” These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (42 corresponding lines) Β· Γ—1
  • Edited copy of a member (42 corresponding lines) crates/cargo-util-schemas/src/restricted_names.rs:47 β€” crates/cargo-util-schemas/src/restricted_names.rs:47-88 | crates/cargo-util-schemas/src/restricted_names.rs:187-231 β€” These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (54 corresponding lines) Β· Γ—1
  • Edited copy of a member (54 corresponding lines) src/bin/cargo/commands/bench.rs:4 β€” src/bin/cargo/commands/bench.rs:4-57 | src/bin/cargo/commands/test.rs:4-68 β€” These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 22+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 22+ corresponding lines) crates/cargo-util-config/src/schema.rs:383 β€” crates/cargo-util-config/src/schema.rs:383-408 | crates/cargo-util-schemas/src/manifest/mod.rs:1679-1701 | crates/cargo-util-schemas/src/manifest/mod.rs:1817-1838 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (22 corresponding lines) Β· Γ—1
  • Edited copy of a member (22 corresponding lines) src/sources/git/oxide.rs:368 β€” src/sources/git/oxide.rs:368-398 | src/sources/git/utils.rs:1712-1733 β€” These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (20 corresponding lines) Β· Γ—1
  • Edited copy of a member (20 corresponding lines) src/workspace/global_cache_tracker.rs:844 β€” src/workspace/global_cache_tracker.rs:844-863 | src/workspace/global_cache_tracker.rs:873-896 β€” These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 18+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 18+ corresponding lines) src/util/command_prelude.rs:189 β€” src/util/command_prelude.rs:189-208 | src/util/command_prelude.rs:217-235 | src/util/command_prelude.rs:243-260 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 17+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 17+ corresponding lines) src/workspace/parser/targets.rs:376 β€” src/workspace/parser/targets.rs:376-403 | src/workspace/parser/targets.rs:517-533 | src/workspace/parser/targets.rs:585-602 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (17 corresponding lines) Β· Γ—1
  • Edited copy of a member (17 corresponding lines) src/compiler/timings/mod.rs:160 β€” src/compiler/timings/mod.rs:160-178 | src/compiler/timings/mod.rs:186-202 β€” These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (5 members, 14+ corresponding lines) Β· Γ—1
  • Edited copies of one member (5 members, 14+ corresponding lines) src/workspace/global_cache_tracker.rs:411 β€” src/workspace/global_cache_tracker.rs:411-426 | src/workspace/global_cache_tracker.rs:429-450 | src/workspace/global_cache_tracker.rs:453-474 | src/workspace/global_cache_tracker.rs:477-490 | src/workspace/global_cache_tracker.rs:493-514 β€” These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (24 corresponding lines) Β· Γ—1
  • Edited copy of a member (24 corresponding lines) credential/cargo-credential/src/stdio.rs:45 β€” credential/cargo-credential/src/stdio.rs:45-69 | credential/cargo-credential/src/stdio.rs:98-121 β€” These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 9+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 9+ corresponding lines) src/util/flock.rs:246 β€” src/util/flock.rs:246-254 | src/util/flock.rs:263-272 | src/util/flock.rs:309-317 | src/util/flock.rs:326-335 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (13 corresponding lines) Β· Γ—1
  • Edited copy of a member (13 corresponding lines) src/resolver/features.rs:739 β€” src/resolver/features.rs:739-751 | src/resolver/features.rs:758-772 β€” These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 10+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 10+ corresponding lines) src/ops/common_for_install_and_uninstall.rs:364 β€” src/ops/common_for_install_and_uninstall.rs:364-376 | src/ops/common_for_install_and_uninstall.rs:378-387 | src/ops/common_for_install_and_uninstall.rs:484-496 | src/ops/common_for_install_and_uninstall.rs:498-507 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (10 corresponding lines) Β· Γ—1
  • Edited copy of a member (10 corresponding lines) crates/rustfix/src/lib.rs:237 β€” crates/rustfix/src/lib.rs:237-248 | crates/rustfix/src/lib.rs:251-260 β€” These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (4 corresponding lines) Β· Γ—1
  • Edited copy of a member (4 corresponding lines) crates/cargo-test-support/src/compare.rs:565 β€” crates/cargo-test-support/src/compare.rs:565-571 | crates/cargo-util-config/src/env.rs:54-57 β€” These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (36 lines × 2) Β· Γ—1
  • Duplicated block (36 lines × 2) src/diagnostics/rules/non_kebab_case_features.rs:102 β€” src/diagnostics/rules/non_kebab_case_features.rs:102-137 | src/diagnostics/rules/non_snake_case_features.rs:102-137 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_features.rs` and `src/diagnostics/rules/non_snake_case_features.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/non_kebab_case_features.rs:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (27 lines × 2) Β· Γ—1
  • Duplicated block (27 lines × 2) src/diagnostics/rules/missing_lints_features.rs:29 β€” src/diagnostics/rules/missing_lints_features.rs:29-55 | src/diagnostics/rules/unknown_lints.rs:60-86 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/missing_lints_features.rs:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (26 lines × 2) Β· Γ—1
  • Duplicated block (26 lines × 2) crates/mdman/src/format/man.rs:245 β€” crates/mdman/src/format/man.rs:245-270 | crates/mdman/src/format/text.rs:211-236 β€” before extracting anything, compare `crates/mdman/src/format/man.rs` and `crates/mdman/src/format/text.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/mdman/src/format/man.rs:245` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (25 lines × 2) Β· Γ—1
  • Duplicated block (25 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs:58 β€” src/diagnostics/rules/text_direction_codepoint_in_comment.rs:58-82 | src/diagnostics/rules/text_direction_codepoint_in_literal.rs:59-83 β€” before extracting anything, compare `src/diagnostics/rules/text_direction_codepoint_in_comment.rs` and `src/diagnostics/rules/text_direction_codepoint_in_literal.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/text_direction_codepoint_in_comment.rs:58` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (22–23 lines × 2) Β· Γ—1
  • Duplicated block (22–23 lines × 2) crates/mdman/src/format/man.rs:216 β€” crates/mdman/src/format/man.rs:216-238 | crates/mdman/src/format/text.rs:184-205 β€” before extracting anything, compare `crates/mdman/src/format/man.rs` and `crates/mdman/src/format/text.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/mdman/src/format/man.rs:216` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (21–22 lines × 2) Β· Γ—1
  • Duplicated block (21–22 lines × 2) src/bin/cargo/commands/run.rs:111 β€” src/bin/cargo/commands/run.rs:111-131 | src/bin/cargo/commands/run.rs:145-166 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/bin/cargo/commands/run.rs:111` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (23 lines × 2) Β· Γ—1
  • Duplicated block (23 lines × 2) src/ops/cargo_report/rebuilds.rs:42 β€” src/ops/cargo_report/rebuilds.rs:42-64 | src/ops/cargo_report/timings.rs:58-80 β€” 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `opts` to `ReportRebuildsOptions` in one and `ReportTimingsOptions<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 Β· Code Duplication Β· Duplicated block (21 lines × 2) Β· Γ—1
  • Duplicated block (21 lines × 2) src/diagnostics/rules/text_direction_codepoint_in_comment.rs:169 β€” src/diagnostics/rules/text_direction_codepoint_in_comment.rs:169-189 | src/diagnostics/rules/text_direction_codepoint_in_literal.rs:211-231 β€” before extracting anything, compare `src/diagnostics/rules/text_direction_codepoint_in_comment.rs` and `src/diagnostics/rules/text_direction_codepoint_in_literal.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 Β· Code Duplication Β· Duplicated block (20 lines × 2) Β· Γ—1
  • Duplicated block (20 lines × 2) src/diagnostics/rules/non_kebab_case_packages.rs:102 β€” src/diagnostics/rules/non_kebab_case_packages.rs:102-121 | src/diagnostics/rules/non_snake_case_packages.rs:102-121 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_packages.rs` and `src/diagnostics/rules/non_snake_case_packages.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/non_kebab_case_packages.rs:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (18 lines × 2) Β· Γ—1
  • Duplicated block (18 lines × 2) src/ops/cargo_tree/graph.rs:741 β€” src/ops/cargo_tree/graph.rs:741-758 | src/ops/cargo_tree/graph.rs:799-816 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_tree/graph.rs:799` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (17–18 lines × 2) Β· Γ—1
  • Duplicated block (17–18 lines × 2) src/ops/cargo_update.rs:225 β€” src/ops/cargo_update.rs:225-241 | src/ops/cargo_update.rs:281-298 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_update.rs:225` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (16 lines × 2) Β· Γ—1
  • Duplicated block (16 lines × 2) src/ops/cargo_vendor.rs:516 β€” src/ops/cargo_vendor.rs:516-531 | src/workspace/parser/mod.rs:3060-3075 β€” before extracting anything, compare `src/ops/cargo_vendor.rs` and `src/workspace/parser/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_vendor.rs:516` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (13–15 lines × 2) Β· Γ—1
  • Duplicated block (13–15 lines × 2) src/util/semver_eval_ext.rs:200 β€” src/util/semver_eval_ext.rs:200-212 | src/util/semver_eval_ext.rs:231-245 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/util/semver_eval_ext.rs:231` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (10–13 lines × 2) Β· Γ—1
  • Duplicated block (10–13 lines × 2) crates/mdman/src/format/man.rs:113 β€” crates/mdman/src/format/man.rs:113-122 | crates/mdman/src/format/text.rs:105-117 β€” before extracting anything, compare `crates/mdman/src/format/man.rs` and `crates/mdman/src/format/text.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/mdman/src/format/man.rs:113` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/mdman/src/format/man.rs:123` calls `push_str` and `crates/mdman/src/format/text.rs:118` does not β€” after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (9–12 lines × 2) Β· Γ—1
  • Duplicated block (9–12 lines × 2) src/ops/cargo_update.rs:243 β€” src/ops/cargo_update.rs:243-251 | src/ops/cargo_update.rs:301-312 β€” 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (11–12 lines × 2) Β· Γ—1
  • Duplicated block (11–12 lines × 2) src/ops/cargo_vendor.rs:557 β€” src/ops/cargo_vendor.rs:557-567 | src/workspace/parser/mod.rs:3114-3125 β€” before extracting anything, compare `src/ops/cargo_vendor.rs` and `src/workspace/parser/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_vendor.rs:557` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (8–10 lines × 3) Β· Γ—1
  • Duplicated block (8–10 lines × 3) src/diagnostics/rules/unused_dependencies.rs:144 β€” src/diagnostics/rules/unused_dependencies.rs:144-153 | src/diagnostics/rules/unused_workspace_dependencies.rs:146-153 | src/diagnostics/rules/unused_workspace_package_fields.rs:115-122 β€” before extracting anything, compare `src/diagnostics/rules/unused_workspace_dependencies.rs` and `src/diagnostics/rules/unused_workspace_package_fields.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/unused_dependencies.rs:144` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (9–10 lines × 2) Β· Γ—1
  • Duplicated block (9–10 lines × 2) src/compiler/unit_dependencies.rs:319 β€” src/compiler/unit_dependencies.rs:319-327 | src/compiler/unit_dependencies.rs:669-678 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/compiler/unit_dependencies.rs:319` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 3) Β· Γ—1
  • Duplicated block (9 lines × 3) src/resolver/errors.rs:158 β€” src/resolver/errors.rs:158-166 | src/resolver/errors.rs:183-191 | src/resolver/errors.rs:199-207 β€” 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 (8–9 lines × 2) Β· Γ—1
  • Duplicated block (8–9 lines × 2) src/sources/git/oxide.rs:386 β€” src/sources/git/oxide.rs:386-394 | src/sources/git/utils.rs:1722-1729 β€” 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 (7–8 lines × 4) Β· Γ—1
  • Duplicated block (7–8 lines × 4) src/diagnostics/rules/non_kebab_case_features.rs:128 β€” src/diagnostics/rules/non_kebab_case_features.rs:128-134 | src/diagnostics/rules/non_kebab_case_packages.rs:111-118 | src/diagnostics/rules/non_snake_case_features.rs:128-134 | src/diagnostics/rules/non_snake_case_packages.rs:111-118 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_features.rs` and `src/diagnostics/rules/non_kebab_case_packages.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/non_kebab_case_features.rs:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (8 lines × 3) Β· Γ—1
  • Duplicated block (8 lines × 3) src/ops/cargo_compile/packages.rs:58 β€” src/ops/cargo_compile/packages.rs:58-65 | src/ops/cargo_compile/packages.rs:124-131 | src/ops/cargo_compile/packages.rs:222-229 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_compile/packages.rs:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/ops/cargo_compile/packages.rs:231` calls `to_spec` and `src/ops/cargo_compile/packages.rs:132` does not β€” after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 4) Β· Γ—1
  • Duplicated block (6 lines × 4) src/ops/cargo_compile/packages.rs:58 β€” src/ops/cargo_compile/packages.rs:58-63 | src/ops/cargo_compile/packages.rs:124-129 | src/ops/cargo_compile/packages.rs:144-149 | src/ops/cargo_compile/packages.rs:222-227 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ops/cargo_compile/packages.rs:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 3) Β· Γ—1
  • Duplicated block (5 lines × 3) src/workspace/global_cache_tracker.rs:1058 β€” src/workspace/global_cache_tracker.rs:1058-1062 | src/workspace/global_cache_tracker.rs:1115-1119 | src/workspace/global_cache_tracker.rs:1321-1325 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/global_cache_tracker.rs:1058` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 6) Β· Γ—1
  • Duplicated block (10 lines × 6) src/diagnostics/rules/manual_readme.rs:74 β€” src/diagnostics/rules/manual_readme.rs:74-83 | src/diagnostics/rules/non_kebab_case_features.rs:68-77 | src/diagnostics/rules/non_kebab_case_packages.rs:68-77 | src/diagnostics/rules/non_snake_case_features.rs:68-77 | src/diagnostics/rules/non_snake_case_packages.rs:68-77 | src/diagnostics/rules/redundant_homepage.rs:71-80 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_features.rs` and `src/diagnostics/rules/non_kebab_case_packages.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/diagnostics/rules/manual_readme.rs:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (19 lines × 2) Β· Γ—1
  • Duplicated block (19 lines × 2) src/workspace/parser/mod.rs:467 β€” src/workspace/parser/mod.rs:467-485 | src/workspace/parser/mod.rs:520-538 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/workspace/parser/mod.rs:467` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 Β· Code Duplication Β· Duplicated block (8 lines × 5) Β· Γ—1
  • Duplicated block (8 lines × 5) src/diagnostics/rules/non_kebab_case_features.rs:97 β€” src/diagnostics/rules/non_kebab_case_features.rs:97-104 | src/diagnostics/rules/non_kebab_case_packages.rs:97-104 | src/diagnostics/rules/non_snake_case_features.rs:97-104 | src/diagnostics/rules/non_snake_case_packages.rs:97-104 | src/diagnostics/rules/redundant_homepage.rs:113-120 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_features.rs` and `src/diagnostics/rules/non_kebab_case_packages.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 6) Β· Γ—1
  • Duplicated block (7 lines × 6) src/diagnostics/rules/non_kebab_case_features.rs:97 β€” src/diagnostics/rules/non_kebab_case_features.rs:97-104 | src/diagnostics/rules/non_kebab_case_packages.rs:97-104 | src/diagnostics/rules/non_snake_case_features.rs:97-104 | src/diagnostics/rules/non_snake_case_packages.rs:97-104 | src/diagnostics/rules/redundant_homepage.rs:113-120 | src/diagnostics/rules/unused_dependencies.rs:130-136 β€” before extracting anything, compare `src/diagnostics/rules/non_kebab_case_features.rs` and `src/diagnostics/rules/non_kebab_case_packages.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place.
Minor β€” 88 finding(s)
X4 Β· Structured logging Β· Interpolated log message defeats structured logging Β· Γ—40
  • Interpolated log message defeats structured logging src/lib.rs:176 β€” `debug!` at line 176 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/lib.rs:196 β€” `debug!` at line 196 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/dependency.rs:367 β€” `trace!` at line 367 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/gc.rs:63 β€” `warn!` at line 63 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:527 β€” `trace!` at line 527 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:565 β€” `trace!` at line 565 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:819 β€” `trace!` at line 819 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:845 β€” `trace!` at line 845 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:874 β€” `trace!` at line 874 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:889 β€” `debug!` at line 889 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:951 β€” `trace!` at line 951 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1014 β€” `trace!` at line 1014 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1051 β€” `debug!` at line 1051 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1081 β€” `debug!` at line 1081 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1138 β€” `debug!` at line 1138 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1176 β€” `debug!` at line 1176 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1204 β€” `debug!` at line 1204 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1251 β€” `debug!` at line 1251 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1289 β€” `debug!` at line 1289 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1314 β€” `debug!` at line 1314 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1343 β€” `debug!` at line 1343 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1607 β€” `warn!` at line 1607 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1659 β€” `trace!` at line 1659 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/global_cache_tracker.rs:1684 β€” `trace!` at line 1684 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/workspace/package.rs:439 β€” `debug!` at line 439 is handed a format string with `{…}` values in it, so tracing records one finished `message` field β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • + 15 more in this group β€” see findings.md.
D34 Β· Knowledge Freshness Β· Orphaned file Β· Γ—22
  • Orphaned file credential/cargo-credential-1password/src/main.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 crates/semver-check/src/main.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 src/util/graph.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 crates/cargo-util/src/process_error.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 crates/mdman/src/hbs.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 crates/resolver-tests/src/helpers.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 crates/cargo-util/src/read2.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 src/util/lockserver.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 src/util/once.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 src/util/edit_distance.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 src/ops/cargo_tree/format/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.
  • Orphaned file crates/mdman/src/main.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 crates/mdman/src/lib.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 src/util/sqlite.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 src/ops/cargo_uninstall.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 crates/home/src/env.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 src/ops/cargo_tree/format/parse.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 src/version.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 crates/mdman/src/format/md.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 src/compiler/job_queue/job.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 src/util/vcs.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 src/util/queue.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.
X7 Β· Silent fallback defaults Β· Silent fallback default on Err Β· Γ—5
  • Silent fallback default on Err src/bin/cargo/cli.rs:786 β€” `get_toolchains_from_rustup` turns every `Err` into `vec![]` β€” 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.
  • Silent fallback default on Err src/sources/path.rs:628 β€” `_list_files` turns every `Err` into `false` β€” 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.
  • Silent fallback default on Err src/util/command_prelude.rs:1107 β€” `get_registry_candidates` turns every `Err` into `Ok(vec![])` β€” 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.
  • Silent fallback default on Err src/util/command_prelude.rs:1456 β€” `get_direct_dependencies_pkg_name_candidates` turns every `Err` into `Vec::new()` β€” 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.
  • Silent fallback default on Err src/workspace/parser/targets.rs:750 β€” `infer_from_directory` turns every `Err` into `Vec::new()` β€” 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.
D28 Β· Secrets (history) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X10 Β· Duplicated predicate Β· Duplicated predicate Β· Γ—3
  • Duplicated predicate src/ops/cargo_install.rs:838 β€” `!succeeded.is_empty() || !failed.is_empty()` appears character-identically in 2 files β€” src/ops/cargo_install.rs, src/ops/cargo_uninstall.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 src/compiler/build_runner/compilation_files.rs:225 β€” `unit.mode.is_doc() || unit.mode.is_doc_scrape()` appears character-identically in 3 files β€” src/compiler/build_runner/compilation_files.rs, src/compiler/fingerprint/mod.rs, src/compiler/mod.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 src/compiler/artifact.rs:25 β€” `unit.target.is_test() || unit.target.is_bench()` appears character-identically in 2 files β€” src/compiler/artifact.rs, src/compiler/mod.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.
D16 Β· Bus Factor Β· Off-boarding risk Β· Γ—2
  • Off-boarding risk: anonymized user #1 β€” If anonymized user #1 becomes unavailable, 17 significant file(s) lose their only recent owner: src/ops/cargo_tree/graph.rs, src/util/progress.rs, crates/cargo-util-schemas/src/index.rs, src/diagnostics/lint.rs, src/lib.rs, src/util/diagnostic_server.rs, src/diagnostics/rules/text_direction_codepoint_in_literal.rs, src/diagnostics/passes.rs (+9 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 β€” If anonymized user #2 becomes unavailable, 3 significant file(s) lose their only recent owner: src/compiler/trim_paths.rs, src/util/credential/adaptor.rs, src/util/time_span.rs. Pair on, review, or document these before any departure.
D16 Β· Bus Factor Β· Further sole-owners (lower concentration) Β· Γ—1
  • Further sole-owners (lower concentration) β€” 7 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 (29 single-owned of 249 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; 249 of the 299 production source files in this repository met that bar). They are anonymized user #3 (2 file(s)), anonymized user #4 (2 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)) (+1 more) β€” spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/diagnostics/rules/mostly_unused_hint.rs, src/diagnostics/rules/min_opt_level_hint.rs, src/util/canonical_url.rs, src/util/network/mod.rs, crates/cargo-platform/src/cfg.rs, src/util/cpu.rs, crates/cargo-util-schemas/src/core/source_kind.rs, src/ops/registry/cargo_search.rs (+1 more).
D20 Β· ADR Quality Β· No ADRs found Β· Γ—1
  • No ADRs found Cargo.toml:285 β€” No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. 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/`. ADRs are expected here because `Cargo.toml` makes this repository a deployable product (line 285).
D26 Β· Project Cohesion Β· Projects may be oversized for their cohesion Β· Γ—1
  • Projects may be oversized for their cohesion β€” 1 of 22 project(s) overshoot their size bounds, lowering Project Cohesion to 9.1/10. The most over is `(repository root)` (96439 LoC, 564 module-visible types across 37 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.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D34 Β· Knowledge Freshness Β· Further orphaned files (smaller) Β· Γ—1
  • Further orphaned files (smaller) β€” 22 smaller file(s) also have no living knowledge β€” folded into the freshness score and metrics rather than raised one row each β€” most significant first: credential/cargo-credential-1password/src/main.rs, crates/semver-check/src/main.rs, src/util/graph.rs, crates/cargo-util/src/process_error.rs, crates/mdman/src/hbs.rs, crates/resolver-tests/src/helpers.rs, crates/cargo-util/src/read2.rs, src/util/lockserver.rs (and 14 more) (26 orphaned of 249 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; 249 of the 299 production source files in this repository met that bar). 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
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.
P2 Β· Observability Β· Logging is not universal Β· Γ—1
  • Logging is not universal β€” Only 4/14 runnable modules use logging (modules with no entry point or server are excluded β€” they are libraries a runnable module hosts). Silent: `.`, `crates/cargo-test-support`, `crates/mdman`, `crates/semver-check`, `crates/xtask-build-man` and 5 more.
S1 Β· Web-Security Posture Β· No security response headers detected Β· Γ—1
  • No security response headers detected crates/cargo-test-support/containers/apache/Dockerfile:1 β€” None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured β€” defense in depth, even when a reverse proxy could set them. This is reported because `Dockerfile` builds the web-server image that serves this application, so the configuration that would carry these headers is in this repository and was read in full. (βˆ’2.0 on this card.)
Minor β€” 42 finding(s)
D12 Β· Dependency Hygiene Β· Outdated Β· Γ—42
  • Outdated: anstyle-progress β€” `anstyle-progress` is locked at 0.1.0 but 0.1.6 is the current stable release on crates.io, and it already satisfies the `"0.1.0"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p anstyle-progress` and commit the updated REDACTED.
  • Outdated: anyhow β€” `anyhow` is locked at 1.0.103 but 1.0.104 is the current stable release on crates.io, and it already satisfies the `"1.0.102"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p anyhow` and commit the updated REDACTED.
  • Outdated: async-trait β€” `async-trait` is locked at 0.1.89 but 0.1.92 is the current stable release on crates.io, and it already satisfies the `"0.1.89"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p async-trait` and commit the updated REDACTED.
  • Outdated: blake3 β€” `blake3` is locked at 1.8.5 but 1.8.7 is the current stable release on crates.io, and it already satisfies the `"1.8.4"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p blake3` and commit the updated REDACTED.
  • Outdated: clap β€” `clap` is locked at 4.6.1 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4.6.0"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
  • Outdated: clap_complete β€” `clap_complete` is locked at 4.6.6 but 4.6.11 is the current stable release on crates.io, and it already satisfies the `"4.6.0"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p clap_complete` and commit the updated REDACTED.
  • Outdated: curl β€” `curl` is locked at 0.4.50 but 0.4.51 is the current stable release on crates.io, and it already satisfies the `"0.4.49"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p curl` and commit the updated REDACTED.
  • Outdated: curl-sys β€” `curl-sys` is locked at 0.4.90+curl-8.21.0 but 0.4.91+curl-8.22.0 is the current stable release on crates.io, and it already satisfies the `"0.4.88"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p curl-sys` and commit the updated REDACTED.
  • Outdated: flate2 β€” `flate2` is locked at 1.1.9 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1.1.9"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
  • Outdated: futures β€” `futures` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3.32"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p futures` and commit the updated REDACTED.
  • Outdated: glob β€” `glob` is locked at 0.3.3 but 0.3.4 is the current stable release on crates.io, and it already satisfies the `"0.3.3"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p glob` and commit the updated REDACTED.
  • Outdated: handlebars β€” `handlebars` is locked at 6.4.2 but 6.4.4 is the current stable release on crates.io, and it already satisfies the `"6.4.0"` requirement declared in crates/mdman/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p handlebars` and commit the updated REDACTED.
  • Outdated: http β€” `http` is locked at 1.4.2 but 1.5.0 is the current stable release on crates.io, and it already satisfies the `"1.4.0"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p http` and commit the updated REDACTED.
  • Outdated: ignore β€” `ignore` is locked at 0.4.26 but 0.4.34 is the current stable release on crates.io, and it already satisfies the `"0.4.25"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p ignore` and commit the updated REDACTED.
  • Outdated: indexmap β€” `indexmap` is locked at 2.14.0 but 2.14.2 is the current stable release on crates.io, and it already satisfies the `"2.13.0"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p indexmap` and commit the updated REDACTED.
  • Outdated: jiff β€” `jiff` is locked at 0.2.31 but 0.2.43 is the current stable release on crates.io, and it already satisfies the `"0.2.23"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p jiff` and commit the updated REDACTED.
  • Outdated: jobserver β€” `jobserver` is locked at 0.1.34 but 0.1.35 is the current stable release on crates.io, and it already satisfies the `"0.1.34"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p jobserver` and commit the updated REDACTED.
  • Outdated: libc β€” `libc` is locked at 0.2.186 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2.184"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
  • Outdated: libgit2-sys β€” `libgit2-sys` is locked at 0.18.7+1.9.6 but 0.18.8+1.9.7 is the current stable release on crates.io, and it already satisfies the `"0.18.5"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p libgit2-sys` and commit the updated REDACTED.
  • Outdated: libloading β€” `libloading` is locked at 0.9.0 but 0.9.1 is the current stable release on crates.io, and it already satisfies the `"0.9.0"` requirement declared in credential/cargo-credential-libsecret/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p libloading` and commit the updated REDACTED.
  • Outdated: memchr β€” `memchr` is locked at 2.8.2 but 2.8.3 is the current stable release on crates.io, and it already satisfies the `"2.8.0"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p memchr` and commit the updated REDACTED.
  • Outdated: openssl β€” `openssl` is locked at 0.10.81 but 0.10.82 is the current stable release on crates.io, and it already satisfies the `"0.10.76"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p openssl` and commit the updated REDACTED.
  • Outdated: portable-atomic β€” `portable-atomic` is locked at 1.13.1 but 1.15.0 is the current stable release on crates.io, and it already satisfies the `"1.13.1"` requirement declared in Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p portable-atomic` and commit the updated REDACTED.
  • Outdated: proptest β€” `proptest` is locked at 1.11.0 but 1.12.0 is the current stable release on crates.io, and it already satisfies the `"1.11.0"` requirement declared in crates/resolver-tests/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p proptest` and commit the updated REDACTED.
  • Outdated: pulldown-cmark β€” `pulldown-cmark` is locked at 0.13.4 but 0.13.6 is the current stable release on crates.io, and it already satisfies the `"0.13.3"` requirement declared in crates/mdman/Cargo.toml β€” so the lockfile is behind this repository's own declared range. Run `cargo update -p pulldown-cmark` and commit the updated REDACTED.
  • + 17 more in this group β€” see findings.md.

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/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-973cc6ab2f904cbda399325c8ac6b91b/history.json --exit-code 0 --source .6artifacts/raw/gitleaks-history.json
D28 Β· Secrets (history)gitleaksβ€”gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-973cc6ab2f904cbda399325c8ac6b91b/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/canine-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 .1artifacts/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 . /tmp/codehealth-osv-sbom-fff2f92ecc974b8ea62c0709867d82cf13artifacts/raw/osv-scanner.json
D31 Β· IaC & Container Securitytrivyβ€”trivy config --format json --quiet .0artifacts/raw/trivy-config.json
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 . /tmp/codehealth-osv-sbom-fff2f92ecc974b8ea62c0709867d82cf0artifacts/raw/osv-scanner.json

Run 01a1daa1-0f21-788c-a59d-52fc671cff4d Β· 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