Public report of storytold/craft-anything, published 7 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.2). 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, 7 November 2026, 02:10 UTC · Survey ID cd_d1d1874829a04c4bb819ae37437409e2

storytold/craft-anything

Measured 7 November 2026, 02:09 UTC, at code version 512ff76

First survey, so nothing to compare with yet
CAI score 54out of 100 Adequate
CriticalWeakAdequateStrongExemplary

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: 187,190 lines of product code in 18 projects, tests not counted · Estimated rebuild effort: about 1.4 person-years · Weakest lens: Accessibility, 46

Findings by how serious they are

12 critical 1011 serious 49 minor

12 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
7 November 2026, 02:09 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 ▸

67of 67 dimensions measured by tools.
1047of 1072 findings point to an exact file and line, so you can open each one in the code. The other 25 concern the repository as a whole, such as missing documentation.
67dimensions across 7 lenses, read from 187,190 lines of product code in 18 projects.
Chapters

Executive summary

storytold/craft-anything falls short of our standard for a preview release, held back most by its Accessibility lens, the interface's usability with a keyboard or assistive technology. It scores 54 out of 100 and is rated Adequate, and 11 of its 12 critical findings are security problems.

Accessibility, at 46, is the weakest lens and counts most in the score. The best first step is adding text alternatives, worth about 6 points. Declaring which values may be missing comes next, worth about 4 points. Raising Accessibility to 65 would lift the score to about 60.

Six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two pipeline steps run downloads nobody checks, and one password or key is open to anyone who can read the repository. Pinning each tool to an exact version, checking each download against a checksum and replacing the exposed password or key would close these risks. Limiting each secret to its own step would fix the secret exposed to more of the pipeline than needed, and correcting the flagged pipeline settings would deal with the weakness in the build pipeline's configuration. The page that blocks zooming needs the zoom block removed.

The product code is 187,190 lines, about €200,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.
Accessibility 46 · counts for 46%Code Health 50 · counts for 25%Production Readiness 67 · counts for 14%Security and Compliance 68 · counts for 8%Maturity 69 · counts for 4%Architecture 95 · counts for 2%Event Sourcing 100 · counts for 1%

If Accessibility rose from 46 to 65, the lowest score rated Strong, the score would rise from 54 to about 60.

Code composition: what the lines of code are
Product code 94%Tests 6%
Rebuild cost: about €200,000 · Estimate
Cost to rebuild€65,000 to €330,000, for 1,089 to 3,454 hours of work, about 1.4 person-years for 1 to 3 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.8 at a score of 54. 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: 187,190 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
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 6 points · Medium effort · Text alternatives
2
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced.
Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Raises the score by about 4 points · Medium effort · Nullable reference types
3
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
Raises the score by about 4 points · Medium effort · A11y enforcement

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 €200,000 to build again, about 1.4 person-years of work. Its weakest lens is Accessibility, at 46 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.3 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 252,783 lines over the last 90 days, which is about 1,025,176 lines a year. At that pace, the extra work comes to an estimated 107.4 to 644.5 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 craft-anything craft-anything craft-anything-ai craft-anything-ai craft-anything->craft-anything-ai craft-anything-engine craft-anything-engine craft-anything->craft-anything-engine craft-anything-platform craft-anything-platform craft-anything->craft-anything-platform craft-anything-setup craft-anything-setup craft-anything->craft-anything-setup craft-anything-ui-egui craft-anything-ui-egui craft-anything->craft-anything-ui-egui craft-anything-ai->craft-anything-engine craft-anything-engines craft-anything-engines craft-anything-ai->craft-anything-engines craft-anything-evidence craft-anything-evidence craft-anything-ai->craft-anything-evidence craft-anything-formats craft-anything-formats craft-anything-ai->craft-anything-formats craft-anything-ai->craft-anything-platform craft-anything-analysis craft-anything-analysis craft-anything-disasm craft-anything-disasm craft-anything-analysis->craft-anything-disasm craft-anything-analysis->craft-anything-evidence craft-anything-analysis->craft-anything-formats craft-anything-js craft-anything-js craft-anything-analysis->craft-anything-js craft-anything-cli craft-anything-cli craft-anything-cli->craft-anything-ai craft-anything-cli->craft-anything-engine craft-anything-cli->craft-anything-engines craft-anything-cli->craft-anything-evidence craft-anything-mcp craft-anything-mcp craft-anything-cli->craft-anything-mcp craft-anything-cli->craft-anything-platform craft-anything-cli->craft-anything-setup craft-anything-disasm->craft-anything-formats craft-anything-engine->craft-anything-analysis craft-anything-engine->craft-anything-disasm craft-anything-engine->craft-anything-engines craft-anything-engine->craft-anything-evidence craft-anything-engine->craft-anything-formats craft-anything-engine->craft-anything-js craft-anything-engine->craft-anything-platform craft-anything-engines->craft-anything-evidence craft-anything-engines->craft-anything-formats craft-anything-engines->craft-anything-platform craft-anything-mcp->craft-anything-engine craft-anything-mcp->craft-anything-evidence craft-anything-mcp->craft-anything-platform craft-anything-platform->craft-anything-evidence craft-anything-setup->craft-anything-engine craft-anything-setup->craft-anything-engines craft-anything-setup->craft-anything-evidence craft-anything-setup->craft-anything-formats craft-anything-setup->craft-anything-platform craft-anything-testkit craft-anything-testkit craft-anything-ui-egui->craft-anything-ai craft-anything-ui-egui->craft-anything-engine craft-anything-ui-egui->craft-anything-engines craft-anything-ui-egui->craft-anything-platform craft-anything-ui-egui->craft-anything-setup craft-anything-web craft-anything-web craft-anything-web->craft-anything-analysis craft-anything-web->craft-anything-evidence craft-anything-web->craft-anything-formats xtask xtask xtask->craft-anything-engine

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.

437 modules, with 1071 dependencies between them. 8 loops run through 51 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 397 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 craft_anything_disasm.program2 craft_anything_evidence3 craft_anything_evidence.error4 craft_anything_formats.bytes5 craft_anything_platform.cancel6 wgpu_hal.dynamic7 craft_anything_engine.target8 craft_anything_formats.arsc9 craft_anything_formats.dex10 craft_anything_formats.plist11 craft_anything_platform.process12 wgpu_hal.gles13 craft_anything_ai.model14 craft_anything_engine.workspace15 craft_anything_engines.cdp16 craft_anything_formats.binary17 craft_anything_formats.firmware18 wgpu_hal.dx1219 craft_anything_engine.settings20 wgpu_hal.vulkan21 craft_anything_ai.rebuild.kinds22 craft_anything_engine.session23 wgpu_hal24 craft_anything_ai.config25 craft_anything_engine.tool26 craft_anything_ai.cli_agents.models27 craft_anything_engine28 craft_anything_engine.tools29 craft_anything_engine.tools.game_archive_tools30 craft_anything_engine.tools.static_input31 craft_anything_engine.tools.web_common32 craft_anything_ai33 craft_anything_engine.tools.native_common34 craft_anything_ai.agent35 craft_anything_ai.cli_agents.acp36 craft_anything_ai.cli_agents.adapters37 craft_anything_ai.cli_agents38 craft_anything_ai.rebuild39 craft_anything_ui_egui.state40 craft_anything_ui_egui
1 craft_anything_disasm.program
2 craft_anything_evidence
3 craft_anything_evidence.error
4 craft_anything_formats.bytes
5 craft_anything_platform.cancel
6 wgpu_hal.dynamic
7 craft_anything_engine.target1
8 craft_anything_formats.arsc1
9 craft_anything_formats.dex2
10 craft_anything_formats.plist2
11 craft_anything_platform.process1
12 wgpu_hal.gles164434
13 craft_anything_ai.model11
14 craft_anything_engine.workspace11
15 craft_anything_engines.cdp112
16 craft_anything_formats.binary1
17 craft_anything_formats.firmware12
18 wgpu_hal.dx1217137
19 craft_anything_engine.settings23
20 wgpu_hal.vulkan173811
21 craft_anything_ai.rebuild.kinds11611
22 craft_anything_engine.session131
23 wgpu_hal4381
24 craft_anything_ai.config12113
25 craft_anything_engine.tool1121
26 craft_anything_ai.cli_agents.models1321
27 craft_anything_engine1113
28 craft_anything_engine.tools1112
29 craft_anything_engine.tools.game_archive_tools1122112
30 craft_anything_engine.tools.static_input51111
31 craft_anything_engine.tools.web_common112121
32 craft_anything_ai74111
33 craft_anything_engine.tools.native_common211111262
34 craft_anything_ai.agent15514413
35 craft_anything_ai.cli_agents.acp131132
36 craft_anything_ai.cli_agents.adapters3521467
37 craft_anything_ai.cli_agents1112232711
38 craft_anything_ai.rebuild12151211111
39 craft_anything_ui_egui.state1421
40 craft_anything_ui_egui12113121112529
Uses a module listed above itPart of a loopThe module itself
1 craft_anything_disasm.program2 craft_anything_evidence3 craft_anything_evidence.error4 craft_anything_formats.bytes5 craft_anything_platform.cancel6 wgpu_hal.dynamic7 craft_anything_engine.target8 craft_anything_formats.arsc9 craft_anything_formats.dex10 craft_anything_formats.plist11 craft_anything_platform.process12 wgpu_hal.gles13 craft_anything_ai.model14 craft_anything_engine.workspace15 craft_anything_engines.cdp16 craft_anything_formats.binary17 craft_anything_formats.firmware18 wgpu_hal.dx1219 craft_anything_engine.settings20 wgpu_hal.vulkan21 craft_anything_ai.rebuild.kinds22 craft_anything_engine.session23 wgpu_hal24 craft_anything_ai.config25 craft_anything_engine.tool26 craft_anything_ai.cli_agents.models27 craft_anything_engine28 craft_anything_engine.tools29 craft_anything_engine.tools.game_archive_tools30 craft_anything_engine.tools.static_input31 craft_anything_engine.tools.web_common32 craft_anything_ai33 craft_anything_engine.tools.native_common34 craft_anything_ai.agent35 craft_anything_ai.cli_agents.acp36 craft_anything_ai.cli_agents.adapters37 craft_anything_ai.cli_agents38 craft_anything_ai.rebuild39 craft_anything_ui_egui.state40 craft_anything_ui_eguicraft_anything_disasm.program1craft_anything_evidence2craft_anything_evidence.error3craft_anything_formats.bytes4craft_anything_platform.cancel5wgpu_hal.dynamic6craft_anything_engine.target7craft_anything_formats.arsc8craft_anything_formats.dex9craft_anything_formats.plist10craft_anything_platform.process11wgpu_hal.gles12craft_anything_ai.model13craft_anything_engine.workspace14craft_anything_engines.cdp15craft_anything_formats.binary16craft_anything_formats.firmware17wgpu_hal.dx1218craft_anything_engine.settings19wgpu_hal.vulkan20craft_anything_ai.rebuild.kinds21craft_anything_engine.session22wgpu_hal23craft_anything_ai.config24craft_anything_engine.tool25craft_anything_ai.cli_agents.models26craft_anything_engine27craft_anything_engine.tools28craft_anything_engine.tools.game_archive_tools29craft_anything_engine.tools.static_input30craft_anything_engine.tools.web_common31craft_anything_ai32craft_anything_engine.tools.native_common33craft_anything_ai.agent34craft_anything_ai.cli_agents.acp35craft_anything_ai.cli_agents.adapters36craft_anything_ai.cli_agents37craft_anything_ai.rebuild38craft_anything_ui_egui.state39craft_anything_ui_egui40112211644341111112112171372317381111611131438112113112113211113111211221125111111212174111211111262155144131311323521467111223271112151211111142112113121112529+397 more modules (most-connected shown)

At a glance — Code Health · 50% · Adequate · gated by D1, D2, X3, X5 ·

At a glance — Architecture · 95% · Exemplary ·

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

At a glance — Readiness · 67% · Strong ·

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

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Accessibility · 46% · Adequate · gated by AC1 ·

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 Failures15Medium
A05:2025 — Injection12High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video; Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor); Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.

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

Do thisHelpsEffortDimension
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+6.2 ptsMediumText alternatives
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).+4.4 ptsMediumNullable reference types
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.+3.7 ptsMediumA11y enforcement
Swallowed exception (caught, then discarded)+3.4 ptsMediumException handling
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+3.3 ptsMediumPage structure
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.2 ptsLowADR Quality
Bring the 50 bodies over 60 down to 60 or less in Cognitive Complexity — start with craft_anything_analysis::js_app::analyze_application (cognitive 331), craft_anything_ui_egui::settings_ui::ai (cognitive 220), craft_anything_engine::tools::firmware_tools::firmware_image_extract (cognitive 172).+1.0 ptsHighCognitive Complexity
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.+1.0 ptsMediumArchitecture documentation

File quality

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

FileScoreBandWorst signal
crates/formats/src/swift_demangle.rs5.5MixedCyclomatic Complexity: D::operator (cyclomatic 115)
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedDependency Vulnerabilities: Medium CVE: REDACTED
crates/ui-egui/src/settings_ui.rs7.0Near-cleanCyclomatic Complexity: craft_anything_ui_egui::settings_ui::ai (cyclomatic 107)
crates/disasm/src/decode.rs7.0Near-cleanCyclomatic Complexity: craft_anything_disasm::decode::decode_a64 (cyclomatic 102)
crates/disasm/src/pseudo.rs7.0Near-cleanCyclomatic Complexity: Lifter::block (cyclomatic 95)
crates/js/src/facts.rs7.0Near-cleanCyclomatic Complexity: FactVisitor::on_call (cyclomatic 86)
crates/ui-egui/src/lib.rs7.0Near-cleanCyclomatic Complexity: CraftApp::handle_done (cyclomatic 83)
crates/disasm/src/program.rs7.0Near-cleanCyclomatic Complexity: Program::analyze (cyclomatic 72)
crates/formats/src/dotnet/csharp.rs7.0Near-cleanCyclomatic Complexity: Scanner::member (cyclomatic 54)
crates/formats/src/pcap.rs7.0Near-cleanCyclomatic Complexity: craft_anything_formats::pcap::tls (cyclomatic 42)
crates/analysis/src/native.rs7.0Near-cleanCyclomatic Complexity: craft_anything_analysis::native::triage (cyclomatic 36)
crates/analysis/src/standin.rs7.0Near-cleanCyclomatic Complexity: craft_anything_analysis::standin::build (cyclomatic 34)
crates/testkit/src/android.rs7.0Near-cleanCyclomatic Complexity: DexBuilder::build (cyclomatic 34)
crates/ui-egui/src/project.rs7.0Near-cleanCyclomatic Complexity: craft_anything_ui_egui::project::steps (cyclomatic 29)
crates/engine/src/tools/browser_tools.rs7.0Near-cleanCyclomatic Complexity: craft_anything_engine::tools::browser_tools::collect_network (cyclomatic 28)
crates/formats/src/firmware.rs7.0Near-cleanCyclomatic Complexity: Scanner::elf (cyclomatic 28)
crates/formats/src/pe.rs7.0Near-cleanCyclomatic Complexity: craft_anything_formats::pe::enrich (cyclomatic 28)

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 — 12

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 — 1011

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 — 49

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

Could not be resolved — 12

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 67 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 — 67 dimensions across the health lenses
D1D2D3D4D5D6D9D12D13D14D15D16D17D19D20D26D28D29D30D34D35D36D37D43D44AC1AC2AC3AC6AC7AX10AX3AX4AX9ES1ES2M1M2M3M4P1P2P3P6S1X1X12X13X14X15X16X17X18X19X20X21X22X23X24X25X26X27X28X29X3X30X5

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, 1047 of 1072 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 · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1b3c4-fca3-7703-a076-82f06fdb3c9a.

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: test source is present (.rs) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — 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, 407 test files), but it was not re-run: its build outgrew the 6 GB scratch ceiling (6.035 GB measured) and was stopped; its suite was not run. 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 crates/engine/src/settings.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.
  • 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. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — 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 — 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 the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — 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.
  • AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: 2 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • 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 no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Java, Python, Rust, Swift 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, Swift 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.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • X2 Cancellation propagation — 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 JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, 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.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • 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 REDACTED Scanning: REDACTED 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.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: 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.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

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

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

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

250 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was craft_anything_analysis::js_app::analyze_application at 158. A further 43 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 craft_anything_formats::java_ops::opcode at 206 — they are counted neither in the figure above nor in this dimension's score. 8 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/formats/src/java_ops.rs (craft_anything_formats::java_ops::opcode at 206), crates/formats/src/der.rs (craft_anything_formats::der::oid_name at 22), crates/formats/src/pyc.rs (Marshal::object at 22), apps/craft-anything-web/src/triage.rs (craft_anything_web::triage::describe at 21), crates/formats/src/pixels.rs (craft_anything_formats::pixels::decode_with_limit at 20), and 3 more not listed here. 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.

craft_anything_formats::wasm::inspect (cyclomatic 77) · ×67crates/formats/src/wasm.rs:227
craft_anything_engine::tools::firmware_tools::firmware_image_extract (cyclomatic 64) · ×35crates/engine/src/tools/firmware_tools.rs:348
craft_anything_ui_egui::settings_ui::ai (cyclomatic 107) · ×24crates/ui-egui/src/settings_ui.rs:320
craft_anything_analysis::js_app::analyze_application (cyclomatic 158) · ×20crates/analysis/src/js_app.rs:361
craft_anything_disasm::decode::decode_a64 (cyclomatic 102) · ×11crates/disasm/src/decode.rs:611

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

What to do

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

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

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

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

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

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

438 method(s) exceeded the cognitive complexity threshold of 15; the worst was craft_anything_analysis::js_app::analyze_application at 331.

craft_anything_formats::wasm::inspect (cognitive 172) · ×115crates/formats/src/wasm.rs:227
craft_anything_engine::tools::firmware_tools::firmware_image_extract (cognitive 172) · ×68crates/engine/src/tools/firmware_tools.rs:348
craft_anything_ui_egui::settings_ui::ai (cognitive 220) · ×38crates/ui-egui/src/settings_ui.rs:320
craft_anything_analysis::js_app::analyze_application (cognitive 331) · ×36crates/analysis/src/js_app.rs:361
craft_anything_ai::cli_agents::run_cli (cognitive 55) · ×17crates/ai/src/cli_agents/mod.rs:747

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

What to do

  1. Bring the 50 bodies over 60 down to 60 or less in Cognitive Complexity — start with craft_anything_analysis::js_app::analyze_application (cognitive 331), craft_anything_ui_egui::settings_ui::ai (cognitive 220), craft_anything_engine::tools::firmware_tools::firmware_image_extract (cognitive 172). — 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 50 together lifts Cognitive Complexity from 2.0 to about 3.7/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

140 god class(es) detected.

FileTooLong: tools/browser_tools.rs · ×61crates/engine/src/tools/browser_tools.rs
FunctionTooLong: craft_anything_analysis::js_app::analyze_application · ×54crates/analysis/src/js_app.rs:361
MethodTooLong: D.operator · ×10crates/formats/src/swift_demangle.rs:586
TooManyMethods: CraftApp · ×6crates/ui-egui/src/lib.rs:416
ClassTooLong: CraftApp · ×6crates/ui-egui/src/lib.rs:416

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

What to do

  1. Resolve the 61 FileTooLong finding(s) in God Classes — start with lib.rs (3), firmware.rs (2), mod.rs (2). — One of this dimension's main actionable groups (61 warning-level).
  2. Resolve the 54 FunctionTooLong finding(s) in God Classes — start with decode.rs (3), lib.rs (2), browser_tools.rs (2). — One of this dimension's main actionable groups (54 warning-level).
  3. Resolve the 10 MethodTooLong finding(s) in God Classes — start with csharp.rs (2), swift_demangle.rs, program.rs. — One of this dimension's main actionable groups (10 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.7 / 10Stronggated by 117 serious findings✓ Tool-verified

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

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

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

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

Duplicated block (5 lines × 2) · ×44crates/ai/src/rebuild/tools.rs:373
Duplicated block (6 lines × 2) · ×23crates/engine/src/tools/interaction_tools.rs:238
Duplicated block (7 lines × 2) · ×16crates/disasm/src/dataflow.rs:83
Duplicated block (8 lines × 2) · ×9crates/engine/src/tools/android_tools.rs:1246
Duplicated block (10 lines × 2) · ×5crates/disasm/src/pseudo.rs:143

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

What to do

  1. Resolve the 44 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with android_tools.rs (3), game_archive_tools.rs (3), browser_tools.rs (3). — One of this dimension's main actionable groups (44 warning-level).
  2. Resolve the 23 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with apple.rs (2), java.rs (2), interaction_tools.rs. — One of this dimension's main actionable groups (23 warning-level).
  3. Resolve the 16 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with adb_tools.rs (2), packed_tools.rs (2), dataflow.rs. — One of this dimension's main actionable groups (16 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling8.1 / 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 8.1 / 10 · rule-coverage 100% · ceiling Prevented

17 production modules (Cargo), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 4 module(s) off the main sequence, with abstractness counted on 16 of the 17 (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: craft-anything-evidence · ×4

What to do

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

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

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 4 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.8 / 10 · rule-coverage 100% · ceiling Verified

4 of 297 classes have LCOM4 above 3.

Low cohesion: D (LCOM4 46) · ×4crates/formats/src/swift_demangle.rs:117

What to do

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

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

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D12 · Dependency Hygiene9.5 9.4 / 10Exemplary✓ 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 9.4 / 10 · rule-coverage 99% · ceiling Verified

10 outdated, 0 yanked direct Cargo dependencies. 66 of 67 direct crates were graded against crates.io (0 not published there, 1 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: arboard · ×10

✓ On the Gold path — maintain.

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

D13 · REDACTED 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

REDACTED 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 753 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.2 / 10Stronggated by 35 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.2 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: crates/ui-egui/src/lib.rs (24×83=1992); crates/ai/src/rebuild/mod.rs (26×70=1820); crates/ui-egui/src/settings_ui.rs (17×107=1819)

Hotspot: crates/ui-egui/src/lib.rs · ×35crates/ui-egui/src/lib.rs:1384

What to do

  1. Resolve the 35 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (2), lib.rs, settings_ui.rs. — One of this dimension's main actionable groups (35 warning-level).

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

D16 · Bus Factor10.0 / 10Exemplary✓ Tool-verified

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

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

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

No source file's living knowledge is concentrated in a single author. Counted over 364 of the 380 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md.

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 deducted task-comment markers across 187190 LoC (0.0/KLoC) → score 10.0. 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.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. 26 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 found

What to do

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

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

D26 · Project Cohesion6.7 / 10Adequate✓ 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 6.7 / 10 · rule-coverage 100% · ceiling Documented

3 of 18 build units (Cargo) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

Method: REDACTED 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 9.0 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)4.5 / 10Weak✓ 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 4.5 / 10 · rule-coverage 100% · ceiling Documented

12 finding(s): 0 critical, 10 high, 2 medium, 0 low. 6 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 3 file(s) — `crates/ui-egui/src/widgets.rs` (line 488, line 489), `packaging/linux/AppRun` (line 29), `REDACTED` (line 46, line 80) — 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.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D30 · Dependency Vulnerabilities7.8 / 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.8 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 6 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (6). — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 2 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 364 of the 380 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.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

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-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.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.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.

AC1 · Text alternatives1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — apps/craft-anything-web/index.html:16

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC3 · Page structure4.6 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — REDACTED:2, apps/craft-anything-web/index.html:2
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — apps/craft-anything-web/index.html:5

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 2 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
AX10 · Code composition9.8 / 10Exemplary✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

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.

ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

M1 · Documentation (README)8.2 / 10Exemplary✓ Tool-verified

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

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

What to do

  • Add a README to the 17 of 19 project(s) that lack one — worth up to 1.8 pts.
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 repo is organised deliberately — src/test separation and consistent project naming.

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

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

Maturity · Maturity — Whether the 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.

P2 · Observability7.5 / 10Strong✓ 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 10/12 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `xtask`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Add OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) so requests are traceable across the system, not just health-probable.
P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

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

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

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene5.0 / 10Adequate✓ 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.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
S1 · Web-Security Posture6.5 / 10Adequate✓ 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. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker.

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.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×2) — crates/engines/src/cdp.rs:709, crates/formats/src/verify.rs:35

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `crates/engines/src/cdp.rs:709` (`Sha1::new`), `crates/formats/src/verify.rs:35` (`Sha1::digest`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

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

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

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

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

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X3 · Exception handling3.5 / 10Weak✓ Tool-verified

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

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

  • `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — REDACTED:193, REDACTED:312

What to do

  • Swallowed exception (caught, then discarded)
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.

X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether Java packages are null-marked and not undermined by heavy nullness suppression — a package under `@NullMarked` (or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, or a NullAway/Checker Framework configuration naming it) makes an unannotated reference exclude null, and `@SuppressWarnings("NullAway")`, `("nullness")`, `("null")` and `castToNonNull(…)` are what silence it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 0/1 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.

What to do

  • Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).

WCAG coverage — what static analysis assessed

Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 42 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

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 Health50%Adequate — gated by D1, D2, X3, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture95%ExemplarySolid.
Maturity69%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness67%StrongSolid.
Security68%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event Sourcing100%ExemplaryStrongest area.
Accessibility46%Adequate — gated by AC1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 3 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 — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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.

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 48 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.

  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's Java 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 class in this Java code is a Spring, JSR-330 or CDI singleton bean. 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. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state 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.
  • 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 — no public interfaces
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB1 Runtime evidence locked — no reproducible boot — 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 — ~11879 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 — Naming consistency is measured on C# and TypeScript only; Java, Python, Rust, Swift not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (ai), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .java, .py, .rs, .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (3 signals for this style, 3 needed — the count is met but a required primary signal is absent): 1 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 97 value object(s); 2 domain event(s); its domain events are published by services or handlers — no domain entity raises one; no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • 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 JVM, Python, Rust, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not 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.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • X2 Cancellation propagation — 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
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.
  • X6 Hand-rolled structured-format parsing — 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 — 12 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC3 · Page structure · Viewport restricts zoom · ×1
  • Viewport restricts zoom apps/craft-anything-web/index.html:5 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 1011 finding(s)
D2 · Cognitive Complexity · craft_anything_formats · ×115
  • craft_anything_formats::wasm::inspect (cognitive 172) crates/formats/src/wasm.rs:227 — craft_anything_formats::wasm::inspect has cognitive complexity 172 (threshold 15). Drivers by points: if/else 27 (88 pts), loops 16 (48 pts), match/switch 9 (33 pts), boolean chains 3 (nesting depth added 117). 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.
  • craft_anything_formats::macho::enrich (cognitive 138) crates/formats/src/macho.rs:169 — craft_anything_formats::macho::enrich has cognitive complexity 138 (threshold 15). Drivers by points: if/else 50 (110 pts), match/switch 5 (13 pts), loops 5 (11 pts), boolean chains 4 (nesting depth added 74). 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.
  • craft_anything_formats::dotnet::csharp::tokenize (cognitive 130) crates/formats/src/dotnet/csharp.rs:27 — craft_anything_formats::dotnet::csharp::tokenize has cognitive complexity 130 (threshold 15). Drivers by points: if/else 26 (81 pts), loops 11 (34 pts), boolean chains 15 (nesting depth added 78). 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.
  • craft_anything_formats::evm::analyze (cognitive 109) crates/formats/src/evm.rs:395 — craft_anything_formats::evm::analyze has cognitive complexity 109 (threshold 15). Drivers by points: if/else 40 (75 pts), boolean chains 19, loops 5 (8 pts), match/switch 3 (7 pts) (nesting depth added 42). 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.
  • craft_anything_formats::elf::parse_core (cognitive 101) crates/formats/src/elf.rs:884 — craft_anything_formats::elf::parse_core has cognitive complexity 101 (threshold 15). Drivers by points: if/else 23 (70 pts), loops 4 (14 pts), match/switch 4 (13 pts), boolean chains 4 (nesting depth added 66). 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.
  • craft_anything_formats::pcap::tls (cognitive 95) crates/formats/src/pcap.rs:1020 — craft_anything_formats::pcap::tls has cognitive complexity 95 (threshold 15). Drivers by points: if/else 27 (74 pts), loops 4 (13 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 57). 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.
  • craft_anything_formats::solana::inspect (cognitive 79) crates/formats/src/solana.rs:275 — craft_anything_formats::solana::inspect has cognitive complexity 79 (threshold 15). Drivers by points: if/else 28 (55 pts), loops 9 (11 pts), boolean chains 9, match/switch 2 (4 pts) (nesting depth added 31). 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.
  • craft_anything_formats::hints::detect (cognitive 71) crates/formats/src/hints.rs:28 — craft_anything_formats::hints::detect has cognitive complexity 71 (threshold 15). Drivers by points: if/else 41 (46 pts), boolean chains 24, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • craft_anything_formats::macho_deps::parse_thin (cognitive 71) crates/formats/src/macho_deps.rs:302 — craft_anything_formats::macho_deps::parse_thin has cognitive complexity 71 (threshold 15). Drivers by points: if/else 22 (48 pts), match/switch 6 (17 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 39). 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.
  • craft_anything_formats::zip::parse (cognitive 70) crates/formats/src/zip.rs:96 — craft_anything_formats::zip::parse has cognitive complexity 70 (threshold 15). Drivers by points: if/else 21 (54 pts), boolean chains 13, loops 2 (3 pts) (nesting depth added 34). 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.
  • craft_anything_formats::pcap::summarize (cognitive 69) crates/formats/src/pcap.rs:1317 — craft_anything_formats::pcap::summarize has cognitive complexity 69 (threshold 15). Drivers by points: if/else 17 (43 pts), loops 7 (21 pts), boolean chains 5 (nesting depth added 40). 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.
  • craft_anything_formats::dotnet::cil::parse_body (cognitive 66) crates/formats/src/dotnet/cil.rs:486 — craft_anything_formats::dotnet::cil::parse_body has cognitive complexity 66 (threshold 15). Drivers by points: if/else 14 (50 pts), loops 2 (8 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 47). 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.
  • craft_anything_formats::tarcpio::tar (cognitive 66) crates/formats/src/tarcpio.rs:108 — craft_anything_formats::tarcpio::tar has cognitive complexity 66 (threshold 15). Drivers by points: if/else 23 (49 pts), match/switch 3 (10 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 36). 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.
  • craft_anything_formats::axml::manifest (cognitive 64) crates/formats/src/axml.rs:557 — craft_anything_formats::axml::manifest has cognitive complexity 64 (threshold 15). Drivers by points: if/else 13 (47 pts), match/switch 3 (8 pts), boolean chains 7, loops 2 (nesting depth added 39). 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.
  • craft_anything_formats::rust_bin::inspect (cognitive 62) crates/formats/src/rust_bin.rs:229 — craft_anything_formats::rust_bin::inspect has cognitive complexity 62 (threshold 15). Drivers by points: if/else 23 (46 pts), loops 6 (8 pts), boolean chains 5, match/switch 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_formats::pe::parse_resources (cognitive 60) crates/formats/src/pe.rs:730 — craft_anything_formats::pe::parse_resources has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (48 pts), match/switch 3 (7 pts), loops 3 (4 pts), boolean chains 1 (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.
  • craft_anything_formats::dart::string_pool (cognitive 59) crates/formats/src/dart.rs:479 — craft_anything_formats::dart::string_pool has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 6 (14 pts), boolean chains 7 (nesting depth added 33). 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.
  • craft_anything_formats::pe::enrich (cognitive 59) crates/formats/src/pe.rs:534 — craft_anything_formats::pe::enrich has cognitive complexity 59 (threshold 15). Drivers by points: if/else 23 (43 pts), loops 4 (8 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 27). 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.
  • craft_anything_formats::arsc::parse_type (cognitive 58) crates/formats/src/arsc.rs:346 — craft_anything_formats::arsc::parse_type has cognitive complexity 58 (threshold 15). Drivers by points: if/else 23 (51 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 31). 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.
  • craft_anything_formats::axml::parse (cognitive 58) crates/formats/src/axml.rs:300 — craft_anything_formats::axml::parse has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (45 pts), match/switch 3 (7 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 34). 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.
  • craft_anything_formats::pcap::dns (cognitive 56) crates/formats/src/pcap.rs:866 — craft_anything_formats::pcap::dns has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 3 (7 pts), boolean chains 6, match/switch 1 (3 pts) (nesting depth added 31). 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.
  • craft_anything_formats::tarcpio::cpio_with_checksum (cognitive 54) crates/formats/src/tarcpio.rs:290 — craft_anything_formats::tarcpio::cpio_with_checksum has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21 (43 pts), match/switch 3 (9 pts), boolean chains 1, loops 1 (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.
  • craft_anything_formats::binary::parse_object (cognitive 51) crates/formats/src/binary.rs:510 — craft_anything_formats::binary::parse_object has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (23 pts), match/switch 9 (12 pts), loops 7 (10 pts), boolean chains 6 (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.
  • craft_anything_formats::dotnet::cil::decode (cognitive 49) crates/formats/src/dotnet/cil.rs:336 — craft_anything_formats::dotnet::cil::decode has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 13 (26 pts), if/else 9 (22 pts), loops 1 (nesting depth added 26). 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.
  • craft_anything_formats::jsonc::tokenize (cognitive 46) crates/formats/src/jsonc.rs:64 — craft_anything_formats::jsonc::tokenize has cognitive complexity 46 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 5 (13 pts), match/switch 4 (13 pts), boolean chains 2 (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.
  • + 90 more in this group — see findings.md.
D2 · Cognitive Complexity · craft_anything_engine · ×68
  • craft_anything_engine::tools::firmware_tools::firmware_image_extract (cognitive 172) crates/engine/src/tools/firmware_tools.rs:348 — craft_anything_engine::tools::firmware_tools::firmware_image_extract has cognitive complexity 172 (threshold 15). Drivers by points: if/else 30 (88 pts), match/switch 10 (47 pts), loops 9 (31 pts), boolean chains 6 (nesting depth added 117). 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.
  • craft_anything_engine::tools::js_tools::load_app_input (cognitive 83) crates/engine/src/tools/js_tools.rs:172 — craft_anything_engine::tools::js_tools::load_app_input has cognitive complexity 83 (threshold 15). Drivers by points: if/else 19 (48 pts), loops 6 (12 pts), match/switch 5 (12 pts), boolean chains 11 (nesting depth added 42). 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.
  • craft_anything_engine::tools::report_tools::render_markdown (cognitive 74) crates/engine/src/tools/report_tools.rs:230 — craft_anything_engine::tools::report_tools::render_markdown has cognitive complexity 74 (threshold 15). Drivers by points: if/else 26 (46 pts), loops 9 (21 pts), match/switch 1 (4 pts), boolean chains 3 (nesting depth added 35). 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.
  • craft_anything_engine::tools::browser_tools::collect_network (cognitive 70) crates/engine/src/tools/browser_tools.rs:511 — craft_anything_engine::tools::browser_tools::collect_network has cognitive complexity 70 (threshold 15). Drivers by points: if/else 19 (54 pts), match/switch 3 (9 pts), loops 3 (5 pts), boolean chains 2 (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.
  • craft_anything_engine::tools::artifact_tools::core_archive_extract (cognitive 67) crates/engine/src/tools/artifact_tools.rs:634 — craft_anything_engine::tools::artifact_tools::core_archive_extract has cognitive complexity 67 (threshold 15). Drivers by points: match/switch 10 (33 pts), if/else 11 (23 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 38). 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.
  • craft_anything_engine::tools::managed_tools::managed_app_graph_build (cognitive 50) crates/engine/src/tools/managed_tools.rs:919 — craft_anything_engine::tools::managed_tools::managed_app_graph_build has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 10 (14 pts), match/switch 2 (5 pts), boolean chains 1 (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.
  • craft_anything_engine::tools::web_tools::js_sources_restore (cognitive 49) crates/engine/src/tools/web_tools.rs:441 — craft_anything_engine::tools::web_tools::js_sources_restore has cognitive complexity 49 (threshold 15). Drivers by points: if/else 9 (24 pts), match/switch 5 (15 pts), loops 3 (9 pts), boolean chains 1 (nesting depth added 31). 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.
  • craft_anything_engine::tools::artifact_tools::walk_dir (cognitive 48) crates/engine/src/tools/artifact_tools.rs:136 — craft_anything_engine::tools::artifact_tools::walk_dir has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (38 pts), boolean chains 5, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 27). 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.
  • craft_anything_engine::tools::java_decompile_tools::read_sources (cognitive 47) crates/engine/src/tools/java_decompile_tools.rs:68 — craft_anything_engine::tools::java_decompile_tools::read_sources has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (34 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 31). 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.
  • craft_anything_engine::tools::report_tools::render_html (cognitive 42) crates/engine/src/tools/report_tools.rs:390 — craft_anything_engine::tools::report_tools::render_html has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (26 pts), loops 7 (14 pts), boolean chains 2 (nesting depth added 13). 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.
  • craft_anything_engine::tools::android_tools::flutter::android_flutter_identify (cognitive 39) crates/engine/src/tools/android_tools/flutter.rs:125 — craft_anything_engine::tools::android_tools::flutter::android_flutter_identify has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (28 pts), loops 4 (7 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_engine::tools::browser_tools::web_walkthrough_record (cognitive 39) crates/engine/src/tools/browser_tools.rs:2165 — craft_anything_engine::tools::browser_tools::web_walkthrough_record has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 4, loops 2 (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.
  • craft_anything_engine::target::sniff (cognitive 34) crates/engine/src/target.rs:129 — craft_anything_engine::target::sniff has cognitive complexity 34 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 9 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • craft_anything_engine::tools::android_tools::android_resources_read (cognitive 33) crates/engine/src/tools/android_tools.rs:1095 — craft_anything_engine::tools::android_tools::android_resources_read has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (22 pts), match/switch 3 (7 pts), loops 2 (3 pts), boolean chains 1 (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.
  • craft_anything_engine::tools::browser_tools::script_check::selector_problem (cognitive 33) crates/engine/src/tools/browser_tools/script_check.rs:84 — craft_anything_engine::tools::browser_tools::script_check::selector_problem has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 4, loops 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_engine::tools::process_tools::runtime_walkthrough_record (cognitive 32) crates/engine/src/tools/process_tools.rs:304 — craft_anything_engine::tools::process_tools::runtime_walkthrough_record has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (20 pts), match/switch 2 (5 pts), boolean chains 4, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_engine::wasm_plugins::imp::install (cognitive 32) crates/engine/src/wasm_plugins.rs:138 — craft_anything_engine::wasm_plugins::imp::install has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_engine::tools::game_archive_tools::game_archives_list (cognitive 31) crates/engine/src/tools/game_archive_tools.rs:1093 — craft_anything_engine::tools::game_archive_tools::game_archives_list has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (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.
  • craft_anything_engine::tools::investigation_tools::render (cognitive 31) crates/engine/src/tools/investigation_tools.rs:321 — craft_anything_engine::tools::investigation_tools::render has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 6 (11 pts), match/switch 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_engine::tools::web_common::resize (cognitive 30) crates/engine/src/tools/web_common.rs:948 — craft_anything_engine::tools::web_common::resize has cognitive complexity 30 (threshold 15). Drivers by points: loops 6 (20 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 20). 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.
  • craft_anything_engine::tools::android_tools::android_package_show (cognitive 29) crates/engine/src/tools/android_tools.rs:390 — craft_anything_engine::tools::android_tools::android_package_show has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 5 (9 pts), boolean chains 6, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_engine::tools::apple_tools::apple_nib_decode (cognitive 29) crates/engine/src/tools/apple_tools.rs:781 — craft_anything_engine::tools::apple_tools::apple_nib_decode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, match/switch 2 (4 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.
  • craft_anything_engine::tools::artifact_tools::inventory_path_unlisted (cognitive 29) crates/engine/src/tools/artifact_tools.rs:424 — craft_anything_engine::tools::artifact_tools::inventory_path_unlisted has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (10 pts), match/switch 2 (4 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.
  • craft_anything_engine::tools::managed_tools::managed_native_calls_verify (cognitive 28) crates/engine/src/tools/managed_tools.rs:649 — craft_anything_engine::tools::managed_tools::managed_native_calls_verify has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 2 (6 pts), boolean chains 3, loops 3 (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.
  • craft_anything_engine::tools::program_facts_tools::native_source_folder_write (cognitive 28) crates/engine/src/tools/program_facts_tools.rs:992 — craft_anything_engine::tools::program_facts_tools::native_source_folder_write has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 43 more in this group — see findings.md.
D1 · Cyclomatic Complexity · craft_anything_formats · ×67
  • craft_anything_formats::wasm::inspect (cyclomatic 77) crates/formats/src/wasm.rs:227 — craft_anything_formats::wasm::inspect has cyclomatic complexity 77 (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.
  • craft_anything_formats::macho::enrich (cyclomatic 74) crates/formats/src/macho.rs:169 — craft_anything_formats::macho::enrich has cyclomatic complexity 74 (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.
  • craft_anything_formats::evm::analyze (cyclomatic 67) crates/formats/src/evm.rs:395 — craft_anything_formats::evm::analyze has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: craft_anything_formats::evm::mnemonic (cyclomatic 85) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • craft_anything_formats::hints::detect (cyclomatic 64) crates/formats/src/hints.rs:28 — craft_anything_formats::hints::detect has cyclomatic complexity 64 (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.
  • craft_anything_formats::arsc::config_qualifiers (cyclomatic 57) crates/formats/src/arsc.rs:115 — craft_anything_formats::arsc::config_qualifiers has cyclomatic complexity 57 (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.
  • craft_anything_formats::dotnet::csharp::tokenize (cyclomatic 51) crates/formats/src/dotnet/csharp.rs:27 — craft_anything_formats::dotnet::csharp::tokenize has cyclomatic complexity 51 (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.
  • craft_anything_formats::macho_deps::parse_thin (cyclomatic 50) crates/formats/src/macho_deps.rs:302 — craft_anything_formats::macho_deps::parse_thin has cyclomatic complexity 50 (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.
  • craft_anything_formats::solana::inspect (cyclomatic 48) crates/formats/src/solana.rs:275 — craft_anything_formats::solana::inspect has cyclomatic complexity 48 (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.
  • craft_anything_formats::binary::parse_object (cyclomatic 46) crates/formats/src/binary.rs:510 — craft_anything_formats::binary::parse_object has cyclomatic complexity 46 (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.
  • craft_anything_formats::elf::parse_core (cyclomatic 46) crates/formats/src/elf.rs:884 — craft_anything_formats::elf::parse_core 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.
  • craft_anything_formats::pcap::tls (cyclomatic 42) crates/formats/src/pcap.rs:1020 — craft_anything_formats::pcap::tls has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • craft_anything_formats::axml::manifest (cyclomatic 38) crates/formats/src/axml.rs:557 — craft_anything_formats::axml::manifest has cyclomatic complexity 38 (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.
  • craft_anything_formats::rust_bin::inspect (cyclomatic 38) crates/formats/src/rust_bin.rs:229 — craft_anything_formats::rust_bin::inspect has cyclomatic complexity 38 (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.
  • craft_anything_formats::zip::parse (cyclomatic 36) crates/formats/src/zip.rs:96 — craft_anything_formats::zip::parse has cyclomatic complexity 36 (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.
  • craft_anything_formats::swift_demangle::render (cyclomatic 35) crates/formats/src/swift_demangle.rs:1087 — craft_anything_formats::swift_demangle::render has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: D::standard (cyclomatic 55) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • craft_anything_formats::dex_ops::decode_one (cyclomatic 34) crates/formats/src/dex_ops.rs:408 — craft_anything_formats::dex_ops::decode_one has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: craft_anything_formats::dex_ops::opcode (cyclomatic 65) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • craft_anything_formats::tarcpio::tar (cyclomatic 34) crates/formats/src/tarcpio.rs:108 — craft_anything_formats::tarcpio::tar has cyclomatic complexity 34 (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.
  • craft_anything_formats::dotnet::cil::decode (cyclomatic 33) crates/formats/src/dotnet/cil.rs:336 — craft_anything_formats::dotnet::cil::decode has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • craft_anything_formats::elf::enrich (cyclomatic 31) crates/formats/src/elf.rs:206 — craft_anything_formats::elf::enrich has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: craft_anything_formats::elf::dyn_name (cyclomatic 37) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • craft_anything_formats::jsonc::tokenize (cyclomatic 31) crates/formats/src/jsonc.rs:64 — craft_anything_formats::jsonc::tokenize has cyclomatic complexity 31 (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.
  • craft_anything_formats::dotnet::model::native_boundaries (cyclomatic 30) crates/formats/src/dotnet/model.rs:1049 — craft_anything_formats::dotnet::model::native_boundaries has cyclomatic complexity 30 (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.
  • craft_anything_formats::pcap::summarize (cyclomatic 29) crates/formats/src/pcap.rs:1317 — craft_anything_formats::pcap::summarize 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.
  • craft_anything_formats::pe::enrich (cyclomatic 28) crates/formats/src/pe.rs:534 — craft_anything_formats::pe::enrich 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.
  • craft_anything_formats::axml::parse (cyclomatic 27) crates/formats/src/axml.rs:300 — craft_anything_formats::axml::parse 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.
  • craft_anything_formats::pcap::dns (cyclomatic 27) crates/formats/src/pcap.rs:866 — craft_anything_formats::pcap::dns 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.
  • + 42 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×61
  • FileTooLong: tools/browser_tools.rs crates/engine/src/tools/browser_tools.rs — FileTooLong — 1806 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 61 free functions. The bar is 500 significant lines; this is 1306 over it, 3.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: src/project.rs crates/ui-egui/src/project.rs — FileTooLong — 1380 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 33 free functions. The bar is 500 significant lines; this is 880 over it, 2.76× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/lib.rs crates/ui-egui/src/lib.rs — FileTooLong — 1331 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 79% of them inside a single declaration: CraftApp (4 blocks, 416-2037). The bar is 500 significant lines; this is 831 over it, 2.66× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/firmware.rs crates/formats/src/firmware.rs — FileTooLong — 1294 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: Scanner (2 blocks, 309-1536). The bar is 500 significant lines; this is 794 over it, 2.59× 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: tools/adb_tools.rs crates/engine/src/tools/adb_tools.rs — FileTooLong — 1078 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 50 free functions. The bar is 500 significant lines; this is 578 over it, 2.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/pcap.rs crates/formats/src/pcap.rs — FileTooLong — 1053 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 553 over it, 2.11× 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: tools/game_archive_tools.rs crates/engine/src/tools/game_archive_tools.rs — FileTooLong — 1050 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 550 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/facts.rs crates/js/src/facts.rs — FileTooLong — 1047 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 85% of them inside a single declaration: FactVisitor (3 blocks, 150-1530). The bar is 500 significant lines; this is 547 over it, 2.09× 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: tools/apple_tools.rs crates/engine/src/tools/apple_tools.rs — FileTooLong — 1032 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 532 over it, 2.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/swift_demangle.rs crates/formats/src/swift_demangle.rs — FileTooLong — 943 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: D (2 blocks, 117-975). The bar is 500 significant lines; this is 443 over it, 1.89× 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: tools/android_tools.rs crates/engine/src/tools/android_tools.rs — FileTooLong — 939 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 439 over it, 1.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/program.rs crates/disasm/src/program.rs — FileTooLong — 929 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 429 over it, 1.86× 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: dotnet/model.rs crates/formats/src/dotnet/model.rs — FileTooLong — 899 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 399 over it, 1.80× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/standin.rs crates/analysis/src/standin.rs — FileTooLong — 878 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 378 over it, 1.76× 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: tools/website_tools.rs crates/engine/src/tools/website_tools.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), declaring 36 free functions. 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: src/pseudo.rs crates/disasm/src/pseudo.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: tools/program_facts_tools.rs crates/engine/src/tools/program_facts_tools.rs — FileTooLong — 843 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 343 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: dotnet/csharp.rs crates/formats/src/dotnet/csharp.rs — FileTooLong — 840 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 340 over it, 1.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/decode.rs crates/disasm/src/decode.rs — FileTooLong — 839 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 339 over it, 1.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/native.rs crates/analysis/src/native.rs — FileTooLong — 829 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 329 over it, 1.66× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/lib.rs crates/testkit/src/lib.rs — FileTooLong — 803 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 303 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: src/android.rs crates/testkit/src/android.rs — FileTooLong — 802 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 33 free functions. The bar is 500 significant lines; this is 302 over it, 1.60× 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: rebuild/mod.rs crates/ai/src/rebuild/mod.rs — FileTooLong — 789 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 62% of them inside a single declaration: Worker (2 blocks, 416-1189). The bar is 500 significant lines; this is 289 over it, 1.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: src/sqlite.rs crates/formats/src/sqlite.rs — FileTooLong — 788 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 288 over it, 1.58× 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: tools/managed_tools.rs crates/engine/src/tools/managed_tools.rs — FileTooLong — 765 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 265 over it, 1.53× 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.
  • + 36 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×54
  • FunctionTooLong: craft_anything_analysis::js_app::analyze_application crates/analysis/src/js_app.rs:361 — FunctionTooLong — craft_anything_analysis::js_app::analyze_application runs 477 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 377 over it, 4.77× 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: craft_anything_ui_egui::settings_ui::ai crates/ui-egui/src/settings_ui.rs:320 — FunctionTooLong — craft_anything_ui_egui::settings_ui::ai runs 298 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 198 over it, 2.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: craft_anything_formats::wasm::inspect crates/formats/src/wasm.rs:227 — FunctionTooLong — craft_anything_formats::wasm::inspect runs 258 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 158 over it, 2.58× 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: craft_anything_engine::tools::adb_tools::specs crates/engine/src/tools/adb_tools.rs:29 — FunctionTooLong — craft_anything_engine::tools::adb_tools::specs runs 247 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 147 over it, 2.47× 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: craft_anything_testkit::managed::build crates/testkit/src/managed.rs:146 — FunctionTooLong — craft_anything_testkit::managed::build runs 232 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 132 over it, 2.32× 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: craft_anything_engine::tools::firmware_tools::firmware_image_extract crates/engine/src/tools/firmware_tools.rs:348 — FunctionTooLong — craft_anything_engine::tools::firmware_tools::firmware_image_extract runs 228 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 128 over it, 2.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.
  • FunctionTooLong: craft_anything_formats::macho_deps::parse_thin crates/formats/src/macho_deps.rs:302 — FunctionTooLong — craft_anything_formats::macho_deps::parse_thin runs 207 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 107 over it, 2.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: craft_anything_platform::capture::unix::capture crates/platform/src/capture.rs:846 — FunctionTooLong — craft_anything_platform::capture::unix::capture runs 204 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 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: craft_anything_formats::macho::enrich crates/formats/src/macho.rs:169 — FunctionTooLong — craft_anything_formats::macho::enrich runs 191 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 91 over it, 1.91× 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: craft_anything_testkit::macho64 crates/testkit/src/lib.rs:697 — FunctionTooLong — craft_anything_testkit::macho64 runs 182 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 82 over it, 1.82× 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: craft_anything_disasm::decode::decode_a64 crates/disasm/src/decode.rs:611 — FunctionTooLong — craft_anything_disasm::decode::decode_a64 runs 174 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 74 over it, 1.74× 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: craft_anything_formats::evm::analyze crates/formats/src/evm.rs:395 — FunctionTooLong — craft_anything_formats::evm::analyze runs 158 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 58 over it, 1.58× 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: craft_anything_formats::solana::inspect crates/formats/src/solana.rs:275 — FunctionTooLong — craft_anything_formats::solana::inspect runs 154 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 54 over it, 1.54× 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: craft_anything_disasm::decode::decode_a32 crates/disasm/src/decode.rs:841 — FunctionTooLong — craft_anything_disasm::decode::decode_a32 runs 149 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 49 over it, 1.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.
  • FunctionTooLong: craft_anything_disasm::dataflow::def_use crates/disasm/src/dataflow.rs:57 — FunctionTooLong — craft_anything_disasm::dataflow::def_use runs 147 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 47 over it, 1.47× 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: craft_anything_engine::tools::native_workflows::specs crates/engine/src/tools/native_workflows.rs:14 — FunctionTooLong — craft_anything_engine::tools::native_workflows::specs runs 146 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 46 over it, 1.46× 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: craft_anything_testkit::elf64 crates/testkit/src/lib.rs:210 — FunctionTooLong — craft_anything_testkit::elf64 runs 146 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 46 over it, 1.46× 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: craft_anything_engine::tools::native_listing::specs crates/engine/src/tools/native_listing.rs:12 — FunctionTooLong — craft_anything_engine::tools::native_listing::specs runs 145 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 45 over it, 1.45× 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: craft_anything_engine::tools::project_tools::specs crates/engine/src/tools/project_tools.rs:21 — FunctionTooLong — craft_anything_engine::tools::project_tools::specs runs 142 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 42 over it, 1.42× 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: craft_anything_engine::tools::js_tools::load_app_input crates/engine/src/tools/js_tools.rs:172 — FunctionTooLong — craft_anything_engine::tools::js_tools::load_app_input runs 139 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 39 over it, 1.39× 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: craft_anything_setup::clients::clients crates/setup/src/clients.rs:254 — FunctionTooLong — craft_anything_setup::clients::clients 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.
  • FunctionTooLong: craft_anything_ai::cli_agents::run_cli crates/ai/src/cli_agents/mod.rs:747 — FunctionTooLong — craft_anything_ai::cli_agents::run_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: craft_anything_engine::tools::native_annotate::specs crates/engine/src/tools/native_annotate.rs:18 — FunctionTooLong — craft_anything_engine::tools::native_annotate::specs 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: craft_anything_formats::java_ops::opcode crates/formats/src/java_ops.rs:58 — FunctionTooLong — craft_anything_formats::java_ops::opcode 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: craft_anything_cli::ai_cmd::ai apps/craft-anything-cli/src/ai_cmd.rs:204 — FunctionTooLong — craft_anything_cli::ai_cmd::ai runs 132 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 32 over it, 1.32× 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.
  • + 29 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×44
  • Duplicated block (5 lines × 2) crates/ai/src/rebuild/tools.rs:373 — crates/ai/src/rebuild/tools.rs:373-377 | crates/ai/src/rebuild/tools.rs:433-437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/engine/src/pins.rs:348 — crates/engine/src/pins.rs:348-352 | crates/engine/src/workspace.rs:67-71 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/engine/src/tools/adb_tools.rs:1150 — crates/engine/src/tools/adb_tools.rs:1150-1154 | crates/engine/src/tools/adb_tools.rs:1270-1274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/engine/src/tools/android_tools.rs:711 — crates/engine/src/tools/android_tools.rs:711-715 | crates/engine/src/tools/android_tools.rs:1040-1044 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/engine/src/tools/android_tools.rs:789 — crates/engine/src/tools/android_tools.rs:789-793 | crates/engine/src/tools/android_tools.rs:933-937 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/engine/src/tools/android_tools/jeb.rs:166 — crates/engine/src/tools/android_tools/jeb.rs:166-170 | crates/engines/src/cdp.rs:285-289 — 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 (5 lines × 2) crates/engine/src/tools/game_archive_tools.rs:857 — crates/engine/src/tools/game_archive_tools.rs:857-861 | crates/engine/src/tools/game_archive_tools.rs:1289-1293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/engine/src/tools/gdb_tools.rs:277 — crates/engine/src/tools/gdb_tools.rs:277-281 | crates/engine/src/tools/rizin_session_tools.rs:285-289 — before extracting anything, compare `crates/engine/src/tools/gdb_tools.rs` and `crates/engine/src/tools/rizin_session_tools.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 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.
  • Duplicated block (5 lines × 2) crates/engine/src/tools/native_formats.rs:232 — crates/engine/src/tools/native_formats.rs:232-236 | crates/engine/src/tools/static_input.rs:50-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/engine/src/tools/sbpf_tools.rs:332 — crates/engine/src/tools/sbpf_tools.rs:332-336 | crates/engine/src/tools/sbpf_tools.rs:443-447 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/engines/src/adb.rs:154 — crates/engines/src/adb.rs:154-158 | crates/engines/src/frida.rs:263-267 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/engines/src/frida.rs:289 — crates/engines/src/frida.rs:289-293 | crates/engines/src/frida.rs:322-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/formats/src/decompress.rs:81 — crates/formats/src/decompress.rs:81-85 | crates/formats/src/decompress.rs:93-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/formats/src/pe.rs:265 — crates/formats/src/pe.rs:265-269 | crates/formats/src/pe.rs:314-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/formats/src/unity_serialized.rs:103 — crates/formats/src/unity_serialized.rs:103-107 | crates/formats/src/unreal_pak.rs:120-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/testkit/src/lib.rs:338 — crates/testkit/src/lib.rs:338-342 | crates/testkit/src/sbpf.rs:160-164 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/testkit/src/lib.rs:628 — crates/testkit/src/lib.rs:628-632 | crates/testkit/src/lib.rs:855-859 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/ui-egui/src/settings_ui.rs:864 — crates/ui-egui/src/settings_ui.rs:864-868 | crates/ui-egui/src/settings_ui.rs:891-895 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/ui-egui/src/theme.rs:115 — crates/ui-egui/src/theme.rs:115-119 | crates/ui-egui/src/theme.rs:147-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/engine/src/tools/android_tools.rs:349 — crates/engine/src/tools/android_tools.rs:349-353 | crates/engine/src/tools/java_tools.rs:322-326 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/testkit/src/android.rs:905 — crates/testkit/src/android.rs:905-909 | crates/testkit/src/crypto.rs:209-213 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/testkit/src/java.rs:266 — crates/testkit/src/java.rs:266-276 | crates/testkit/src/java.rs:323-327 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/testkit/src/formats.rs:150 — crates/testkit/src/formats.rs:150-154 | crates/testkit/src/sbpf.rs:99-106 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/engine/src/tools/browser_tools.rs:953 — crates/engine/src/tools/browser_tools.rs:953-958 | crates/engine/src/tools/browser_tools.rs:1244-1248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/engine/src/tools/web_common.rs:192 — crates/engine/src/tools/web_common.rs:192-197 | crates/engine/src/tools/web_common.rs:235-239 — 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.
  • + 19 more in this group — see findings.md.
D2 · Cognitive Complexity · craft_anything_ui_egui · ×38
  • craft_anything_ui_egui::settings_ui::ai (cognitive 220) crates/ui-egui/src/settings_ui.rs:320 — craft_anything_ui_egui::settings_ui::ai has cognitive complexity 220 (threshold 15). Drivers by points: if/else 83 (179 pts), boolean chains 22, loops 6 (16 pts), match/switch 1 (3 pts) (nesting depth added 108). 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.
  • craft_anything_ui_egui::engine_ui::modal (cognitive 83) crates/ui-egui/src/engine_ui.rs:800 — craft_anything_ui_egui::engine_ui::modal has cognitive complexity 83 (threshold 15). Drivers by points: if/else 34 (71 pts), boolean chains 6, match/switch 2 (5 pts), loops 1 (nesting depth added 40). 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.
  • craft_anything_ui_egui::chat::paragraph (cognitive 49) crates/ui-egui/src/chat.rs:610 — craft_anything_ui_egui::chat::paragraph has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 7 (15 pts) (nesting depth added 27). 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.
  • craft_anything_ui_egui::project::steps (cognitive 49) crates/ui-egui/src/project.rs:1059 — craft_anything_ui_egui::project::steps has cognitive complexity 49 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ui_egui::titlebar::show (cognitive 46) crates/ui-egui/src/titlebar.rs:130 — craft_anything_ui_egui::titlebar::show has cognitive complexity 46 (threshold 15). Drivers by points: if/else 33 (41 pts), match/switch 1 (3 pts), boolean chains 2 (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.
  • craft_anything_ui_egui::prompt_box::show (cognitive 45) crates/ui-egui/src/prompt_box.rs:134 — craft_anything_ui_egui::prompt_box::show has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 12, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ui_egui::engine_ui::ghidra_modal (cognitive 44) crates/ui-egui/src/engine_ui.rs:204 — craft_anything_ui_egui::engine_ui::ghidra_modal has cognitive complexity 44 (threshold 15). Drivers by points: if/else 29 (42 pts), boolean chains 2 (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.
  • craft_anything_ui_egui::project::composer (cognitive 37) crates/ui-egui/src/project.rs:1735 — craft_anything_ui_egui::project::composer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22 (30 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ui_egui::palette::show (cognitive 35) crates/ui-egui/src/palette.rs:65 — craft_anything_ui_egui::palette::show has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 5, match/switch 3 (4 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.
  • craft_anything_ui_egui::chat::item_ui (cognitive 31) crates/ui-egui/src/chat.rs:432 — craft_anything_ui_egui::chat::item_ui has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 4 (8 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ui_egui::workbench::hex_view (cognitive 31) crates/ui-egui/src/workbench.rs:622 — craft_anything_ui_egui::workbench::hex_view has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ui_egui::chat::apply_event (cognitive 30) crates/ui-egui/src/chat.rs:14 — craft_anything_ui_egui::chat::apply_event has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 3 (5 pts), loops 1 (2 pts) (nesting depth added 16). 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.
  • craft_anything_ui_egui::project::draw_items (cognitive 30) crates/ui-egui/src/project.rs:1352 — craft_anything_ui_egui::project::draw_items has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (23 pts), boolean chains 3, 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.
  • craft_anything_ui_egui::home::modals (cognitive 28) crates/ui-egui/src/home.rs:70 — craft_anything_ui_egui::home::modals has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 3, loops 1 (3 pts), match/switch 1 (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.
  • craft_anything_ui_egui::project::ask_card (cognitive 25) crates/ui-egui/src/project.rs:1545 — craft_anything_ui_egui::project::ask_card has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 3, loops 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.
  • craft_anything_ui_egui::schema_form::show (cognitive 24) crates/ui-egui/src/schema_form.rs:127 — craft_anything_ui_egui::schema_form::show has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (5 pts), loops 2 (4 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.
  • craft_anything_ui_egui::settings_ui::show (cognitive 24) crates/ui-egui/src/settings_ui.rs:14 — craft_anything_ui_egui::settings_ui::show has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ui_egui::builders::agent_model_picker (cognitive 23) crates/ui-egui/src/builders.rs:22 — craft_anything_ui_egui::builders::agent_model_picker has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 3, loops 2, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • craft_anything_ui_egui::make::hero (cognitive 23) crates/ui-egui/src/make.rs:81 — craft_anything_ui_egui::make::hero has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 8, match/switch 1 (nesting depth added 2). 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.
  • craft_anything_ui_egui::settings_ui::plugins (cognitive 23) crates/ui-egui/src/settings_ui.rs:845 — craft_anything_ui_egui::settings_ui::plugins has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3, loops 2 (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.
  • craft_anything_ui_egui::workbench::rail_list (cognitive 23) crates/ui-egui/src/workbench.rs:191 — craft_anything_ui_egui::workbench::rail_list has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (2 pts), match/switch 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ui_egui::report::markdown (cognitive 22) crates/ui-egui/src/report.rs:25 — craft_anything_ui_egui::report::markdown has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (8 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ui_egui::sidebar::show (cognitive 22) crates/ui-egui/src/sidebar.rs:30 — craft_anything_ui_egui::sidebar::show has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2, loops 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.
  • craft_anything_ui_egui::builders::need_builder_modal (cognitive 21) crates/ui-egui/src/builders.rs:378 — craft_anything_ui_egui::builders::need_builder_modal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ui_egui::workbench::tab_strip (cognitive 20) crates/ui-egui/src/workbench.rs:358 — craft_anything_ui_egui::workbench::tab_strip has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, 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.
  • + 13 more in this group — see findings.md.
D2 · Cognitive Complexity · craft_anything_analysis · ×36
  • craft_anything_analysis::js_app::analyze_application (cognitive 331) crates/analysis/src/js_app.rs:361 — craft_anything_analysis::js_app::analyze_application has cognitive complexity 331 (threshold 15). Drivers by points: if/else 76 (182 pts), loops 56 (111 pts), boolean chains 25, match/switch 4 (13 pts) (nesting depth added 170). 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.
  • craft_anything_analysis::js_ledger::build_ledger (cognitive 80) crates/analysis/src/js_ledger.rs:220 — craft_anything_analysis::js_ledger::build_ledger has cognitive complexity 80 (threshold 15). Drivers by points: if/else 23 (66 pts), match/switch 2 (6 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 50). 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.
  • craft_anything_analysis::standin::build (cognitive 65) crates/analysis/src/standin.rs:774 — craft_anything_analysis::standin::build has cognitive complexity 65 (threshold 15). Drivers by points: if/else 25 (50 pts), boolean chains 9, loops 4 (6 pts) (nesting depth added 27). 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.
  • craft_anything_analysis::js_source::diff_source_and_bundle (cognitive 61) crates/analysis/src/js_source.rs:318 — craft_anything_analysis::js_source::diff_source_and_bundle has cognitive complexity 61 (threshold 15). Drivers by points: if/else 17 (38 pts), loops 10 (17 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 31). 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.
  • craft_anything_analysis::js_trace::trace_semantics (cognitive 52) crates/analysis/src/js_trace.rs:230 — craft_anything_analysis::js_trace::trace_semantics has cognitive complexity 52 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 7 (16 pts), boolean chains 7, match/switch 1 (2 pts) (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.
  • craft_anything_analysis::native::ui_action (cognitive 45) crates/analysis/src/native.rs:960 — craft_anything_analysis::native::ui_action has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 8 (11 pts), boolean chains 5 (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.
  • craft_anything_analysis::standin::merge_siblings (cognitive 44) crates/analysis/src/standin.rs:709 — craft_anything_analysis::standin::merge_siblings has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 5 (12 pts), boolean chains 4 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_analysis::function_match::print_function (cognitive 42) crates/analysis/src/function_match.rs:222 — craft_anything_analysis::function_match::print_function has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 5 (9 pts) (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.
  • craft_anything_analysis::native::call_path (cognitive 37) crates/analysis/src/native.rs:590 — craft_anything_analysis::native::call_path has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 3 (5 pts), match/switch 3, boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_analysis::js_inventory::sniff_kind (cognitive 36) crates/analysis/src/js_inventory.rs:88 — craft_anything_analysis::js_inventory::sniff_kind has cognitive complexity 36 (threshold 15). Drivers by points: if/else 26 (30 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • craft_anything_analysis::js_ledger::candidate_expectations (cognitive 33) crates/analysis/src/js_ledger.rs:106 — craft_anything_analysis::js_ledger::candidate_expectations has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 9 (11 pts), boolean chains 3 (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.
  • craft_anything_analysis::native::triage (cognitive 33) crates/analysis/src/native.rs:54 — craft_anything_analysis::native::triage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24 (25 pts), match/switch 4 (5 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • craft_anything_analysis::native::call_graph_capped (cognitive 33) crates/analysis/src/native.rs:510 — craft_anything_analysis::native::call_graph_capped has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 2 (3 pts), match/switch 1 (3 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.
  • craft_anything_analysis::js_source::tokenize_glob (cognitive 31) crates/analysis/src/js_source.rs:26 — craft_anything_analysis::js_source::tokenize_glob has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (4 pts), boolean chains 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.
  • craft_anything_analysis::standin::answer (cognitive 31) crates/analysis/src/standin.rs:1183 — craft_anything_analysis::standin::answer has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (22 pts), loops 3 (5 pts), boolean chains 3, 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.
  • craft_anything_analysis::web_har::inspect_har (cognitive 29) crates/analysis/src/web_har.rs:418 — craft_anything_analysis::web_har::inspect_har has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts), match/switch 2 (6 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.
  • craft_anything_analysis::js_inventory::path_role (cognitive 28) crates/analysis/src/js_inventory.rs:174 — craft_anything_analysis::js_inventory::path_role has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, boolean chains 9. 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.
  • craft_anything_analysis::java_decompile::decompile_class (cognitive 27) crates/analysis/src/java_decompile.rs:769 — craft_anything_analysis::java_decompile::decompile_class has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (22 pts), loops 3 (4 pts), boolean chains 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.
  • craft_anything_analysis::standin::make_sample (cognitive 27) crates/analysis/src/standin.rs:976 — craft_anything_analysis::standin::make_sample has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_analysis::js_projection::project_apple (cognitive 26) crates/analysis/src/js_projection.rs:154 — craft_anything_analysis::js_projection::project_apple has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 7, loops 4, 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.
  • craft_anything_analysis::js_trace::reconcile (cognitive 26) crates/analysis/src/js_trace.rs:400 — craft_anything_analysis::js_trace::reconcile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (6 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_analysis::native::feature_paths (cognitive 25) crates/analysis/src/native.rs:703 — craft_anything_analysis::native::feature_paths has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (6 pts), boolean chains 1 (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.
  • craft_anything_analysis::js_compare::match_modules (cognitive 22) crates/analysis/src/js_compare.rs:63 — craft_anything_analysis::js_compare::match_modules has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, match/switch 1 (3 pts), loops 2 (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.
  • craft_anything_analysis::js_trace::walk (cognitive 22) crates/analysis/src/js_trace.rs:125 — craft_anything_analysis::js_trace::walk has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 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.
  • craft_anything_analysis::native::refs (cognitive 21) crates/analysis/src/native.rs:305 — craft_anything_analysis::native::refs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 11 more in this group — see findings.md.
D1 · Cyclomatic Complexity · craft_anything_engine · ×35
  • craft_anything_engine::tools::firmware_tools::firmware_image_extract (cyclomatic 64) crates/engine/src/tools/firmware_tools.rs:348 — craft_anything_engine::tools::firmware_tools::firmware_image_extract has cyclomatic complexity 64 (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.
  • craft_anything_engine::tools::js_tools::load_app_input (cyclomatic 44) crates/engine/src/tools/js_tools.rs:172 — craft_anything_engine::tools::js_tools::load_app_input has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • craft_anything_engine::tools::report_tools::render_markdown (cyclomatic 32) crates/engine/src/tools/report_tools.rs:230 — craft_anything_engine::tools::report_tools::render_markdown 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.
  • craft_anything_engine::tools::artifact_tools::core_archive_extract (cyclomatic 31) crates/engine/src/tools/artifact_tools.rs:634 — craft_anything_engine::tools::artifact_tools::core_archive_extract has cyclomatic complexity 31 (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.
  • craft_anything_engine::target::sniff (cyclomatic 28) crates/engine/src/target.rs:129 — craft_anything_engine::target::sniff has cyclomatic complexity 28 (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.
  • craft_anything_engine::tools::browser_tools::collect_network (cyclomatic 28) crates/engine/src/tools/browser_tools.rs:511 — craft_anything_engine::tools::browser_tools::collect_network 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.
  • craft_anything_engine::tools::managed_tools::managed_app_graph_build (cyclomatic 27) crates/engine/src/tools/managed_tools.rs:919 — craft_anything_engine::tools::managed_tools::managed_app_graph_build 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.
  • craft_anything_engine::tools::browser_tools::web_walkthrough_record (cyclomatic 26) crates/engine/src/tools/browser_tools.rs:2165 — craft_anything_engine::tools::browser_tools::web_walkthrough_record 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.
  • craft_anything_engine::tools::native_function::native_data_show (cyclomatic 26) crates/engine/src/tools/native_function.rs:651 — craft_anything_engine::tools::native_function::native_data_show has cyclomatic complexity 26 (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.
  • craft_anything_engine::tools::browser_tools::script_check::selector_problem (cyclomatic 25) crates/engine/src/tools/browser_tools/script_check.rs:84 — craft_anything_engine::tools::browser_tools::script_check::selector_problem 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.
  • craft_anything_engine::tools::install_tools::app_folder_explain (cyclomatic 25) crates/engine/src/tools/install_tools.rs:825 — craft_anything_engine::tools::install_tools::app_folder_explain has cyclomatic complexity 25 (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.
  • craft_anything_engine::tools::process_tools::runtime_walkthrough_record (cyclomatic 25) crates/engine/src/tools/process_tools.rs:304 — craft_anything_engine::tools::process_tools::runtime_walkthrough_record 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.
  • craft_anything_engine::tools::report_tools::render_html (cyclomatic 25) crates/engine/src/tools/report_tools.rs:390 — craft_anything_engine::tools::report_tools::render_html has cyclomatic complexity 25 (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.
  • craft_anything_engine::tools::android_tools::android_package_show (cyclomatic 22) crates/engine/src/tools/android_tools.rs:390 — craft_anything_engine::tools::android_tools::android_package_show has cyclomatic complexity 22 (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.
  • craft_anything_engine::tools::artifact_tools::walk_dir (cyclomatic 22) crates/engine/src/tools/artifact_tools.rs:136 — craft_anything_engine::tools::artifact_tools::walk_dir 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.
  • craft_anything_engine::tools::investigation_tools::render (cyclomatic 22) crates/engine/src/tools/investigation_tools.rs:321 — craft_anything_engine::tools::investigation_tools::render 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.
  • craft_anything_engine::tools::android_tools::android_resources_read (cyclomatic 21) crates/engine/src/tools/android_tools.rs:1095 — craft_anything_engine::tools::android_tools::android_resources_read has cyclomatic complexity 21 (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.
  • craft_anything_engine::tools::managed_tools::managed_native_calls_verify (cyclomatic 21) crates/engine/src/tools/managed_tools.rs:649 — craft_anything_engine::tools::managed_tools::managed_native_calls_verify 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.
  • craft_anything_engine::tools::android_tools::flutter::android_flutter_identify (cyclomatic 20) crates/engine/src/tools/android_tools/flutter.rs:125 — craft_anything_engine::tools::android_tools::flutter::android_flutter_identify 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.
  • craft_anything_engine::tools::apple_tools::check_hashes (cyclomatic 19) crates/engine/src/tools/apple_tools.rs:500 — craft_anything_engine::tools::apple_tools::check_hashes has cyclomatic complexity 19 (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.
  • craft_anything_engine::tools::game_archive_tools::game_archives_list (cyclomatic 19) crates/engine/src/tools/game_archive_tools.rs:1093 — craft_anything_engine::tools::game_archive_tools::game_archives_list 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.
  • craft_anything_engine::tools::program_facts_tools::app_builds_line_up (cyclomatic 19) crates/engine/src/tools/program_facts_tools.rs:759 — craft_anything_engine::tools::program_facts_tools::app_builds_line_up 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.
  • craft_anything_engine::tools::web_tools::js_sources_restore (cyclomatic 19) crates/engine/src/tools/web_tools.rs:441 — craft_anything_engine::tools::web_tools::js_sources_restore 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.
  • craft_anything_engine::tools::apple_tools::apple_nib_decode (cyclomatic 18) crates/engine/src/tools/apple_tools.rs:781 — craft_anything_engine::tools::apple_tools::apple_nib_decode 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.
  • craft_anything_engine::tools::apple_tools::apple_dylibs_resolve (cyclomatic 18) crates/engine/src/tools/apple_tools.rs:1264 — craft_anything_engine::tools::apple_tools::apple_dylibs_resolve has cyclomatic complexity 18 (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.
  • + 10 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×35
  • Hotspot: crates/ui-egui/src/lib.rs crates/ui-egui/src/lib.rs:1384 — crates/ui-egui/src/lib.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in CraftApp::handle_done at line 1384. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ui-egui/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/ai/src/rebuild/mod.rs crates/ai/src/rebuild/mod.rs:618 — crates/ai/src/rebuild/mod.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in Worker::run at line 618. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ai/src/rebuild/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/ui-egui/src/settings_ui.rs crates/ui-egui/src/settings_ui.rs:320 — crates/ui-egui/src/settings_ui.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in craft_anything_ui_egui::settings_ui::ai at line 320. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ui-egui/src/settings_ui.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/ai/src/cli_agents/mod.rs crates/ai/src/cli_agents/mod.rs:747 — crates/ai/src/cli_agents/mod.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in craft_anything_ai::cli_agents::run_cli at line 747. 1 of those changes was a fix/bug commit, and the other 30 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ai/src/cli_agents/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/ui-egui/src/project.rs crates/ui-egui/src/project.rs:1735 — crates/ui-egui/src/project.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in craft_anything_ui_egui::project::composer at line 1735. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ui-egui/src/project.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/ai/src/cli_agents/adapters.rs crates/ai/src/cli_agents/adapters.rs:409 — crates/ai/src/cli_agents/adapters.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ClaudeCode::parse at line 409. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ai/src/cli_agents/adapters.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: apps/craft-anything-cli/src/ai_cmd.rs apps/craft-anything-cli/src/ai_cmd.rs:204 — apps/craft-anything-cli/src/ai_cmd.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in craft_anything_cli::ai_cmd::ai at line 204. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- apps/craft-anything-cli/src/ai_cmd.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/formats/src/pcap.rs crates/formats/src/pcap.rs:236 — crates/formats/src/pcap.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in Capture::next_ng at line 236. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/formats/src/pcap.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/platform/src/capture.rs crates/platform/src/capture.rs:846 — crates/platform/src/capture.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in craft_anything_platform::capture::unix::capture at line 846. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/platform/src/capture.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/disasm/src/decode.rs crates/disasm/src/decode.rs:841 — crates/disasm/src/decode.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in craft_anything_disasm::decode::decode_a32 at line 841. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/disasm/src/decode.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/ai/src/openai.rs crates/ai/src/openai.rs:326 — crates/ai/src/openai.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ChatStream::apply at line 326. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ai/src/openai.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/ui-egui/src/chat.rs crates/ui-egui/src/chat.rs:432 — crates/ui-egui/src/chat.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in craft_anything_ui_egui::chat::item_ui at line 432. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ui-egui/src/chat.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/engine/src/tools/artifact_tools.rs crates/engine/src/tools/artifact_tools.rs:634 — crates/engine/src/tools/artifact_tools.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in craft_anything_engine::tools::artifact_tools::core_archive_extract at line 634. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/engine/src/tools/artifact_tools.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/ai/src/rebuild/feed.rs crates/ai/src/rebuild/feed.rs:10 — crates/ai/src/rebuild/feed.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in craft_anything_ai::rebuild::feed::apply at line 10. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ai/src/rebuild/feed.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/disasm/src/program.rs crates/disasm/src/program.rs:788 — crates/disasm/src/program.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in craft_anything_disasm::program::scan_function at line 788. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/disasm/src/program.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/formats/src/zip.rs crates/formats/src/zip.rs:96 — crates/formats/src/zip.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in craft_anything_formats::zip::parse at line 96. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/formats/src/zip.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/ai/src/agent.rs crates/ai/src/agent.rs:349 — crates/ai/src/agent.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AgentLoop::handle_turn at line 349. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ai/src/agent.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/ui-egui/src/builders.rs crates/ui-egui/src/builders.rs:22 — crates/ui-egui/src/builders.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in craft_anything_ui_egui::builders::agent_model_picker at line 22. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ui-egui/src/builders.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/formats/src/dotnet/csharp.rs crates/formats/src/dotnet/csharp.rs:693 — crates/formats/src/dotnet/csharp.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in Scanner::run at line 693. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/formats/src/dotnet/csharp.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: apps/craft-anything-cli/src/rebuild_cmd.rs apps/craft-anything-cli/src/rebuild_cmd.rs:96 — apps/craft-anything-cli/src/rebuild_cmd.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in craft_anything_cli::rebuild_cmd::run at line 96. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- apps/craft-anything-cli/src/rebuild_cmd.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/analysis/src/standin.rs crates/analysis/src/standin.rs:774 — crates/analysis/src/standin.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in craft_anything_analysis::standin::build at line 774. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/analysis/src/standin.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/ui-egui/src/make.rs crates/ui-egui/src/make.rs:81 — crates/ui-egui/src/make.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in craft_anything_ui_egui::make::hero at line 81. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ui-egui/src/make.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/ui-egui/src/prompt_box.rs crates/ui-egui/src/prompt_box.rs:134 — crates/ui-egui/src/prompt_box.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in craft_anything_ui_egui::prompt_box::show at line 134. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/ui-egui/src/prompt_box.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/setup/src/doctor.rs crates/setup/src/doctor.rs:68 — crates/setup/src/doctor.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in craft_anything_setup::doctor::doctor at line 68. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/setup/src/doctor.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/disasm/src/dataflow.rs crates/disasm/src/dataflow.rs:57 — crates/disasm/src/dataflow.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in craft_anything_disasm::dataflow::def_use at line 57. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 00:59:53 +08:00' --until='2026-11-07 00:59:53 +08:00' --full-history --no-merges -- crates/disasm/src/dataflow.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.
  • + 10 more in this group — see findings.md.
D1 · Cyclomatic Complexity · craft_anything_ui_egui · ×24
  • craft_anything_ui_egui::settings_ui::ai (cyclomatic 107) crates/ui-egui/src/settings_ui.rs:320 — craft_anything_ui_egui::settings_ui::ai has cyclomatic complexity 107 (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.
  • craft_anything_ui_egui::engine_ui::modal (cyclomatic 38) crates/ui-egui/src/engine_ui.rs:800 — craft_anything_ui_egui::engine_ui::modal has cyclomatic complexity 38 (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.
  • craft_anything_ui_egui::prompt_box::show (cyclomatic 32) crates/ui-egui/src/prompt_box.rs:134 — craft_anything_ui_egui::prompt_box::show 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.
  • craft_anything_ui_egui::home::modals (cyclomatic 31) crates/ui-egui/src/home.rs:70 — craft_anything_ui_egui::home::modals has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • craft_anything_ui_egui::titlebar::show (cyclomatic 30) crates/ui-egui/src/titlebar.rs:130 — craft_anything_ui_egui::titlebar::show has cyclomatic complexity 30 (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.
  • craft_anything_ui_egui::project::steps (cyclomatic 29) crates/ui-egui/src/project.rs:1059 — craft_anything_ui_egui::project::steps 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.
  • craft_anything_ui_egui::project::composer (cyclomatic 27) crates/ui-egui/src/project.rs:1735 — craft_anything_ui_egui::project::composer 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.
  • craft_anything_ui_egui::chat::item_ui (cyclomatic 26) crates/ui-egui/src/chat.rs:432 — craft_anything_ui_egui::chat::item_ui 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.
  • craft_anything_ui_egui::palette::show (cyclomatic 26) crates/ui-egui/src/palette.rs:65 — craft_anything_ui_egui::palette::show 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.
  • craft_anything_ui_egui::engine_ui::ghidra_modal (cyclomatic 24) crates/ui-egui/src/engine_ui.rs:204 — craft_anything_ui_egui::engine_ui::ghidra_modal has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • craft_anything_ui_egui::make::hero (cyclomatic 23) crates/ui-egui/src/make.rs:81 — craft_anything_ui_egui::make::hero 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.
  • craft_anything_ui_egui::project::draw_items (cyclomatic 22) crates/ui-egui/src/project.rs:1352 — craft_anything_ui_egui::project::draw_items 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.
  • craft_anything_ui_egui::chat::paragraph (cyclomatic 20) crates/ui-egui/src/chat.rs:610 — craft_anything_ui_egui::chat::paragraph 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.
  • craft_anything_ui_egui::settings_ui::show (cyclomatic 20) crates/ui-egui/src/settings_ui.rs:14 — craft_anything_ui_egui::settings_ui::show 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.
  • craft_anything_ui_egui::chat::apply_event (cyclomatic 19) crates/ui-egui/src/chat.rs:14 — craft_anything_ui_egui::chat::apply_event 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.
  • craft_anything_ui_egui::report::markdown (cyclomatic 19) crates/ui-egui/src/report.rs:25 — craft_anything_ui_egui::report::markdown has cyclomatic complexity 19 (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.
  • craft_anything_ui_egui::workbench::rail_list (cyclomatic 19) crates/ui-egui/src/workbench.rs:191 — craft_anything_ui_egui::workbench::rail_list 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.
  • craft_anything_ui_egui::builders::agent_model_picker (cyclomatic 18) crates/ui-egui/src/builders.rs:22 — craft_anything_ui_egui::builders::agent_model_picker has cyclomatic complexity 18 (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.
  • craft_anything_ui_egui::make::choose_target (cyclomatic 18) crates/ui-egui/src/make.rs:314 — craft_anything_ui_egui::make::choose_target 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.
  • craft_anything_ui_egui::menu::update (cyclomatic 18) crates/ui-egui/src/menu.rs:160 — craft_anything_ui_egui::menu::update has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • craft_anything_ui_egui::project::ask_card (cyclomatic 18) crates/ui-egui/src/project.rs:1545 — craft_anything_ui_egui::project::ask_card has cyclomatic complexity 18 (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.
  • craft_anything_ui_egui::settings_ui::plugins (cyclomatic 18) crates/ui-egui/src/settings_ui.rs:845 — craft_anything_ui_egui::settings_ui::plugins 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.
  • craft_anything_ui_egui::workbench::hex_view (cyclomatic 17) crates/ui-egui/src/workbench.rs:622 — craft_anything_ui_egui::workbench::hex_view 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.
  • craft_anything_ui_egui::sidebar::show (cyclomatic 16) crates/ui-egui/src/sidebar.rs:30 — craft_anything_ui_egui::sidebar::show has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×23
  • Duplicated block (6 lines × 2) crates/engine/src/tools/interaction_tools.rs:238 — crates/engine/src/tools/interaction_tools.rs:238-243 | crates/engine/src/tools/interaction_tools.rs:261-266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/engine/src/tools/managed_tools.rs:442 — crates/engine/src/tools/managed_tools.rs:442-447 | crates/engine/src/tools/managed_tools.rs:449-454 — 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/formats/src/asar.rs:215 — crates/formats/src/asar.rs:215-220 | crates/testkit/src/electron.rs:182-187 — 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) crates/formats/src/evm.rs:619 — crates/formats/src/evm.rs:619-624 | crates/formats/src/evm.rs:647-652 — 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/formats/src/pe.rs:272 — crates/formats/src/pe.rs:272-277 | crates/formats/src/pe.rs:321-326 — 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/platform/src/process.rs:250 — crates/platform/src/process.rs:250-255 | crates/platform/src/process.rs:945-950 — 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/testkit/src/android.rs:923 — crates/testkit/src/android.rs:923-928 | crates/testkit/src/crypto.rs:236-241 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/testkit/src/apple.rs:249 — crates/testkit/src/apple.rs:249-254 | crates/testkit/src/apple.rs:257-262 — 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/testkit/src/firmware.rs:445 — crates/testkit/src/firmware.rs:445-450 | crates/testkit/src/firmware.rs:585-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 (6 lines × 2) crates/testkit/src/formats.rs:170 — crates/testkit/src/formats.rs:170-175 | crates/testkit/src/formats.rs:186-191 — 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/testkit/src/java.rs:207 — crates/testkit/src/java.rs:207-212 | crates/testkit/src/java.rs:299-304 — 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/testkit/src/java.rs:211 — crates/testkit/src/java.rs:211-216 | crates/testkit/src/java.rs:236-241 — 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/ui-egui/src/theme.rs:125 — crates/ui-egui/src/theme.rs:125-130 | crates/ui-egui/src/theme.rs:157-162 — 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/ai/src/rebuild/tools.rs:250 — crates/ai/src/rebuild/tools.rs:250-255 | crates/engine/src/tools/pin_tools.rs:156-161 — 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) crates/formats/src/java_ops.rs:464 — crates/formats/src/java_ops.rs:464-469 | crates/formats/src/java_ops.rs:489-494 — 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) apps/craft-anything-cli/src/ai_cmd.rs:355 — apps/craft-anything-cli/src/ai_cmd.rs:355-360 | apps/craft-anything-cli/src/ai_cmd.rs:362-367 — 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) apps/craft-anything-cli/src/output.rs:100 — apps/craft-anything-cli/src/output.rs:100-105 | apps/craft-anything-cli/src/output.rs:127-132 — 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/formats/src/plist.rs:323 — crates/formats/src/plist.rs:323-328 | crates/formats/src/plist.rs:337-342 — 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/testkit/src/apple.rs:774 — crates/testkit/src/apple.rs:774-779 | crates/testkit/src/apple.rs:784-789 — 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/disasm/src/dataflow.rs:60 — crates/disasm/src/dataflow.rs:60-65 | crates/disasm/src/pseudo.rs:1014-1019 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/engine/src/journal.rs:30 — crates/engine/src/journal.rs:30-35 | crates/formats/src/pcap.rs:1450-1455 — 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) crates/engine/src/tools/gdb_tools.rs:289 — crates/engine/src/tools/gdb_tools.rs:289-294 | crates/engine/src/tools/rizin_session_tools.rs:297-302 — before extracting anything, compare `crates/engine/src/tools/gdb_tools.rs` and `crates/engine/src/tools/rizin_session_tools.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 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.
  • Duplicated block (6 lines × 2) crates/formats/src/pcap.rs:1100 — crates/formats/src/pcap.rs:1100-1105 | crates/formats/src/pcap.rs:1128-1133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · craft_anything_analysis · ×20
  • craft_anything_analysis::js_app::analyze_application (cyclomatic 158) crates/analysis/src/js_app.rs:361 — craft_anything_analysis::js_app::analyze_application has cyclomatic complexity 158 (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.
  • craft_anything_analysis::js_inventory::sniff_kind (cyclomatic 45) crates/analysis/src/js_inventory.rs:88 — craft_anything_analysis::js_inventory::sniff_kind has cyclomatic complexity 45 (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.
  • craft_anything_analysis::native::triage (cyclomatic 36) crates/analysis/src/native.rs:54 — craft_anything_analysis::native::triage has cyclomatic complexity 36 (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.
  • craft_anything_analysis::standin::build (cyclomatic 34) crates/analysis/src/standin.rs:774 — craft_anything_analysis::standin::build has cyclomatic complexity 34 (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.
  • craft_anything_analysis::js_ledger::build_ledger (cyclomatic 29) crates/analysis/src/js_ledger.rs:220 — craft_anything_analysis::js_ledger::build_ledger 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.
  • craft_anything_analysis::js_inventory::path_role (cyclomatic 28) crates/analysis/src/js_inventory.rs:174 — craft_anything_analysis::js_inventory::path_role has cyclomatic complexity 28 (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.
  • craft_anything_analysis::js_source::diff_source_and_bundle (cyclomatic 27) crates/analysis/src/js_source.rs:318 — craft_anything_analysis::js_source::diff_source_and_bundle 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.
  • craft_anything_analysis::js_trace::trace_semantics (cyclomatic 25) crates/analysis/src/js_trace.rs:230 — craft_anything_analysis::js_trace::trace_semantics 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.
  • craft_anything_analysis::native::ui_action (cyclomatic 25) crates/analysis/src/native.rs:960 — craft_anything_analysis::native::ui_action 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.
  • craft_anything_analysis::standin::answer (cyclomatic 23) crates/analysis/src/standin.rs:1183 — craft_anything_analysis::standin::answer has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • craft_anything_analysis::native::call_path (cyclomatic 22) crates/analysis/src/native.rs:590 — craft_anything_analysis::native::call_path 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.
  • craft_anything_analysis::js_ledger::candidate_expectations (cyclomatic 21) crates/analysis/src/js_ledger.rs:106 — craft_anything_analysis::js_ledger::candidate_expectations 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.
  • craft_anything_analysis::js_trace::find_seeds (cyclomatic 21) crates/analysis/src/js_trace.rs:45 — craft_anything_analysis::js_trace::find_seeds has cyclomatic complexity 21 (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.
  • craft_anything_analysis::java_decompile::decompile_class (cyclomatic 20) crates/analysis/src/java_decompile.rs:769 — craft_anything_analysis::java_decompile::decompile_class has cyclomatic complexity 20 (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.
  • craft_anything_analysis::js_source::glob_match (cyclomatic 20) crates/analysis/src/js_source.rs:93 — craft_anything_analysis::js_source::glob_match has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • craft_anything_analysis::js_projection::project_apple (cyclomatic 19) crates/analysis/src/js_projection.rs:154 — craft_anything_analysis::js_projection::project_apple 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.
  • craft_anything_analysis::standin::merge_siblings (cyclomatic 18) crates/analysis/src/standin.rs:709 — craft_anything_analysis::standin::merge_siblings 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.
  • craft_anything_analysis::standin::make_sample (cyclomatic 18) crates/analysis/src/standin.rs:976 — craft_anything_analysis::standin::make_sample 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.
  • craft_anything_analysis::function_match::print_function (cyclomatic 17) crates/analysis/src/function_match.rs:222 — craft_anything_analysis::function_match::print_function 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.
  • craft_anything_analysis::js_source::tokenize_glob (cyclomatic 16) crates/analysis/src/js_source.rs:26 — craft_anything_analysis::js_source::tokenize_glob 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. This is NOT this file's highest cyclomatic complexity: craft_anything_analysis::js_source::language (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D2 · Cognitive Complexity · craft_anything_ai · ×17
  • craft_anything_ai::cli_agents::run_cli (cognitive 55) crates/ai/src/cli_agents/mod.rs:747 — craft_anything_ai::cli_agents::run_cli has cognitive complexity 55 (threshold 15). Drivers by points: if/else 31 (36 pts), match/switch 7 (11 pts), boolean chains 6, loops 2 (nesting depth added 9). 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.
  • craft_anything_ai::rebuild::feed::apply (cognitive 45) crates/ai/src/rebuild/feed.rs:10 — craft_anything_ai::rebuild::feed::apply has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 5 (11 pts), boolean chains 5, loops 2 (5 pts) (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.
  • craft_anything_ai::openai::messages_json (cognitive 36) crates/ai/src/openai.rs:245 — craft_anything_ai::openai::messages_json has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 3 (6 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • craft_anything_ai::rebuild::kinds::mechanics::literals (cognitive 32) crates/ai/src/rebuild/kinds/mechanics.rs:156 — craft_anything_ai::rebuild::kinds::mechanics::literals has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 8, loops 3 (7 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.
  • craft_anything_ai::http::parse_sse (cognitive 29) crates/ai/src/http.rs:162 — craft_anything_ai::http::parse_sse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 2 (4 pts), boolean chains 2, loops 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.
  • craft_anything_ai::rebuild::locate::inventory (cognitive 29) crates/ai/src/rebuild/locate.rs:94 — craft_anything_ai::rebuild::locate::inventory has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 4 (6 pts), boolean chains 2 (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.
  • craft_anything_ai::rebuild::check::build_check (cognitive 27) crates/ai/src/rebuild/check.rs:106 — craft_anything_ai::rebuild::check::build_check has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 4, match/switch 2 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • craft_anything_ai::rebuild::kinds::plugin_check::build_json (cognitive 27) crates/ai/src/rebuild/kinds/plugin_check.rs:67 — craft_anything_ai::rebuild::kinds::plugin_check::build_json has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ai::rebuild::kinds::website::block_diffs (cognitive 26) crates/ai/src/rebuild/kinds/website.rs:589 — craft_anything_ai::rebuild::kinds::website::block_diffs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, loops 2 (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.
  • craft_anything_ai::openai::fenced_calls (cognitive 21) crates/ai/src/openai.rs:548 — craft_anything_ai::openai::fenced_calls has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 2 (3 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.
  • craft_anything_ai::rebuild::kinds::mechanics::walk (cognitive 21) crates/ai/src/rebuild/kinds/mechanics.rs:124 — craft_anything_ai::rebuild::kinds::mechanics::walk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, 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.
  • craft_anything_ai::rebuild::kinds::website::design_notes (cognitive 21) crates/ai/src/rebuild/kinds/website.rs:537 — craft_anything_ai::rebuild::kinds::website::design_notes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (5 pts), boolean chains 3 (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.
  • craft_anything_ai::rebuild::question::collect (cognitive 20) crates/ai/src/rebuild/question.rs:174 — craft_anything_ai::rebuild::question::collect has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (7 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ai::rebuild::question::recent_files (cognitive 19) crates/ai/src/rebuild/question.rs:240 — craft_anything_ai::rebuild::question::recent_files has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 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.
  • craft_anything_ai::ssh::hosts_from_file (cognitive 19) crates/ai/src/ssh.rs:110 — craft_anything_ai::ssh::hosts_from_file has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (6 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.
  • craft_anything_ai::rebuild::kinds::website::pick_routes (cognitive 18) crates/ai/src/rebuild/kinds/website.rs:73 — craft_anything_ai::rebuild::kinds::website::pick_routes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_ai::cli_agents::adapters::claude_handoff (cognitive 17) crates/ai/src/cli_agents/adapters.rs:658 — craft_anything_ai::cli_agents::adapters::claude_handoff has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×16
  • Duplicated block (7 lines × 2) crates/disasm/src/dataflow.rs:83 — crates/disasm/src/dataflow.rs:83-89 | crates/disasm/src/pseudo.rs:1029-1035 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/engine/src/tools/adb_tools.rs:1023 — crates/engine/src/tools/adb_tools.rs:1023-1029 | crates/engine/src/tools/adb_tools.rs:1077-1083 — 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/engine/src/tools/android_tools.rs:1084 — crates/engine/src/tools/android_tools.rs:1084-1090 | crates/engine/src/tools/java_tools.rs:758-764 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/engine/src/tools/artifact_tools.rs:600 — crates/engine/src/tools/artifact_tools.rs:600-606 | crates/engine/src/tools/packed_tools.rs:242-249 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/engine/src/tools/packed_tools.rs:136 — crates/engine/src/tools/packed_tools.rs:136-142 | crates/engine/src/tools/sbpf_tools.rs:464-471 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/engine/src/tools/packed_tools.rs:138 — crates/engine/src/tools/packed_tools.rs:138-144 | crates/engine/src/tools/python_tools.rs:102-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/engine/src/tools/web_common.rs:204 — crates/engine/src/tools/web_common.rs:204-210 | crates/engine/src/tools/web_common.rs:246-252 — 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/engines/src/gdb.rs:253 — crates/engines/src/gdb.rs:253-259 | crates/engines/src/rizin.rs:128-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/formats/src/pcap.rs:649 — crates/formats/src/pcap.rs:649-655 | crates/formats/src/pcap.rs:670-676 — 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/testkit/src/apple.rs:389 — crates/testkit/src/apple.rs:389-395 | crates/testkit/src/apple.rs:399-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/testkit/src/firmware.rs:514 — crates/testkit/src/firmware.rs:514-520 | crates/testkit/src/firmware.rs:528-534 — 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/testkit/src/lib.rs:301 — crates/testkit/src/lib.rs:301-307 | crates/testkit/src/sbpf.rs:91-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/ui-egui/src/settings_ui.rs:884 — crates/ui-egui/src/settings_ui.rs:884-890 | crates/ui-egui/src/settings_ui.rs:905-911 — 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/engine/src/tools/gdb_tools.rs:159 — crates/engine/src/tools/gdb_tools.rs:159-165 | crates/engine/src/tools/rizin_session_tools.rs:176-182 — before extracting anything, compare `crates/engine/src/tools/gdb_tools.rs` and `crates/engine/src/tools/rizin_session_tools.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 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.
  • Duplicated block (7 lines × 2) crates/formats/src/swift_demangle.rs:895 — crates/formats/src/swift_demangle.rs:895-901 | crates/formats/src/swift_demangle.rs:918-924 — 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/engine/src/tools/adb_tools.rs:642 — crates/engine/src/tools/adb_tools.rs:642-648 | crates/engine/src/tools/android_tools.rs:1229-1235 — 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.
D2 · Cognitive Complexity · craft_anything_disasm · ×15
  • craft_anything_disasm::dataflow::def_use (cognitive 143) crates/disasm/src/dataflow.rs:57 — craft_anything_disasm::dataflow::def_use has cognitive complexity 143 (threshold 15). Drivers by points: if/else 27 (85 pts), loops 20 (42 pts), boolean chains 9, match/switch 4 (7 pts) (nesting depth added 83). 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.
  • craft_anything_disasm::program::scan_function (cognitive 120) crates/disasm/src/program.rs:788 — craft_anything_disasm::program::scan_function has cognitive complexity 120 (threshold 15). Drivers by points: if/else 30 (95 pts), boolean chains 11, loops 4 (11 pts), match/switch 1 (3 pts) (nesting depth added 74). 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.
  • craft_anything_disasm::decode::decode_a64 (cognitive 107) crates/disasm/src/decode.rs:611 — craft_anything_disasm::decode::decode_a64 has cognitive complexity 107 (threshold 15). Drivers by points: if/else 42 (77 pts), loops 6 (13 pts), boolean chains 10, match/switch 5 (7 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.
  • craft_anything_disasm::sbpf::analyze (cognitive 101) crates/disasm/src/sbpf.rs:458 — craft_anything_disasm::sbpf::analyze has cognitive complexity 101 (threshold 15). Drivers by points: if/else 20 (73 pts), loops 8 (13 pts), match/switch 3 (9 pts), boolean chains 6 (nesting depth added 64). 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.
  • craft_anything_disasm::pseudo::lift (cognitive 78) crates/disasm/src/pseudo.rs:1011 — craft_anything_disasm::pseudo::lift has cognitive complexity 78 (threshold 15). Drivers by points: if/else 27 (49 pts), loops 10 (19 pts), boolean chains 9, match/switch 1 (nesting depth added 31). 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.
  • craft_anything_disasm::decode::decode_a32 (cognitive 71) crates/disasm/src/decode.rs:841 — craft_anything_disasm::decode::decode_a32 has cognitive complexity 71 (threshold 15). Drivers by points: if/else 30 (46 pts), boolean chains 10, match/switch 6 (10 pts), loops 3 (5 pts) (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.
  • craft_anything_disasm::decode::decode_x86 (cognitive 68) crates/disasm/src/decode.rs:339 — craft_anything_disasm::decode::decode_x86 has cognitive complexity 68 (threshold 15). Drivers by points: if/else 26 (43 pts), match/switch 9 (17 pts), boolean chains 6, loops 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_disasm::sbpf::decode_one (cognitive 55) crates/disasm/src/sbpf.rs:186 — craft_anything_disasm::sbpf::decode_one has cognitive complexity 55 (threshold 15). Drivers by points: if/else 22 (42 pts), match/switch 6 (13 pts) (nesting depth added 27). 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.
  • craft_anything_disasm::program::pointer_scan (cognitive 34) crates/disasm/src/program.rs:1179 — craft_anything_disasm::program::pointer_scan has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_disasm::program::prologue_scan (cognitive 32) crates/disasm/src/program.rs:1105 — craft_anything_disasm::program::prologue_scan has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 11, match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_disasm::pseudo::build_graph (cognitive 32) crates/disasm/src/pseudo.rs:668 — craft_anything_disasm::pseudo::build_graph has cognitive complexity 32 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 4 (13 pts), boolean chains 1 (nesting depth added 19). 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.
  • craft_anything_disasm::program::scan_plt (cognitive 30) crates/disasm/src/program.rs:755 — craft_anything_disasm::program::scan_plt has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 3, loops 2 (3 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.
  • craft_anything_disasm::pseudo::dominators (cognitive 30) crates/disasm/src/pseudo.rs:593 — craft_anything_disasm::pseudo::dominators has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (11 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.
  • craft_anything_disasm::pseudo::simplify (cognitive 25) crates/disasm/src/pseudo.rs:962 — craft_anything_disasm::pseudo::simplify has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (4 pts), boolean chains 3 (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.
  • craft_anything_disasm::program::build_function (cognitive 22) crates/disasm/src/program.rs:1019 — craft_anything_disasm::program::build_function has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, loops 1, 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.
D1 · Cyclomatic Complexity · craft_anything_disasm · ×11
  • craft_anything_disasm::decode::decode_a64 (cyclomatic 102) crates/disasm/src/decode.rs:611 — craft_anything_disasm::decode::decode_a64 has cyclomatic complexity 102 (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.
  • craft_anything_disasm::decode::decode_a32 (cyclomatic 78) crates/disasm/src/decode.rs:841 — craft_anything_disasm::decode::decode_a32 has cyclomatic complexity 78 (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.
  • craft_anything_disasm::dataflow::def_use (cyclomatic 68) crates/disasm/src/dataflow.rs:57 — craft_anything_disasm::dataflow::def_use 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.
  • craft_anything_disasm::decode::decode_x86 (cyclomatic 52) crates/disasm/src/decode.rs:339 — craft_anything_disasm::decode::decode_x86 has cyclomatic complexity 52 (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.
  • craft_anything_disasm::pseudo::lift (cyclomatic 47) crates/disasm/src/pseudo.rs:1011 — craft_anything_disasm::pseudo::lift 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.
  • craft_anything_disasm::program::scan_function (cyclomatic 46) crates/disasm/src/program.rs:788 — craft_anything_disasm::program::scan_function 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.
  • craft_anything_disasm::sbpf::analyze (cyclomatic 43) crates/disasm/src/sbpf.rs:458 — craft_anything_disasm::sbpf::analyze has cyclomatic complexity 43 (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.
  • craft_anything_disasm::sbpf::decode_one (cyclomatic 29) crates/disasm/src/sbpf.rs:186 — craft_anything_disasm::sbpf::decode_one 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.
  • craft_anything_disasm::program::prologue_scan (cyclomatic 25) crates/disasm/src/program.rs:1105 — craft_anything_disasm::program::prologue_scan has cyclomatic complexity 25 (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.
  • craft_anything_disasm::program::build_function (cyclomatic 17) crates/disasm/src/program.rs:1019 — craft_anything_disasm::program::build_function 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.
  • craft_anything_disasm::program::pointer_scan (cyclomatic 16) crates/disasm/src/program.rs:1179 — craft_anything_disasm::program::pointer_scan 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.
D2 · Cognitive Complexity · Scanner · ×11
  • Scanner::run (cognitive 103) crates/formats/src/dotnet/csharp.rs:693 — Scanner::run has cognitive complexity 103 (threshold 15). Drivers by points: if/else 30 (81 pts), loops 4 (13 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 61). 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.
  • Scanner::member (cognitive 88) crates/formats/src/dotnet/csharp.rs:529 — Scanner::member has cognitive complexity 88 (threshold 15). Drivers by points: if/else 42 (70 pts), loops 4 (7 pts), boolean chains 6, match/switch 2 (5 pts) (nesting depth added 34). 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.
  • Scanner::type_decl (cognitive 43) crates/formats/src/dotnet/csharp.rs:458 — Scanner::type_decl has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 7, loops 2 (6 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.
  • Scanner::elf (cognitive 37) crates/formats/src/firmware.rs:1355 — Scanner::elf has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 2, loops 2, match/switch 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.
  • Scanner::macho (cognitive 26) crates/formats/src/firmware.rs:1469 — Scanner::macho has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Scanner::squashfs (cognitive 22) crates/formats/src/firmware.rs:846 — Scanner::squashfs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 2, 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.
  • Scanner::jffs2 (cognitive 18) crates/formats/src/firmware.rs:967 — Scanner::jffs2 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Scanner::lz4 (cognitive 17) crates/formats/src/firmware.rs:631 — Scanner::lz4 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Scanner::zip (cognitive 17) crates/formats/src/firmware.rs:682 — Scanner::zip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1, 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.
  • Scanner::ubi (cognitive 17) crates/formats/src/firmware.rs:1022 — Scanner::ubi has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (3 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.
  • Scanner::fat (cognitive 16) crates/formats/src/firmware.rs:1148 — Scanner::fat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · craft_anything_js · ×11
  • craft_anything_js::api_ops::read_document (cognitive 103) crates/js/src/api_ops.rs:47 — craft_anything_js::api_ops::read_document has cognitive complexity 103 (threshold 15). Drivers by points: if/else 24 (62 pts), loops 8 (22 pts), boolean chains 10, match/switch 3 (9 pts) (nesting depth added 58). 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.
  • craft_anything_js::lex::scan (cognitive 76) crates/js/src/lex.rs:50 — craft_anything_js::lex::scan has cognitive complexity 76 (threshold 15). Drivers by points: loops 10 (28 pts), if/else 15 (27 pts), boolean chains 13, match/switch 2 (8 pts) (nesting depth added 36). 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.
  • craft_anything_js::fallback::facts_from_tokens (cognitive 52) crates/js/src/fallback.rs:10 — craft_anything_js::fallback::facts_from_tokens has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (41 pts), boolean chains 5, match/switch 2 (5 pts), loops 1 (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.
  • craft_anything_js::html::attributes (cognitive 31) crates/js/src/html.rs:30 — craft_anything_js::html::attributes has cognitive complexity 31 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 3 (5 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 16). 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.
  • craft_anything_js::fallback::api_token (cognitive 27) crates/js/src/fallback.rs:102 — craft_anything_js::fallback::api_token has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_js::recover::rename_params (cognitive 27) crates/js/src/recover.rs:161 — craft_anything_js::recover::rename_params has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_js::html::scan_html (cognitive 24) crates/js/src/html.rs:140 — craft_anything_js::html::scan_html has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 10, 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.
  • craft_anything_js::facts::api::procedure_kind (cognitive 20) crates/js/src/facts/api.rs:383 — craft_anything_js::facts::api::procedure_kind has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (5 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.
  • craft_anything_js::vendor::banner_vendor (cognitive 19) crates/js/src/vendor.rs:6 — craft_anything_js::vendor::banner_vendor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_js::recover::recover_modules (cognitive 17) crates/js/src/recover.rs:268 — craft_anything_js::recover::recover_modules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_js::bundle::classify (cognitive 16) crates/js/src/bundle.rs:448 — craft_anything_js::bundle::classify has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. 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 · FactVisitor · ×10
  • FactVisitor::on_call (cognitive 116) crates/js/src/facts.rs:445 — FactVisitor::on_call has cognitive complexity 116 (threshold 15). Drivers by points: if/else 52 (73 pts), boolean chains 29, match/switch 5 (12 pts), loops 1 (2 pts) (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.
  • FactVisitor::visit_assignment_expression (cognitive 37) crates/js/src/facts.rs:1302 — FactVisitor::visit_assignment_expression has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 5 (13 pts), loops 1 (4 pts), boolean chains 3 (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.
  • FactVisitor::visit_variable_declarator (cognitive 35) crates/js/src/facts.rs:1234 — FactVisitor::visit_variable_declarator has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 3 (11 pts), boolean chains 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.
  • FactVisitor::read_router (cognitive 28) crates/js/src/facts/api.rs:295 — FactVisitor::read_router has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 5 (12 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FactVisitor::api_object (cognitive 25) crates/js/src/facts/api.rs:137 — FactVisitor::api_object has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 7 (16 pts), if/else 4 (5 pts), boolean chains 3, 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.
  • FactVisitor::visit_jsx_opening_element (cognitive 25) crates/js/src/facts.rs:1482 — FactVisitor::visit_jsx_opening_element has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FactVisitor::on_new (cognitive 24) crates/js/src/facts.rs:773 — FactVisitor::on_new has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, match/switch 2 (3 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.
  • FactVisitor::client_call (cognitive 20) crates/js/src/facts/api.rs:246 — FactVisitor::client_call has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), match/switch 4 (7 pts), boolean chains 2 (nesting depth added 4). 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.
  • FactVisitor::on_expose (cognitive 18) crates/js/src/facts.rs:730 — FactVisitor::on_expose has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), match/switch 2 (4 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.
  • FactVisitor::api_call (cognitive 16) crates/js/src/facts/api.rs:190 — FactVisitor::api_call has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 1 (3 pts) (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.
D3 · God Classes · MethodTooLong · ×10
  • MethodTooLong: D.operator crates/formats/src/swift_demangle.rs:586 — MethodTooLong — operator runs 314 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 214 over it, 3.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Program.analyze crates/disasm/src/program.rs:274 — MethodTooLong — analyze runs 195 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 95 over it, 1.95× 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: Worker.run crates/ai/src/rebuild/mod.rs:618 — MethodTooLong — run runs 192 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 92 over it, 1.92× 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: CraftApp.handle_done crates/ui-egui/src/lib.rs:1384 — MethodTooLong — handle_done runs 176 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 76 over it, 1.76× 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: FactVisitor.on_call crates/js/src/facts.rs:445 — MethodTooLong — on_call runs 169 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 69 over it, 1.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.
  • MethodTooLong: DexBuilder.build crates/testkit/src/android.rs:220 — MethodTooLong — build runs 165 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 65 over it, 1.65× 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: Sim.step crates/analysis/src/java_decompile.rs:146 — MethodTooLong — step runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Scanner.member crates/formats/src/dotnet/csharp.rs:529 — MethodTooLong — member 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.
  • MethodTooLong: Scanner.run crates/formats/src/dotnet/csharp.rs:693 — MethodTooLong — run runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AgentLoop.handle_turn crates/ai/src/agent.rs:349 — MethodTooLong — handle_turn runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D1 · Cyclomatic Complexity · craft_anything_js · ×9
  • craft_anything_js::api_ops::read_document (cyclomatic 54) crates/js/src/api_ops.rs:47 — craft_anything_js::api_ops::read_document has cyclomatic complexity 54 (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.
  • craft_anything_js::lex::scan (cyclomatic 47) crates/js/src/lex.rs:50 — craft_anything_js::lex::scan has cyclomatic complexity 47 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • craft_anything_js::fallback::facts_from_tokens (cyclomatic 27) crates/js/src/fallback.rs:10 — craft_anything_js::fallback::facts_from_tokens 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.
  • craft_anything_js::html::scan_html (cyclomatic 24) crates/js/src/html.rs:140 — craft_anything_js::html::scan_html has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • craft_anything_js::recover::rename_params (cyclomatic 22) crates/js/src/recover.rs:161 — craft_anything_js::recover::rename_params 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.
  • craft_anything_js::bundle::classify (cyclomatic 17) crates/js/src/bundle.rs:448 — craft_anything_js::bundle::classify 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.
  • craft_anything_js::fallback::api_token (cyclomatic 17) crates/js/src/fallback.rs:102 — craft_anything_js::fallback::api_token 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.
  • craft_anything_js::html::attributes (cyclomatic 17) crates/js/src/html.rs:30 — craft_anything_js::html::attributes has cyclomatic complexity 17 (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.
  • craft_anything_js::facts::api::procedure_kind (cyclomatic 16) crates/js/src/facts/api.rs:383 — craft_anything_js::facts::api::procedure_kind 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.
D2 · Cognitive Complexity · craft_anything_platform · ×9
  • craft_anything_platform::capture::unix::capture (cognitive 75) crates/platform/src/capture.rs:846 — craft_anything_platform::capture::unix::capture has cognitive complexity 75 (threshold 15). Drivers by points: if/else 27 (46 pts), loops 11 (14 pts), match/switch 6 (10 pts), boolean chains 5 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_platform::capture::snapshot (cognitive 37) crates/platform/src/capture.rs:689 — craft_anything_platform::capture::snapshot has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (8 pts), match/switch 2 (7 pts) (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.
  • craft_anything_platform::capture::effects (cognitive 24) crates/platform/src/capture.rs:778 — craft_anything_platform::capture::effects has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, loops 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_platform::standin_server::handle (cognitive 24) crates/platform/src/standin_server.rs:335 — craft_anything_platform::standin_server::handle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, match/switch 3 (4 pts), loops 2 (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.
  • craft_anything_platform::capture::console_text (cognitive 23) crates/platform/src/capture.rs:347 — craft_anything_platform::capture::console_text has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_platform::standin_server::parse_head (cognitive 22) crates/platform/src/standin_server.rs:208 — craft_anything_platform::standin_server::parse_head has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_platform::process::spawn_reader (cognitive 20) crates/platform/src/process.rs:700 — craft_anything_platform::process::spawn_reader has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_platform::which::which_in (cognitive 18) crates/platform/src/which.rs:218 — craft_anything_platform::which::which_in has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_platform::standin_server::write_response (cognitive 16) crates/platform/src/standin_server.rs:465 — craft_anything_platform::standin_server::write_response has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, loops 1 (nesting depth added 2). 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) crates/engine/src/tools/android_tools.rs:1246 — crates/engine/src/tools/android_tools.rs:1246-1253 | crates/engine/src/tools/packet_tools.rs:402-409 — 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) crates/engine/src/tools/browser_tools.rs:276 — crates/engine/src/tools/browser_tools.rs:276-283 | crates/engine/src/tools/electron_runtime_tools.rs:153-160 — 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) crates/engine/src/tools/gdb_tools.rs:268 — crates/engine/src/tools/gdb_tools.rs:268-275 | crates/engine/src/tools/rizin_session_tools.rs:276-283 — before extracting anything, compare `crates/engine/src/tools/gdb_tools.rs` and `crates/engine/src/tools/rizin_session_tools.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 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.
  • Duplicated block (8 lines × 2) crates/engine/src/tools/packet_tools.rs:250 — crates/engine/src/tools/packet_tools.rs:250-257 | crates/engine/src/tools/packet_tools.rs:600-607 — 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) crates/formats/src/go.rs:762 — crates/formats/src/go.rs:762-769 | crates/formats/src/go.rs:799-806 — 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) crates/platform/src/capture.rs:675 — crates/platform/src/capture.rs:675-682 | crates/platform/src/process.rs:686-693 — 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) crates/testkit/src/android.rs:421 — crates/testkit/src/android.rs:421-428 | crates/testkit/src/firmware.rs:19-26 — 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) crates/ai/src/agent.rs:447 — crates/ai/src/agent.rs:447-454 | crates/ai/src/agent.rs:485-492 — 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) crates/testkit/src/firmware.rs:265 — crates/testkit/src/firmware.rs:265-272 | crates/testkit/src/firmware.rs:274-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D2 · Cognitive Complexity · xtask · ×8
  • xtask::secrets::secrets (cognitive 39) xtask/src/secrets.rs:40 — xtask::secrets::secrets has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 6 (16 pts), boolean chains 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.
  • xtask::layers (cognitive 32) xtask/src/main.rs:178 — xtask::layers has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 7, loops 3 (4 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.
  • xtask::ui_has_no_side_effects (cognitive 26) xtask/src/main.rs:279 — xtask::ui_has_no_side_effects has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (7 pts), boolean chains 3 (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.
  • xtask::no_real_machine_sessions (cognitive 24) xtask/src/main.rs:407 — xtask::no_real_machine_sessions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 3 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • xtask::process_calls_only_in_platform (cognitive 22) xtask/src/main.rs:237 — xtask::process_calls_only_in_platform has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 8). Of this number, 13 points are the body's own statements and 9 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.
  • xtask::version (cognitive 20) xtask/src/main.rs:80 — xtask::version has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, loops 1, 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.
  • xtask::pending (cognitive 20) xtask/src/main.rs:440 — xtask::pending has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (6 pts), match/switch 1 (2 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.
  • xtask::i18n_coverage::check (cognitive 18) xtask/src/i18n_coverage.rs:69 — xtask::i18n_coverage::check has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (5 pts), boolean chains 2 (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.
D1 · Cyclomatic Complexity · craft_anything_cli · ×7
  • craft_anything_cli::ai_cmd::ai (cyclomatic 50) apps/craft-anything-cli/src/ai_cmd.rs:204 — craft_anything_cli::ai_cmd::ai has cyclomatic complexity 50 (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.
  • craft_anything_cli::tool_args::parse (cyclomatic 34) apps/craft-anything-cli/src/tool_args.rs:127 — craft_anything_cli::tool_args::parse has cyclomatic complexity 34 (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.
  • craft_anything_cli::ai_cmd::chat (cyclomatic 29) apps/craft-anything-cli/src/ai_cmd.rs:100 — craft_anything_cli::ai_cmd::chat 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.
  • craft_anything_cli::rebuild_cmd::run (cyclomatic 29) apps/craft-anything-cli/src/rebuild_cmd.rs:96 — craft_anything_cli::rebuild_cmd::run 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.
  • craft_anything_cli::tool (cyclomatic 23) apps/craft-anything-cli/src/main.rs:466 — craft_anything_cli::tool has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • craft_anything_cli::run (cyclomatic 19) apps/craft-anything-cli/src/main.rs:238 — craft_anything_cli::run has cyclomatic complexity 19 (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.
  • craft_anything_cli::setup_cmd::setup (cyclomatic 17) apps/craft-anything-cli/src/setup_cmd.rs:78 — craft_anything_cli::setup_cmd::setup 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.
D1 · Cyclomatic Complexity · craft_anything_ai · ×7
  • craft_anything_ai::cli_agents::run_cli (cyclomatic 48) crates/ai/src/cli_agents/mod.rs:747 — craft_anything_ai::cli_agents::run_cli has cyclomatic complexity 48 (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.
  • craft_anything_ai::rebuild::feed::apply (cyclomatic 34) crates/ai/src/rebuild/feed.rs:10 — craft_anything_ai::rebuild::feed::apply has cyclomatic complexity 34 (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.
  • craft_anything_ai::rebuild::check::build_check (cyclomatic 22) crates/ai/src/rebuild/check.rs:106 — craft_anything_ai::rebuild::check::build_check 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.
  • craft_anything_ai::rebuild::kinds::mechanics::literals (cyclomatic 19) crates/ai/src/rebuild/kinds/mechanics.rs:156 — craft_anything_ai::rebuild::kinds::mechanics::literals 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.
  • craft_anything_ai::rebuild::kinds::website::block_diffs (cyclomatic 17) crates/ai/src/rebuild/kinds/website.rs:589 — craft_anything_ai::rebuild::kinds::website::block_diffs 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.
  • craft_anything_ai::http::parse_sse (cyclomatic 16) crates/ai/src/http.rs:162 — craft_anything_ai::http::parse_sse 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.
  • craft_anything_ai::openai::messages_json (cyclomatic 16) crates/ai/src/openai.rs:245 — craft_anything_ai::openai::messages_json 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.
D2 · Cognitive Complexity · craft_anything_testkit · ×7
  • craft_anything_testkit::managed::build (cognitive 41) crates/testkit/src/managed.rs:146 — craft_anything_testkit::managed::build has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 11 (15 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.
  • craft_anything_testkit::android::axml (cognitive 34) crates/testkit/src/android.rs:603 — craft_anything_testkit::android::axml has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 5 (9 pts), match/switch 2 (6 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.
  • craft_anything_testkit::sectionless::sectionless_elf (cognitive 33) crates/testkit/src/sectionless.rs:40 — craft_anything_testkit::sectionless::sectionless_elf has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (16 pts), loops 11 (15 pts), match/switch 2 (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.
  • craft_anything_testkit::elf64 (cognitive 19) crates/testkit/src/lib.rs:210 — craft_anything_testkit::elf64 has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, loops 6 (8 pts), match/switch 3 (nesting depth added 2). 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.
  • craft_anything_testkit::games::unreal_pak (cognitive 17) crates/testkit/src/games.rs:34 — craft_anything_testkit::games::unreal_pak has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (5 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_testkit::apple::to_bplist (cognitive 16) crates/testkit/src/apple.rs:110 — craft_anything_testkit::apple::to_bplist has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 4 (6 pts), match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (add). 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.
  • craft_anything_testkit::sqlite::without_rowid_db::tree (cognitive 16) crates/testkit/src/sqlite.rs:275 — craft_anything_testkit::sqlite::without_rowid_db::tree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 3 (5 pts) (nesting depth added 4). 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.
D1 · Cyclomatic Complexity · FactVisitor · ×6
  • FactVisitor::on_call (cyclomatic 86) crates/js/src/facts.rs:445 — FactVisitor::on_call has cyclomatic complexity 86 (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.
  • FactVisitor::visit_assignment_expression (cyclomatic 24) crates/js/src/facts.rs:1302 — FactVisitor::visit_assignment_expression has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • FactVisitor::api_object (cyclomatic 20) crates/js/src/facts/api.rs:137 — FactVisitor::api_object has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • FactVisitor::expr_ref (cyclomatic 20) crates/js/src/facts.rs:274 — FactVisitor::expr_ref has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • FactVisitor::on_new (cyclomatic 18) crates/js/src/facts.rs:773 — FactVisitor::on_new 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.
  • FactVisitor::visit_variable_declarator (cyclomatic 18) crates/js/src/facts.rs:1234 — FactVisitor::visit_variable_declarator 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 · CraftApp · ×6
  • CraftApp::handle_done (cyclomatic 83) crates/ui-egui/src/lib.rs:1384 — CraftApp::handle_done has cyclomatic complexity 83 (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.
  • CraftApp::acted (cyclomatic 25) crates/ui-egui/src/lib.rs:955 — CraftApp::acted has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • CraftApp::tick (cyclomatic 20) crates/ui-egui/src/lib.rs:1689 — CraftApp::tick 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.
  • CraftApp::poll_run (cyclomatic 20) crates/ui-egui/src/project.rs:285 — CraftApp::poll_run 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.
  • CraftApp::pick (cyclomatic 17) crates/ui-egui/src/lib.rs:1086 — CraftApp::pick has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • CraftApp::tool_done (cyclomatic 16) crates/ui-egui/src/lib.rs:1630 — CraftApp::tool_done 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 · Scanner · ×6
  • Scanner::member (cyclomatic 54) crates/formats/src/dotnet/csharp.rs:529 — Scanner::member has cyclomatic complexity 54 (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.
  • Scanner::run (cyclomatic 44) crates/formats/src/dotnet/csharp.rs:693 — Scanner::run has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Scanner::elf (cyclomatic 28) crates/formats/src/firmware.rs:1355 — Scanner::elf has cyclomatic complexity 28 (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. This is NOT this file's highest cyclomatic complexity: Scanner::try_at (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • Scanner::type_decl (cyclomatic 22) crates/formats/src/dotnet/csharp.rs:458 — Scanner::type_decl 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. This is NOT this file's highest cyclomatic complexity: craft_anything_formats::dotnet::csharp::operator_name (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • Scanner::macho (cyclomatic 20) crates/formats/src/firmware.rs:1469 — Scanner::macho 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. This is NOT this file's highest cyclomatic complexity: Scanner::try_at (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • Scanner::squashfs (cyclomatic 17) crates/formats/src/firmware.rs:846 — Scanner::squashfs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Scanner::try_at (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D2 · Cognitive Complexity · CraftApp · ×6
  • CraftApp::handle_done (cognitive 107) crates/ui-egui/src/lib.rs:1384 — CraftApp::handle_done has cognitive complexity 107 (threshold 15). Drivers by points: if/else 32 (84 pts), match/switch 8 (17 pts), boolean chains 6 (nesting depth added 61). 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.
  • CraftApp::poll_run (cognitive 36) crates/ui-egui/src/project.rs:285 — CraftApp::poll_run has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CraftApp::tick (cognitive 23) crates/ui-egui/src/lib.rs:1689 — CraftApp::tick has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 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.
  • CraftApp::toasts (cognitive 22) crates/ui-egui/src/lib.rs:1806 — CraftApp::toasts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2, boolean chains 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.
  • CraftApp::pictures_checked (cognitive 18) crates/ui-egui/src/project.rs:441 — CraftApp::pictures_checked has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (3 pts), boolean chains 1, 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.
  • CraftApp::acted (cognitive 16) crates/ui-egui/src/lib.rs:955 — CraftApp::acted has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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 · craft_anything_cli · ×6
  • craft_anything_cli::ai_cmd::ai (cognitive 83) apps/craft-anything-cli/src/ai_cmd.rs:204 — craft_anything_cli::ai_cmd::ai has cognitive complexity 83 (threshold 15). Drivers by points: match/switch 21 (42 pts), if/else 19 (37 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 40). 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.
  • craft_anything_cli::ai_cmd::chat (cognitive 57) apps/craft-anything-cli/src/ai_cmd.rs:100 — craft_anything_cli::ai_cmd::chat has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (45 pts), match/switch 4 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 33). 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.
  • craft_anything_cli::tool_args::parse (cognitive 52) apps/craft-anything-cli/src/tool_args.rs:127 — craft_anything_cli::tool_args::parse has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 15, match/switch 3 (10 pts), loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_cli::rebuild_cmd::run (cognitive 41) apps/craft-anything-cli/src/rebuild_cmd.rs:96 — craft_anything_cli::rebuild_cmd::run has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 4 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_cli::setup_cmd::setup (cognitive 27) apps/craft-anything-cli/src/setup_cmd.rs:78 — craft_anything_cli::setup_cmd::setup has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18 (22 pts), loops 1 (2 pts), match/switch 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • craft_anything_cli::tool (cognitive 21) apps/craft-anything-cli/src/main.rs:466 — craft_anything_cli::tool has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 7 (9 pts), if/else 7 (8 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · craft_anything_setup · ×6
  • craft_anything_setup::plan::apply_with (cognitive 43) crates/setup/src/plan.rs:285 — craft_anything_setup::plan::apply_with has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 5 (15 pts), loops 4 (6 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.
  • craft_anything_setup::doctor::doctor (cognitive 34) crates/setup/src/doctor.rs:68 — craft_anything_setup::doctor::doctor has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 4 (7 pts), loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_setup::yaml::find_table (cognitive 26) crates/setup/src/yaml.rs:129 — craft_anything_setup::yaml::find_table has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_setup::plan::uninstall (cognitive 22) crates/setup/src/plan.rs:425 — craft_anything_setup::plan::uninstall has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 6 (8 pts), loops 2, boolean chains 1 (nesting depth added 8). 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.
  • craft_anything_setup::plan::plan (cognitive 19) crates/setup/src/plan.rs:189 — craft_anything_setup::plan::plan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 2 (6 pts), loops 2 (4 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.
  • craft_anything_setup::yaml::find_child (cognitive 17) crates/setup/src/yaml.rs:158 — craft_anything_setup::yaml::find_child has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · craft_anything_engines · ×6
  • craft_anything_engines::cdp::read_http_response (cognitive 25) crates/engines/src/cdp.rs:178 — craft_anything_engines::cdp::read_http_response has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_engines::gdb::fields (cognitive 24) crates/engines/src/gdb.rs:112 — craft_anything_engines::gdb::fields has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (4 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_engines::game::detect_in (cognitive 22) crates/engines/src/game.rs:147 — craft_anything_engines::game::detect_in has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • craft_anything_engines::game::unreal_version (cognitive 18) crates/engines/src/game.rs:448 — craft_anything_engines::game::unreal_version has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • craft_anything_engines::ghidra::analyse (cognitive 18) crates/engines/src/ghidra/mod.rs:508 — craft_anything_engines::ghidra::analyse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (3 pts), loops 2 (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.
  • craft_anything_engines::adb::parse_devices (cognitive 17) crates/engines/src/adb.rs:276 — craft_anything_engines::adb::parse_devices has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 1 (4 pts), loops 2 (3 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.
D3 · God Classes · TooManyMethods · ×6
  • TooManyMethods: CraftApp crates/ui-egui/src/lib.rs:416 — TooManyMethods — 162 methods, declared across 8 files: src/lib.rs (57), src/project.rs (52), src/builders.rs (20), src/engine_ui.rs (16), +4 more file(s). The bar is 30 methods; this is 132 over it, 5.40× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: AiHub crates/ai/src/lib.rs:372 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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.
  • TooManyMethods: FactVisitor crates/js/src/facts.rs:150 — TooManyMethods — 46 methods, declared across 2 files: src/facts.rs (34), facts/api.rs (12). The bar is 30 methods; this is 16 over it, 1.53× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: Workspace crates/engine/src/workspace.rs:582 — TooManyMethods — 35 methods, declared across 2 files: src/workspace.rs (34), workspace/progress.rs (1). The bar is 30 methods; this is 5 over it, 1.17× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: Scanner crates/formats/src/firmware.rs:309 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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.
  • TooManyMethods: Worker crates/ai/src/rebuild/mod.rs:416 — TooManyMethods — 33 methods, declared across 5 files: rebuild/mod.rs (23), rebuild/study.rs (7), kinds/mod.rs (1), kinds/runs.rs (1), +1 more file(s). The bar is 30 methods; this is 3 over it, 1.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · ClassTooLong · ×6
  • ClassTooLong: CraftApp crates/ui-egui/src/lib.rs:416 — ClassTooLong — 1057 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 162 methods, 4 blocks, lines 416-2037. The bar is 400 significant lines; this is 657 over it, 2.64× 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: Scanner crates/formats/src/firmware.rs:309 — ClassTooLong — 949 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 34 methods, 2 blocks, lines 309-1536. The bar is 400 significant lines; this is 549 over it, 2.37× 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: FactVisitor crates/js/src/facts.rs:150 — ClassTooLong — 892 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 46 methods, 3 blocks, lines 150-1530. The bar is 400 significant lines; this is 492 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: D crates/formats/src/swift_demangle.rs:117 — ClassTooLong — 648 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 117-975. The bar is 400 significant lines; this is 248 over it, 1.62× 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: Worker crates/ai/src/rebuild/mod.rs:416 — ClassTooLong — 486 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 33 methods, 2 blocks, lines 416-1189. The bar is 400 significant lines; this is 86 over it, 1.22× 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: AiHub crates/ai/src/lib.rs:372 — ClassTooLong — 405 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 48 methods, 2 blocks, lines 372-1026. The bar is 400 significant lines; this is 5 over it, 1.01× 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.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D1 · Cyclomatic Complexity · craft_anything_testkit · ×5
  • craft_anything_testkit::sectionless::sectionless_elf (cyclomatic 23) crates/testkit/src/sectionless.rs:40 — craft_anything_testkit::sectionless::sectionless_elf has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • craft_anything_testkit::managed::build (cyclomatic 22) crates/testkit/src/managed.rs:146 — craft_anything_testkit::managed::build 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.
  • craft_anything_testkit::android::axml (cyclomatic 17) crates/testkit/src/android.rs:603 — craft_anything_testkit::android::axml 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.
  • craft_anything_testkit::elf64 (cyclomatic 16) crates/testkit/src/lib.rs:210 — craft_anything_testkit::elf64 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.
  • craft_anything_testkit::apple::to_bplist (cyclomatic 16) crates/testkit/src/apple.rs:110 — craft_anything_testkit::apple::to_bplist has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (add). 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×5
  • Duplicated block (10 lines × 2) crates/disasm/src/pseudo.rs:143 — crates/disasm/src/pseudo.rs:143-152 | crates/disasm/src/pseudo.rs:172-181 — 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) crates/formats/src/dex_ops.rs:557 — crates/formats/src/dex_ops.rs:557-566 | crates/formats/src/java_ops.rs:503-512 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) crates/formats/src/dotnet/csharp.rs:762 — crates/formats/src/dotnet/csharp.rs:762-771 | crates/formats/src/dotnet/csharp.rs:815-824 — 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) crates/formats/src/pe.rs:287 — crates/formats/src/pe.rs:287-296 | crates/formats/src/pe.rs:335-344 — 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) crates/testkit/src/electron.rs:196 — crates/testkit/src/electron.rs:196-205 | crates/testkit/src/firmware.rs:8-17 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×5
  • Duplicated block (9 lines × 2) apps/craft-anything-cli/src/tool_args.rs:60 — apps/craft-anything-cli/src/tool_args.rs:60-68 | crates/ui-egui/src/schema_form.rs:34-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) crates/engine/src/tools/compare_tools.rs:468 — crates/engine/src/tools/compare_tools.rs:468-476 | crates/engine/src/tools/compare_tools.rs:769-777 — 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) crates/testkit/src/firmware.rs:461 — crates/testkit/src/firmware.rs:461-469 | crates/testkit/src/firmware.rs:473-481 — 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) crates/testkit/src/flutter.rs:103 — crates/testkit/src/flutter.rs:103-111 | crates/testkit/src/sectionless.rs:103-111 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) crates/testkit/src/formats.rs:69 — crates/testkit/src/formats.rs:69-77 | crates/testkit/src/formats.rs:109-117 — 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.
D2 · Cognitive Complexity · SqliteDb · ×4
  • SqliteDb::collect_table_rows (cognitive 42) crates/formats/src/sqlite.rs:547 — SqliteDb::collect_table_rows has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 7, match/switch 3 (5 pts), loops 2 (4 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.
  • SqliteDb::read_rows (cognitive 33) crates/formats/src/sqlite.rs:451 — SqliteDb::read_rows has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (13 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SqliteDb::assemble_payload (cognitive 24) crates/formats/src/sqlite.rs:636 — SqliteDb::assemble_payload has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SqliteDb::count_leaf_cells (cognitive 19) crates/formats/src/sqlite.rs:500 — SqliteDb::count_leaf_cells has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D5 · Coupling · Off the main sequence · ×4
  • Off the main sequence: craft-anything-evidence — craft-anything-evidence: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
  • Off the main sequence: craft-anything-js — craft-anything-js: 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: craft-anything-formats — craft-anything-formats: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
  • Off the main sequence: craft-anything-platform — craft-anything-platform: abstractness 0.02, instability 0.11, distance 0.87 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×4
  • Low cohesion: D (LCOM4 46) crates/formats/src/swift_demangle.rs:117 — D's methods fall into 46 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 46 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: Device (LCOM4 9) vendor/wgpu-hal/src/dx12/mod.rs:764 — Device's methods fall into 9 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 9 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: Settings (LCOM4 5) crates/engine/src/settings.rs:88 — Settings'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: ExternalEngine (LCOM4 4) crates/engines/src/table.rs:97 — ExternalEngine'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 · Worker · ×3
  • Worker::run (cyclomatic 70) crates/ai/src/rebuild/mod.rs:618 — Worker::run has cyclomatic complexity 70 (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.
  • Worker::study (cyclomatic 31) crates/ai/src/rebuild/study.rs:7 — Worker::study has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Worker::converse_turn (cyclomatic 18) crates/ai/src/rebuild/mod.rs:1095 — Worker::converse_turn 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 · craft_anything_platform · ×3
  • craft_anything_platform::capture::unix::capture (cyclomatic 49) crates/platform/src/capture.rs:846 — craft_anything_platform::capture::unix::capture has cyclomatic complexity 49 (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.
  • craft_anything_platform::standin_server::handle (cyclomatic 23) crates/platform/src/standin_server.rs:335 — craft_anything_platform::standin_server::handle 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.
  • craft_anything_platform::standin_server::parse_head (cyclomatic 22) crates/platform/src/standin_server.rs:208 — craft_anything_platform::standin_server::parse_head 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 · xtask · ×3
  • xtask::layers (cyclomatic 20) xtask/src/main.rs:178 — xtask::layers 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.
  • xtask::secrets::secrets (cyclomatic 19) xtask/src/secrets.rs:40 — xtask::secrets::secrets 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.
  • xtask::version (cyclomatic 16) xtask/src/main.rs:80 — xtask::version 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.
D2 · Cognitive Complexity · Lifter · ×3
  • Lifter::block (cognitive 170) crates/disasm/src/pseudo.rs:242 — Lifter::block has cognitive complexity 170 (threshold 15). Drivers by points: if/else 47 (110 pts), match/switch 11 (32 pts), boolean chains 17, loops 4 (11 pts) (nesting depth added 91). 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.
  • Lifter::mem (cognitive 21) crates/disasm/src/pseudo.rs:156 — Lifter::mem has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Lifter::condition (cognitive 18) crates/disasm/src/pseudo.rs:535 — Lifter::condition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 3, boolean chains 2 (nesting depth added 2). 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 · Worker · ×3
  • Worker::run (cognitive 114) crates/ai/src/rebuild/mod.rs:618 — Worker::run has cognitive complexity 114 (threshold 15). Drivers by points: if/else 45 (82 pts), boolean chains 20, match/switch 5 (9 pts), loops 2 (3 pts) (nesting depth added 42). 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.
  • Worker::study (cognitive 58) crates/ai/src/rebuild/study.rs:7 — Worker::study has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (37 pts), match/switch 4 (10 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 29). 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.
  • Worker::converse_turn (cognitive 34) crates/ai/src/rebuild/mod.rs:1095 — Worker::converse_turn has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 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.
D2 · Cognitive Complexity · D · ×3
  • D::operator (cognitive 80) crates/formats/src/swift_demangle.rs:586 — D::operator has cognitive complexity 80 (threshold 15). Drivers by points: match/switch 15 (36 pts), if/else 11 (33 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 49). 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.
  • D::identifier (cognitive 41) crates/formats/src/swift_demangle.rs:227 — D::identifier has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • D::shape_ok (cognitive 26) crates/formats/src/swift_demangle.rs:478 — D::shape_ok has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (5 pts), match/switch 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Client · ×3
  • Client::read_response (cognitive 38) crates/engine/src/tools/android_tools/jeb.rs:384 — Client::read_response has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 4, match/switch 1 (2 pts), loops 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.
  • Client::post (cognitive 18) crates/engine/src/tools/android_tools/jeb.rs:324 — Client::post has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • Client::request (cognitive 16) crates/engines/src/ghidra/client.rs:57 — Client::request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dex · ×3
  • Dex::class_data (cognitive 34) crates/formats/src/dex.rs:481 — Dex::class_data has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dex::code (cognitive 23) crates/formats/src/dex.rs:532 — Dex::code has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dex::format_insn (cognitive 23) crates/formats/src/dex.rs:591 — Dex::format_insn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (15 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) crates/engine/src/tools/native_function.rs:512 — crates/engine/src/tools/native_function.rs:512-517 | crates/engine/src/tools/native_function.rs:544-549 | crates/engine/src/tools/native_function.rs:598-603 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/testkit/src/formats.rs:157 — crates/testkit/src/formats.rs:157-162 | crates/testkit/src/lib.rs:351-356 | crates/testkit/src/program_facts.rs:281-286 — 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 all 3 call sites, so a change lands once.
  • Duplicated block (6 lines × 3) crates/engine/src/tools/browser_tools.rs:166 — crates/engine/src/tools/browser_tools.rs:166-171 | crates/engine/src/tools/electron_runtime_tools.rs:93-98 | crates/engine/src/tools/web_runtime_tools.rs:438-443 — 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 all 3 call sites, so a change lands once.
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark apps/craft-anything-web/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · D · ×2
  • D::operator (cyclomatic 115) crates/formats/src/swift_demangle.rs:586 — D::operator has cyclomatic complexity 115 (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.
  • D::identifier (cyclomatic 21) crates/formats/src/swift_demangle.rs:227 — D::identifier has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: D::standard (cyclomatic 55) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Lifter · ×2
  • Lifter::block (cyclomatic 95) crates/disasm/src/pseudo.rs:242 — Lifter::block has cyclomatic complexity 95 (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.
  • Lifter::condition (cyclomatic 18) crates/disasm/src/pseudo.rs:535 — Lifter::condition has cyclomatic complexity 18 (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 · Names · ×2
  • Names::ty (cyclomatic 45) crates/formats/src/dotnet/sig.rs:291 — Names::ty has cyclomatic complexity 45 (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.
  • Names::method_sig_inner (cyclomatic 18) crates/formats/src/dotnet/sig.rs:387 — Names::method_sig_inner has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: craft_anything_formats::dotnet::sig::alias (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · craft_anything_setup · ×2
  • craft_anything_setup::doctor::doctor (cyclomatic 26) crates/setup/src/doctor.rs:68 — craft_anything_setup::doctor::doctor 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.
  • craft_anything_setup::plan::apply_with (cyclomatic 20) crates/setup/src/plan.rs:285 — craft_anything_setup::plan::apply_with has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentLoop · ×2
  • AgentLoop::handle_turn (cyclomatic 17) crates/ai/src/agent.rs:349 — AgentLoop::handle_turn 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.
  • AgentLoop::run_one (cyclomatic 16) crates/ai/src/agent.rs:663 — AgentLoop::run_one 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.
D2 · Cognitive Complexity · Resolver · ×2
  • Resolver::trace (cognitive 99) crates/engine/src/tools/apple_tools.rs:1134 — Resolver::trace has cognitive complexity 99 (threshold 15). Drivers by points: if/else 20 (68 pts), loops 5 (16 pts), match/switch 3 (13 pts), boolean chains 2 (nesting depth added 69). 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.
  • Resolver::method (cognitive 17) crates/formats/src/dotnet/model.rs:799 — Resolver::method has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 3, boolean chains 2, loops 2 (nesting depth added 1). 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 · Emitter · ×2
  • Emitter::body (cognitive 63) crates/disasm/src/pseudo.rs:821 — Emitter::body has cognitive complexity 63 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 8 (18 pts), boolean chains 5, loops 2 (4 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.
  • Emitter::region (cognitive 26) crates/disasm/src/pseudo.rs:776 — Emitter::region has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Metadata · ×2
  • Metadata::parse_tables (cognitive 52) crates/formats/src/dotnet/meta.rs:374 — Metadata::parse_tables has cognitive complexity 52 (threshold 15). Drivers by points: if/else 23 (41 pts), loops 4 (6 pts), match/switch 2 (4 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.
  • Metadata::fits (cognitive 20) crates/formats/src/il2cpp.rs:260 — Metadata::fits has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4, boolean chains 2 (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 · Inventorier · ×2
  • Inventorier::add_asar (cognitive 31) crates/analysis/src/js_inventory.rs:354 — Inventorier::add_asar has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (22 pts), match/switch 3 (6 pts), loops 2, 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.
  • Inventorier::add_archive (cognitive 16) crates/analysis/src/js_inventory.rs:302 — Inventorier::add_archive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatStream · ×2
  • ChatStream::apply (cognitive 26) crates/ai/src/openai.rs:326 — ChatStream::apply has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (23 pts), loops 1 (2 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.
  • ChatStream::finish (cognitive 16) crates/ai/src/openai.rs:396 — ChatStream::finish has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AgentLoop · ×2
  • AgentLoop::handle_turn (cognitive 20) crates/ai/src/agent.rs:349 — AgentLoop::handle_turn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (6 pts), boolean chains 1, 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.
  • AgentLoop::run_one (cognitive 16) crates/ai/src/agent.rs:663 — AgentLoop::run_one has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (10 pts), if/else 3 (4 pts), boolean chains 2 (nesting depth added 5). 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 · Scrub · ×2
  • Scrub::query (cognitive 19) crates/analysis/src/standin.rs:472 — Scrub::query has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Scrub::scan (cognitive 17) crates/analysis/src/standin.rs:386 — Scrub::scan has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D3 · God Classes · TooManyFields · ×2
  • TooManyFields: CraftApp crates/ui-egui/src/lib.rs:416 — TooManyFields — 68 stored fields beside 162 methods. The bar is 30 stored fields; this is 38 over it, 2.27× 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: UiState crates/ui-egui/src/state.rs:407 — TooManyFields — 38 stored fields. The bar is 30 stored fields; this is 8 over it, 1.27× 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 vulnerability · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×2
  • Duplicated block (12 lines × 2) crates/engines/src/gdb.rs:74 — crates/engines/src/gdb.rs:74-85 | crates/js/src/lex.rs:196-207 — 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 (12 lines × 2) crates/formats/src/sourcemap.rs:283 — crates/formats/src/sourcemap.rs:283-294 | crates/js/src/lib.rs:158-169 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) crates/engine/src/tools/artifact_tools.rs:310 — crates/engine/src/tools/artifact_tools.rs:310-320 | crates/engines/src/install.rs:414-424 — 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 (11 lines × 2) crates/engine/src/tools/gdb_tools.rs:226 — crates/engine/src/tools/gdb_tools.rs:226-237 | crates/engine/src/tools/rizin_session_tools.rs:233-243 — before extracting anything, compare `crates/engine/src/tools/gdb_tools.rs` and `crates/engine/src/tools/rizin_session_tools.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 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 (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) crates/engine/src/tools/browser_tools.rs:954 — crates/engine/src/tools/browser_tools.rs:954-958 | crates/engine/src/tools/browser_tools.rs:1183-1187 | crates/engine/src/tools/browser_tools.rs:1244-1248 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/engine/src/tools/game_archive_tools.rs:277 — crates/engine/src/tools/game_archive_tools.rs:277-281 | crates/engine/src/tools/game_archive_tools.rs:368-372 | crates/engine/src/tools/game_archive_tools.rs:664-668 — 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.
S1 · Web-Security Posture · Weak hash algorithm · ×2
  • Weak hash algorithm crates/engines/src/cdp.rs:709 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm crates/formats/src/verify.rs:35 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×2
  • Swallowed exception (caught, then discarded) REDACTED:193 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:312 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
AC1 · Text alternatives · <canvas> without a text alternative · ×1
  • <canvas> without a text alternative apps/craft-anything-web/index.html:16 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 2 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · Program · ×1
  • Program::analyze (cyclomatic 72) crates/disasm/src/program.rs:274 — Program::analyze has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Sim · ×1
  • Sim::step (cyclomatic 67) crates/analysis/src/java_decompile.rs:146 — Sim::step has cyclomatic complexity 67 (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 · Capture · ×1
  • Capture::next_ng (cyclomatic 36) crates/formats/src/pcap.rs:236 — Capture::next_ng has cyclomatic complexity 36 (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 · DexBuilder · ×1
  • DexBuilder::build (cyclomatic 34) crates/testkit/src/android.rs:220 — DexBuilder::build has cyclomatic complexity 34 (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 · Emitter · ×1
  • Emitter::body (cyclomatic 33) crates/disasm/src/pseudo.rs:821 — Emitter::body has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Metadata · ×1
  • Metadata::parse_tables (cyclomatic 33) crates/formats/src/dotnet/meta.rs:374 — Metadata::parse_tables has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: craft_anything_formats::dotnet::meta::schema (cyclomatic 46) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ArmConsts · ×1
  • ArmConsts::apply (cyclomatic 32) crates/disasm/src/decode.rs:1059 — ArmConsts::apply 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.
D1 · Cyclomatic Complexity · Resolver · ×1
  • Resolver::trace (cyclomatic 30) crates/engine/src/tools/apple_tools.rs:1134 — Resolver::trace 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.
D1 · Cyclomatic Complexity · Xml · ×1
  • Xml::value (cyclomatic 30) crates/formats/src/plist.rs:498 — Xml::value has cyclomatic complexity 30 (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 · Bin · ×1
  • Bin::object (cyclomatic 29) crates/formats/src/plist.rs:253 — Bin::object has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · StreamState · ×1
  • StreamState::apply (cyclomatic 28) crates/ai/src/anthropic.rs:177 — StreamState::apply has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Expr · ×1
  • Expr::expr (cyclomatic 28) crates/formats/src/codesign.rs:427 — Expr::expr has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Dex · ×1
  • Dex::format_insn (cyclomatic 26) crates/formats/src/dex.rs:591 — Dex::format_insn has cyclomatic complexity 26 (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 · Activity · ×1
  • Activity::lines_for (cyclomatic 24) crates/ai/src/rebuild/activity.rs:209 — Activity::lines_for has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqliteDb · ×1
  • SqliteDb::collect_table_rows (cyclomatic 24) crates/formats/src/sqlite.rs:547 — SqliteDb::collect_table_rows has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ClaudeCode · ×1
  • ClaudeCode::parse (cyclomatic 22) crates/ai/src/cli_agents/adapters.rs:409 — ClaudeCode::parse 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 · Projector · ×1
  • Projector::uid (cyclomatic 22) crates/formats/src/keyed_archive.rs:181 — Projector::uid 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 · craft_anything_engines · ×1
  • craft_anything_engines::game::detect_in (cyclomatic 21) crates/engines/src/game.rs:147 — craft_anything_engines::game::detect_in has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Parser · ×1
  • Parser::value (cyclomatic 21) crates/formats/src/jsonc.rs:173 — Parser::value has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChatStream · ×1
  • ChatStream::apply (cyclomatic 20) crates/ai/src/openai.rs:326 — ChatStream::apply has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Elf · ×1
  • Elf::parse (cyclomatic 20) crates/formats/src/dart.rs:165 — Elf::parse has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Antigravity · ×1
  • Antigravity::parse (cyclomatic 19) crates/ai/src/cli_agents/adapters/antigravity.rs:42 — Antigravity::parse 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 · WebVisualCheck · ×1
  • WebVisualCheck::run (cyclomatic 19) crates/ai/src/rebuild/kinds/website.rs:757 — WebVisualCheck::run 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 · Client · ×1
  • Client::read_response (cyclomatic 19) crates/engine/src/tools/android_tools/jeb.rs:384 — Client::read_response 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 · Bom · ×1
  • Bom::tree (cyclomatic 19) crates/formats/src/car.rs:169 — Bom::tree 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. This is NOT this file's highest cyclomatic complexity: craft_anything_formats::car::attribute_name (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SharedConversation · ×1
  • SharedConversation::new (cyclomatic 17) crates/ai/src/cli_agents/shared.rs:25 — SharedConversation::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 · ClassFile · ×1
  • ClassFile::format_insn (cyclomatic 16) crates/formats/src/java_class.rs:700 — ClassFile::format_insn has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: craft_anything_formats::java_class::parse_pool (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · CraftAnythingBridge.dispatch (cyclomatic 16) · ×1
  • CraftAnythingBridge.dispatch (cyclomatic 16) REDACTED:129 — CraftAnythingBridge.dispatch 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.
D2 · Cognitive Complexity · Program · ×1
  • Program::analyze (cognitive 128) crates/disasm/src/program.rs:274 — Program::analyze has cognitive complexity 128 (threshold 15). Drivers by points: if/else 31 (68 pts), loops 27 (42 pts), boolean chains 13, match/switch 1 (5 pts) (nesting depth added 56). 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 · Capture · ×1
  • Capture::next_ng (cognitive 74) crates/formats/src/pcap.rs:236 — Capture::next_ng has cognitive complexity 74 (threshold 15). Drivers by points: if/else 23 (60 pts), match/switch 3 (7 pts), loops 2 (4 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · DexBuilder · ×1
  • DexBuilder::build (cognitive 71) crates/testkit/src/android.rs:220 — DexBuilder::build has cognitive complexity 71 (threshold 15). Drivers by points: loops 22 (42 pts), if/else 15 (29 pts) (nesting depth added 34). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ArmConsts · ×1
  • ArmConsts::apply (cognitive 68) crates/disasm/src/decode.rs:1059 — ArmConsts::apply has cognitive complexity 68 (threshold 15). Drivers by points: if/else 25 (57 pts), match/switch 3 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 35). 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 · Parser · ×1
  • Parser::value (cognitive 42) crates/formats/src/jsonc.rs:173 — Parser::value has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (33 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Elf · ×1
  • Elf::parse (cognitive 37) crates/formats/src/dart.rs:165 — Elf::parse has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (30 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (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 · Bom · ×1
  • Bom::tree (cognitive 36) crates/formats/src/car.rs:169 — Bom::tree has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 2 (6 pts), loops 3 (4 pts), boolean chains 2 (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 · SharedConversation · ×1
  • SharedConversation::new (cognitive 34) crates/ai/src/cli_agents/shared.rs:25 — SharedConversation::new has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (26 pts), match/switch 2 (5 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 · Antigravity · ×1
  • Antigravity::parse (cognitive 30) crates/ai/src/cli_agents/adapters/antigravity.rs:42 — Antigravity::parse has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (25 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 16). 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 · ClaudeCode · ×1
  • ClaudeCode::parse (cognitive 30) crates/ai/src/cli_agents/adapters.rs:409 — ClaudeCode::parse has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (7 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebVisualCheck · ×1
  • WebVisualCheck::run (cognitive 30) crates/ai/src/rebuild/kinds/website.rs:757 — WebVisualCheck::run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (20 pts), loops 4 (5 pts), match/switch 2 (5 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 · Names · ×1
  • Names::ty (cognitive 30) crates/formats/src/dotnet/sig.rs:291 — Names::ty has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 3 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Xml · ×1
  • Xml::value (cognitive 29) crates/formats/src/plist.rs:498 — Xml::value has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 4 (9 pts), loops 2 (6 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.
D2 · Cognitive Complexity · CraftAnythingBridge.dispatch (cognitive 28) · ×1
  • CraftAnythingBridge.dispatch (cognitive 28) REDACTED:129 — CraftAnythingBridge.dispatch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 4 (9 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Activity · ×1
  • Activity::lines_for (cognitive 26) crates/ai/src/rebuild/activity.rs:209 — Activity::lines_for has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 13). 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 · Doc · ×1
  • Doc::remove (cognitive 26) crates/formats/src/jsonc.rs:395 — Doc::remove has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, loops 3 (4 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 · Projector · ×1
  • Projector::uid (cognitive 26) crates/formats/src/keyed_archive.rs:181 — Projector::uid has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 3 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Bin · ×1
  • Bin::object (cognitive 26) crates/formats/src/plist.rs:253 — Bin::object has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 5 (10 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StreamState · ×1
  • StreamState::apply (cognitive 23) crates/ai/src/anthropic.rs:177 — StreamState::apply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 4 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAi · ×1
  • OpenAi::body (cognitive 22) crates/ai/src/openai.rs:114 — OpenAi::body has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Supervisor · ×1
  • Supervisor::watch (cognitive 21) crates/platform/src/process.rs:808 — Supervisor::watch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, match/switch 1 (3 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 · BundleVisitor · ×1
  • BundleVisitor::take_browserify (cognitive 20) crates/js/src/bundle.rs:292 — BundleVisitor::take_browserify has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DepVisitor · ×1
  • DepVisitor::visit_call_expression (cognitive 20) crates/js/src/bundle.rs:88 — DepVisitor::visit_call_expression has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (6 pts), boolean chains 4 (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 · ProbeCache · ×1
  • ProbeCache::has_readable_signer (cognitive 19) crates/formats/src/apk_sign.rs:356 — ProbeCache::has_readable_signer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · native_ui_helper.swift.top-level code (cognitive 19) · ×1
  • native_ui_helper.swift.top-level code (cognitive 19) crates/engine/src/tools/apple_runtime/native_ui_helper.swift:90 — native_ui_helper.swift.top-level code has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (6 pts), boolean chains 4, loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan · ×1
  • Plan::files (cognitive 18) crates/engine/src/pins.rs:268 — Plan::files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · craft_anything_evidence · ×1
  • craft_anything_evidence::canonical::write_value (cognitive 18) crates/evidence/src/canonical.rs:28 — craft_anything_evidence::canonical::write_value has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Ref · ×1
  • Ref::render_full (cognitive 18) crates/js/src/facts.rs:97 — Ref::render_full has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (2 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 · Mutex · ×1
  • Mutex::wait (cognitive 18) crates/platform/src/sync.rs:122 — Mutex::wait has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (5 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 · Source · ×1
  • Source::parse_all (cognitive 17) crates/engine/src/tools/java_tools.rs:225 — Source::parse_all has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Replay · ×1
  • Replay::answer (cognitive 17) crates/engine/src/tools/standin_tools.rs:295 — Replay::answer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 1 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Http · ×1
  • Http::request (cognitive 17) crates/engines/src/mcp_client.rs:321 — Http::request has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StringPool · ×1
  • StringPool::parse_with_recovery_budget (cognitive 17) crates/formats/src/axml.rs:66 — StringPool::parse_with_recovery_budget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, loops 1 (nesting depth added 1). 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 · OpenCode · ×1
  • OpenCode::parse (cognitive 16) crates/ai/src/cli_agents/adapters/opencode.rs:87 — OpenCode::parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Engine · ×1
  • Engine::availability (cognitive 16) crates/engine/src/lib.rs:165 — Engine::availability has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (6 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 · Project · ×1
  • Project::evidence_files (cognitive 16) crates/engine/src/project.rs:153 — Project::evidence_files has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyFunctions · ×1
  • TooManyFunctions: craft_anything_ui_egui::widgets crates/ui-egui/src/widgets.rs:10 — TooManyFunctions — 37 free functions. The bar is 30 free functions; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (21 shared lines) · ×1
  • Near-duplicate member pair (21 shared lines) crates/formats/src/pe.rs:260 — crates/formats/src/pe.rs:260-302 | crates/formats/src/pe.rs:309-352 — These two members are variants of one another: 21 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/engine/src/tools/native_function.rs:377 — crates/engine/src/tools/native_function.rs:377-431 | crates/engine/src/tools/native_workflows.rs:441-463 | crates/engine/src/tools/native_workflows.rs:566-576 | crates/engine/src/tools/native_workflows.rs:578-607 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (12–16 lines × 2) · ×1
  • Duplicated block (12–16 lines × 2) crates/testkit/src/android.rs:936 — crates/testkit/src/android.rs:936-947 | crates/testkit/src/android.rs:996-1011 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (3–9 lines × 3) · ×1
  • Duplicated block (3–9 lines × 3) crates/ai/src/rebuild/locate.rs:74 — crates/ai/src/rebuild/locate.rs:74-82 | crates/ai/src/rebuild/question.rs:242-244 | crates/engine/src/outputs.rs:191-199 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
D4 · Code Duplication · Duplicated block (4–5 lines × 4) · ×1
  • Duplicated block (4–5 lines × 4) crates/engine/src/tools/native_function.rs:414 — crates/engine/src/tools/native_function.rs:414-417 | crates/engine/src/tools/native_workflows.rs:443-447 | crates/engine/src/tools/native_workflows.rs:568-572 | crates/engine/src/tools/native_workflows.rs:590-593 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (2–7 lines × 3) · ×1
  • Duplicated block (2–7 lines × 3) crates/engine/src/tools/adb_tools.rs:591 — crates/engine/src/tools/adb_tools.rs:591-592 | crates/engines/src/adb.rs:160-166 | crates/engines/src/frida.rs:269-275 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Minor — 39 finding(s)
X7 · Silent fallback defaults · Silent fallback default on Err · ×18
  • Silent fallback default on Err apps/craft-anything-cli/src/ai_cmd.rs:395 — `doctor_checks` 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 crates/ai/src/cli_agents/acp.rs:244 — `line` 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 crates/ai/src/cli_agents/mod.rs:179 — `toml_string` turns every `Err` into `"\"\"".into()` — 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 crates/ai/src/detect.rs:230 — `opencode_servers` 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 crates/ai/src/rebuild/notes.rs:55 — `claim` 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 crates/engine/src/inbox.rs:138 — `pending` 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 crates/engine/src/pins.rs:477 — `tail` turns every `Err` into `String::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 crates/engine/src/tools/electron_fuse_tools.rs:235 — `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 crates/engines/src/game.rs:671 — `unreal_registry_roots` 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 crates/formats/src/packed_carrier.rs:141 — `pe_resources` 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 crates/platform/src/display.rs:55 — `display_cards_in` 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 crates/platform/src/which.rs:158 — `newest_versions` 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 crates/setup/src/yaml.rs:87 — `scalar` turns every `Err` into `"\"\"".into()` — 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 crates/testkit/src/games.rs:347 — `unity_texture2d` turns every `Err` into `0` — 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 crates/ui-egui/src/i18n.rs:104 — `language` turns every `Err` into `"en".into()` — 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 vendor/wgpu-hal/src/gles/device.rs:1606 — `destroy_render_pipeline` 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 vendor/wgpu-hal/src/gles/device.rs:1642 — `destroy_compute_pipeline` 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 vendor/wgpu-hal/src/dx12/adapter.rs:1409 — `get_adapter_pci_info` turns every `Err` into `String::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.
X10 · Duplicated predicate · Duplicated predicate · ×8
  • Duplicated predicate crates/ui-egui/src/manage.rs:120 — `(widgets::primary_icon(ui, None, "Rename", ok).clicked() || enter) && ok` appears character-identically in 2 files — crates/ui-egui/src/manage.rs, crates/ui-egui/src/pins.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 crates/engines/src/gdb.rs:321 — `Instant::now() >= deadline || cancelled()` appears character-identically in 2 files — crates/engines/src/gdb.rs, crates/engines/src/rizin.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 crates/ui-egui/src/first_run.rs:223 — `d.needs_key || d.suggestion.base_url.as_deref().is_some_and(craft_anything_ai::openai::is_opencode_go)` appears character-identically in 2 files — crates/ui-egui/src/first_run.rs, crates/ui-egui/src/settings_ui.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 crates/engine/src/settings.rs:589 — `err.message.contains("newer") && err.remediation.is_some()` appears character-identically in 2 files — crates/engine/src/settings.rs, crates/engine/src/workspace.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 crates/ai/src/cli_agents/acp.rs:846 — `fix.contains("copilot login") && fix.contains("restart Craft Anything")` appears character-identically in 2 files — crates/ai/src/cli_agents/acp.rs, crates/ai/src/cli_agents/adapters/copilot.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 crates/ai/src/cli_agents/adapters/copilot.rs:46 — `options.cli_model.is_none() && options.cli_thinking.is_none()` appears character-identically in 2 files — crates/ai/src/cli_agents/adapters/copilot.rs, crates/ai/src/cli_agents/adapters/opencode.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 crates/ai/src/rebuild/activity.rs:295 — `tool == "TodoWrite" || tool == "build_checklist"` appears character-identically in 2 files — crates/ai/src/rebuild/activity.rs, crates/ai/src/rebuild/feed.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 crates/analysis/src/native.rs:313 — `x.kind == XrefKind::Jump && f.contains(x.to)` appears character-identically in 2 files — crates/analysis/src/native.rs, crates/engine/src/tools/native_function.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.
X9 · Subsumed condition operand · Subsumed condition operand · ×4
  • Subsumed condition operand crates/platform/src/process.rs:1503 — `help.contains("bad thing")` can never decide this `&&` — every value satisfying `help.contains("sh -c 'echo bad thing >&2; exit 1'")` also satisfies `help.contains("bad thing")`, so the `&&` chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/formats/src/swift.rs:83 — `tail.starts_with("fc")` can never decide this `||` — every value satisfying `tail.starts_with("fc")` also satisfies `tail.contains("fc")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/analysis/src/js_projection.rs:60 — `p.contains("libxamarin")` can never decide this `||` — every value satisfying `p.contains("libxamarin")` also satisfies `p.contains("xamarin")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/analysis/src/web_har.rs:166 — `l.ends_with("_token")` can never decide this `||` — every value satisfying `l.ends_with("_token")` also satisfies `l.ends_with("token")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — 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/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 3 of 18 project(s) overshoot their size bounds, lowering Project Cohesion to 6.7/10. The most over is `crates/engine` (53114 LoC, 499 module-visible types across 6 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.
D28 · Secrets (history) · Rotate the exposed credentials · ×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 10/12 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `xtask`.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X5 · Nullable reference types · Java packages are not null-marked everywhere · ×1
  • Java packages are not null-marked everywhere — 0/1 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
Minor — 10 finding(s)
D12 · Dependency Hygiene · Outdated · ×10
  • Outdated: arboard — `arboard` is locked at 3.6.1 but 3.7.0 is the current stable release on crates.io, and it already satisfies the `"3.6"` requirement declared in crates/ui-egui/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arboard` and commit the updated REDACTED.
  • Outdated: iced-x86 — `iced-x86` is locked at 1.21.0 but 1.22.0 is the current stable release on crates.io, and it already satisfies the `"1.21"` requirement declared in crates/disasm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p iced-x86` and commit the updated REDACTED.
  • Outdated: log — `log` is locked at 0.4.34 but 0.4.35 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in apps/craft-anything-cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p log` and commit the updated REDACTED.
  • Outdated: schemars — `schemars` is locked at 1.2.2 but 1.2.3 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/ai/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p schemars` and commit the updated REDACTED.
  • Outdated: toml_edit — `toml_edit` is locked at 0.25.17+spec-1.1.0 but 0.25.19+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"0.25"` requirement declared in crates/setup/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml_edit` and commit the updated REDACTED.
  • Outdated: ureq — `ureq` is locked at 3.4.2 but 3.5.1 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in crates/ai/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ureq` and commit the updated REDACTED.
  • Outdated: wasm-bindgen — `wasm-bindgen` is locked at 0.2.129 but 0.2.130 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in apps/craft-anything-web/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wasm-bindgen` and commit the updated REDACTED.
  • Outdated: wasm-bindgen-futures — `wasm-bindgen-futures` is locked at 0.4.79 but 0.4.80 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in apps/craft-anything-web/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wasm-bindgen-futures` and commit the updated REDACTED.
  • Outdated: web-sys — `web-sys` is locked at 0.3.106 but 0.3.107 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in apps/craft-anything-web/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p web-sys` and commit the updated REDACTED.
  • Outdated: yaxpeax-arch — `yaxpeax-arch` is locked at 0.3.2 but 0.3.3 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/disasm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p yaxpeax-arch` and commit the updated REDACTED.

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-0ad3348a068742a1b3c74214853096ef/history.json --exit-code 0 --source .1artifacts/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-0ad3348a068742a1b3c74214853096ef/tree.json --exit-code 0 --source .1artifacts/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 .12artifacts/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 .12artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1b3c4-fca3-7703-a076-82f06fdb3c9a · 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