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

DayuanJiang/PecoFence

Measured 16 November 2026, 16:33 UTC, at code version 0739864

First survey, so nothing to compare with yet
CAI score 56.3out 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: 209,017 lines of product code in 10 projects, tests not counted · Estimated rebuild effort: about 1.7 person-years · Weakest lens: Production Readiness, 48.9

Findings by how serious they are

103 critical 1102 serious 31 minor

10 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
16 November 2026, 16:33 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 ▸

58of 58 dimensions measured by tools.
1223of 1236 findings point to an exact file and line, so you can open each one in the code. The other 13 concern the repository as a whole, such as missing documentation.
58dimensions across 8 lenses, read from 209,017 lines of product code in 10 projects.
Chapters

Executive summary

DayuanJiang/PecoFence falls short of our standard for a preview release, held back most by its Production Readiness lens, the way the code is tested, built, released and run. It scores 56.3 out of 100 and is rated Adequate, and 40 of its 103 critical findings are security problems.

Production Readiness, at 48.9, is the weakest lens and counts most in the score. The best first step is adding tests for the code no test reaches, worth about 5.1 points. Automating dependency updates comes next, worth about 2.9 points. Raising Production Readiness to 62 would lift the score to about 61.1.

Twenty-three pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Five weaknesses in the code could be used by an attacker, and twenty-four form fields can't be read by a screen reader. Pinning each tool to an exact version, fixing the weaknesses the scanner points to and labelling the form fields would close these risks. Updating the vulnerable packages would fix the four packages with a known security hole, and the four unsafe settings in infrastructure or container files need changing to safe values. The button or link with no name needs a name, even when it only shows an icon.

The product code is 209,017 lines, about €250,000 to rebuild.

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

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 48.9 · counts for 45%Accessibility 57.8 · counts for 25%Code Health 59.4 · counts for 14%Security and Compliance 62.5 · counts for 8%Maturity 65.0 · counts for 4%Architecture 93.4 · counts for 2%Event Sourcing 100.0 · counts for 1%Performance 100.0 · counts for 1%

If Production Readiness rose from 48.9 to 62, the lowest score rated Strong, the score would rise from 56.3 to about 61.1.

Code composition: what the lines of code are
Business logic 13%Supporting code 6%Tests 81%
Rebuild cost: about €250,000 · Estimate
Cost to rebuild€82,000 to €410,000, for 1,368 to 4,340 hours of work, about 1.7 person-years for 1 to 4 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 56. 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: 209,017 lines of product code
Comment linesThe estimate prices 208,985 lines. Comment lines count towards the size of 209,017 lines but aren't priced as work.
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.

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 tests that import the unreached modules (directly or through their public entry).
Raises the score by about 5.1 points · Medium effort · Test Coverage
2
Enable Dependabot/Renovate or a dependency-review gate.
Raises the score by about 2.9 points · Medium effort · Security & performance tooling
3
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Raises the score by about 2.9 points · Medium effort · DR & Backup

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 €250,000 to build again, about 1.7 person-years of work. Its weakest lens is Production Readiness, at 48.9 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Add tests that import the unreached modules (directly or through their public entry). Of all the actions in this report, it raises the score most for the work it takes: about 5.1 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 5.5 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 347,869 lines over the last 90 days, which is about 1,410,802 lines a year. At that pace, the extra work comes to an estimated 221.7 to 1330.1 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 pecofence pecofence pecofence-core pecofence-core pecofence->pecofence-core pecofence-ipc pecofence-ipc pecofence->pecofence-ipc pecofence-platform pecofence-platform pecofence->pecofence-platform pecofence-render pecofence-render pecofence->pecofence-render pecofence-cli pecofence-cli pecofence-cli->pecofence-core pecofence-cli->pecofence-ipc pecofence-cli->pecofence-platform pecofence-ipc->pecofence-core pecofence-platform->pecofence-core pecofence-promo pecofence-promo pecofence-render->pecofence-core pecofence-render->pecofence-platform pecofence-watchdog pecofence-watchdog pecofence-watchdog->pecofence-core pecofence-watchdog->pecofence-platform pf_shellext_fault pf_shellext_fault tool_bindgen tool_bindgen

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.

239 modules, with 536 dependencies between them. 4 loops run through 11 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 199 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 pecofence_ipc2 pecofence_platform.bindings3 windows_canvas.color4 windows_composition.bindings5 pecofence_core.geometry6 pecofence_core.rules7 pecofence_platform.window8 pecofence_render.backdrop9 pecofence_render.stack10 windows_canvas.types11 pecofence.commands12 pecofence.shadow13 pecofence_core.smart14 pecofence_render.motion15 pecofence_render.panel16 windows_canvas.geometry17 pecofence.filter_box18 pecofence_core.model19 windows_canvas.session20 pecofence.icons21 pecofence.layout22 pecofence.rename23 pecofence.state24 pecofence_render.bitmaps25 pecofence_render.theme26 pecofence.note_edit27 pecofence.settings_host28 pecofence_render.fence_chrome29 pecofence.anchor30 pecofence.fence_window31 pecofence.peek_search32 pecofence.app.visuals33 pecofence.fence_window.dnd34 pecofence.fence_window.render35 pecofence.marquee_offer36 pecofence.fence_window.state37 pecofence.notice38 pecofence.fence_window.api39 pecofence.fence_window.handler40 pecofence.app
1 pecofence_ipc
2 pecofence_platform.bindings
3 windows_canvas.color
4 windows_composition.bindings
5 pecofence_core.geometry2
6 pecofence_core.rules1
7 pecofence_platform.window11
8 pecofence_render.backdrop2
9 pecofence_render.stack12
10 windows_canvas.types2
11 pecofence.commands11
12 pecofence.shadow222
13 pecofence_core.smart3
14 pecofence_render.motion1
15 pecofence_render.panel311
16 windows_canvas.geometry1
17 pecofence.filter_box1112
18 pecofence_core.model111
19 windows_canvas.session151
20 pecofence.icons1321
21 pecofence.layout4
22 pecofence.rename21221
23 pecofence.state2241219
24 pecofence_render.bitmaps211
25 pecofence_render.theme431
26 pecofence.note_edit2121
27 pecofence.settings_host5213
28 pecofence_render.fence_chrome941413525
29 pecofence.anchor7211
30 pecofence.fence_window8122121252111
31 pecofence.peek_search411211
32 pecofence.app.visuals416116113111
33 pecofence.fence_window.dnd22111
34 pecofence.fence_window.render112211
35 pecofence.marquee_offer312112111
36 pecofence.fence_window.state3111121511318119921
37 pecofence.notice31111121112
38 pecofence.fence_window.api211112121113192
39 pecofence.fence_window.handler3221
40 pecofence.app3315252295121422121
Uses a module listed above itPart of a loopThe module itself
1 pecofence_ipc2 pecofence_platform.bindings3 windows_canvas.color4 windows_composition.bindings5 pecofence_core.geometry6 pecofence_core.rules7 pecofence_platform.window8 pecofence_render.backdrop9 pecofence_render.stack10 windows_canvas.types11 pecofence.commands12 pecofence.shadow13 pecofence_core.smart14 pecofence_render.motion15 pecofence_render.panel16 windows_canvas.geometry17 pecofence.filter_box18 pecofence_core.model19 windows_canvas.session20 pecofence.icons21 pecofence.layout22 pecofence.rename23 pecofence.state24 pecofence_render.bitmaps25 pecofence_render.theme26 pecofence.note_edit27 pecofence.settings_host28 pecofence_render.fence_chrome29 pecofence.anchor30 pecofence.fence_window31 pecofence.peek_search32 pecofence.app.visuals33 pecofence.fence_window.dnd34 pecofence.fence_window.render35 pecofence.marquee_offer36 pecofence.fence_window.state37 pecofence.notice38 pecofence.fence_window.api39 pecofence.fence_window.handler40 pecofence.apppecofence_ipc1pecofence_platform.bindings2windows_canvas.color3windows_composition.bindings4pecofence_core.geometry5pecofence_core.rules6pecofence_platform.window7pecofence_render.backdrop8pecofence_render.stack9windows_canvas.types10pecofence.commands11pecofence.shadow12pecofence_core.smart13pecofence_render.motion14pecofence_render.panel15windows_canvas.geometry16pecofence.filter_box17pecofence_core.model18windows_canvas.session19pecofence.icons20pecofence.layout21pecofence.rename22pecofence.state23pecofence_render.bitmaps24pecofence_render.theme25pecofence.note_edit26pecofence.settings_host27pecofence_render.fence_chrome28pecofence.anchor29pecofence.fence_window30pecofence.peek_search31pecofence.app.visuals32pecofence.fence_window.dnd33pecofence.fence_window.render34pecofence.marquee_offer35pecofence.fence_window.state36pecofence.notice37pecofence.fence_window.api38pecofence.fence_window.handler39pecofence.app40211121221122231311111121111511321421221224121921143121215213941413525721181221212521114112114161161131112211111221131211211131111215113181199213111112111221111212111319232213315252295121422121+199 more modules (most-connected shown)

At a glance — Code Health · 59.4 · Adequate · gated by D2, X5 ·

At a glance — Architecture · 93.4 · Exemplary ·

At a glance — Maturity · 65.0 · Adequate · gated by M2 ·

At a glance — Readiness · 48.9 · Adequate · gated by R4 ·

At a glance — Security · 62.5 · Adequate · gated by D29, D36 ·

At a glance — Event Sourcing · 100.0 · Exemplary ·

At a glance — Accessibility · 57.8 · Adequate · gated by AC5 ·

At a glance — Performance · 100.0 · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection43High / Critical
A03:2025 — Software Supply Chain Failures12High / Critical
A02:2025 — Security Misconfiguration9High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: Add tests that import the unreached modules (directly or through their public entry); Enable Dependabot/Renovate or a dependency-review gate; Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).

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

Do thisHelpsEffortDimension
Add tests that import the unreached modules (directly or through their public entry).+5.1 ptsMediumTest Coverage
Enable Dependabot/Renovate or a dependency-review gate.+2.9 ptsMediumSecurity & performance tooling
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+2.9 ptsMediumDR & Backup
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml.+1.3 ptsLowADR Quality
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+1.8 ptsMediumObservability
Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.+1.4 ptsMediumARIA correctness
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+1.2 ptsMediumForms & labels
Put every file in a nullable-enabled context — `#nullable enable` at its top, or commit a project file with <Nullable>enable</Nullable> — and resolve warnings rather than suppressing with `!`.+1.0 ptsMediumNullable reference types

File quality

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

FileScoreBandWorst signal
REDACTED0.4SlopIaC & Container Security: High IaC: REDACTED
REDACTED0.9SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
crates/render/src/comp.rs4.0MixedGod Classes: FileTooLong: src/comp.rs
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
crates/app/src/state.rs4.8MixedCyclomatic Complexity: AppState::sync_desktop_partly_read (cyclomatic 46)
crates/core/src/model.rs5.5MixedCyclomatic Complexity: Layout::normalize_tabs (cyclomatic 22)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
crates/app/src/fence_window/mod.rs6.3MixedGod Classes: TooManyFields: Behavior
crates/platform/src/store_bindings.rs6.3MixedCode Duplication: Edited copy of a member (11 corresponding lines)
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED

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

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

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

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

Could not be resolved — 10

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 58 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 — 58 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D17D19D20D24D28D29D30D31D34D35D36D43D44AC2AC3AC5AC6AX10AX3AX4AX9ES1ES2GD1M1M2M3M4P1P10P2P3P4P5P6PF3R1R10R2R3R4R5R6R7R8R9X5

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, 1223 of 1236 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1e534-ec30-76d6-94fe-721ed22a2058.

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: this repository's production source spans .cs, .ts, .tsx, .rs, and our analyzer cannot run the .rs test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 100.0% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
  • D10 Test 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. The 13 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 8 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • 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 reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (node:test via `npm install --ignore-scripts` (no lockfile) in services/feedback/ (7 tests); node:test via `npm install --ignore-scripts` (no lockfile) in services/usage/ (6 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
  • D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (11 contributor(s) across 2061 commit(s) sampled, automation and bot accounts excluded). One of them holds 99% of the history; the other 10 hold 0.1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • 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 naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — 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. `extras/pecofence-promo/scripts/make-energy-audio.mjs` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AXB2 Runtime readiness — 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. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • 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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • 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.
  • R4 Test Coverage — 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. 26 further occurrence(s) are not listed individually; the score already reflects all 66.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — 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 repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — 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.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • 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.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • 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.
  • 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.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • 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 Complexity4.9 / 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 4.9 / 10 · rule-coverage 100% · ceiling Prevented

140 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was App::create at 291. A further 4 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 pecofence_cli::run::run at 24 — they are counted neither in the figure above nor in this dimension's score. 2 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/ipc/src/schema.rs (pecofence_ipc::schema::schema at 21), crates/app/src/app/peek.rs (pecofence::app::peek::hotkey_keys at 17). 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.

App::create (cyclomatic 291) · ×31crates/app/src/app/mod.rs:851
pecofence::fence_window::handler::mouse_move::on_mousemove (cyclomatic 104) · ×29crates/app/src/fence_window/handler/mouse_move.rs:5
FenceViewState::replace_items (cyclomatic 61) · ×10crates/app/src/fence_window/items.rs:309
FenceChrome::draw (cyclomatic 88) · ×6crates/render/src/fence_chrome.rs:2998
pecofence_core::config_store::lint (cyclomatic 30) · ×6crates/core/src/config_store.rs:684

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

What to do

  1. Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with App::create (cyclomatic 291), App::handle (cyclomatic 182). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 4.9 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D2 · Cognitive Complexity3.8 / 10Weak✓ Tool-verified

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

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

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

201 method(s) exceeded the cognitive complexity threshold of 15; the worst was App::create at 355.

App::create (cognitive 355) · ×48crates/app/src/app/mod.rs:851
pecofence::fence_window::handler::mouse_move::on_mousemove (cognitive 148) · ×44crates/app/src/fence_window/handler/mouse_move.rs:5
FenceViewState::replace_items (cognitive 79) · ×18crates/app/src/fence_window/items.rs:309
pecofence_core::config_store::lint (cognitive 48) · ×7crates/core/src/config_store.rs:684
FenceChrome::draw (cognitive 199) · ×6crates/render/src/fence_chrome.rs:2998

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

What to do

  1. Bring the 1 body over 240 down to 240 or less in Cognitive Complexity — start with App::create (cognitive 355). — Refactoring it lifts Cognitive Complexity from 3.8 to about 4.3/10.

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

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

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

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

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

181 god class(es) detected.

MethodTooLong: ID3D11Device_Vtbl.new · ×56crates/render/src/gpu_bindings.rs:5485
FileTooLong: src/bindings.rs · ×52crates/platform/src/bindings.rs
TooManyFields: FenceViewState · ×21crates/app/src/fence_window/state.rs:99
TooManyMethods: App · ×20crates/app/src/app/mod.rs:346
ClassTooLong: FenceChrome · ×18crates/render/src/fence_chrome.rs:87

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

What to do

  1. Resolve the 56 MethodTooLong finding(s) in God Classes — start with bindings.rs (13), fence_chrome.rs (7), REDACTED (3). — One of this dimension's main actionable groups (56 warning-level).
  2. Resolve the 52 FileTooLong finding(s) in God Classes — start with state.rs (2), items.rs (2), bindings.rs. — One of this dimension's main actionable groups (52 warning-level).
  3. Resolve the 21 TooManyFields finding(s) in God Classes — start with bindings.rs (8), gpu_bindings.rs (5), mod.rs (2). — One of this dimension's main actionable groups (21 warning-level).

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

D4 · Code Duplication7.0 / 10Strong✓ Tool-verified

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

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

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

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

Duplicated block (10 lines × 3) · ×25crates/platform/src/bindings.rs:11733
Duplicated block (7 lines × 2) · ×14crates/app/src/app/fences.rs:1029
Duplicated block (6 lines × 2) · ×13crates/app/src/app/testscript.rs:166
Duplicated block (5 lines × 2) · ×12crates/app/src/app/ipc.rs:2429
Duplicated block (9 lines × 2) · ×11crates/app/src/app/arrange.rs:204

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

What to do

  1. Resolve the 25 Duplicated block (10 lines × 3) finding(s) in Code Duplication — start with comp.rs (24), bindings.rs. — One of this dimension's main actionable groups (25 warning-level).
  2. Resolve the 14 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with bindings.rs (4), fence_chrome.rs (2), fences.rs. — One of this dimension's main actionable groups (14 warning-level).
  3. Resolve the 13 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with marquee_offer.rs (2), testscript.rs, render.rs. — One of this dimension's main actionable groups (13 warning-level).

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

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

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

Off the main sequence: pecofence-core · ×2

What to do

  1. Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).

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

D6 · Cohesion (LCOM4)6.2 / 10Adequate✓ 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 6.2 / 10 · rule-coverage 100% · ceiling Verified

67 of 214 classes have LCOM4 above 3.

Low cohesion: SpriteVisual (LCOM4 53) · ×67crates/render/src/comp.rs:17887

What to do

  1. Resolve the 67 Low cohesion finding(s) in Cohesion (LCOM4) — start with comp.rs (65), mod.rs, store_bindings.rs. — One of this dimension's main actionable groups (67 warning-level).

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

D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

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

0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 13 tests. Measured on the JavaScript/TypeScript suite only — at least 8 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

D12 · Dependency Hygiene9.9 8.8 / 10Strong✓ 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 8.8 / 10 · rule-coverage 89% · ceiling Verified

3 outdated, 0 yanked direct Cargo dependencies. 16 of 18 direct crates were graded against crates.io (0 not published there, 2 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: schemars · ×3

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 88 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 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 Hotspots5.1 / 10Adequate✓ 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 5.1 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: scripts/test-settings-ui.mjs (148×795=117660); crates/app/src/app/mod.rs (255×291=74205); ui/settings.html (203×77=15631)

Hotspot: scripts/test-settings-ui.mjs · ×69scripts/test-settings-ui.mjs:264

What to do

  1. Resolve the 69 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (2), notice.rs (2), test-settings-ui.mjs. — One of this dimension's main actionable groups (69 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.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 196057 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

2 of 2 documentation facets pass in full. 33 document(s) read across 4 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 foundcrates/watchdog/Cargo.toml:9

What to do

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

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

D24 · Comment Value10.0 9.5 / 10Exemplary○ Nothing flagged

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

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

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 95% · ceiling Documented

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

✓ On the Gold path — maintain.

Detailed fixes: d24_recommendation.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)1.3 / 10Critical✓ 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 1.3 / 10 · rule-coverage 100% · ceiling Documented

43 finding(s): 0 critical, 31 high, 12 medium, 0 low. 23 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 9 file(s) — `crates/app/src/fence_window/render.rs` (lines 213–234, lines 2449–2451, line 2452, …), `REDACTED` (line 556, line 557), `crates/cli/src/client.rs` (line 40, line 42), `crates/platform/src/shell.rs` (line 1602, line 1605, line 1608, …), `extras/pecofence-promo/scripts/make-energy-audio.mjs` (line 89, line 119, line 120, …), … (+4 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  3. No action in Static Analysis (SAST) — all 23 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 (23 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities6.9 / 10Adequate✓ 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 6.9 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D31 · IaC & Container Security8.4 / 10Adequategated by 4 critical findings✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 4 High IaC finding(s) in IaC & Container Security — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 3 Low IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d31_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 227 of the 284 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 Coupling9.7 / 10Stronggated by 5 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: cli.rs↔lib.rs 71%; state.rs↔dto.rs 56%; consts.rs↔mod.rs 55%

Change coupling: cli.rs ↔ lib.rs · ×5crates/cli/src/cli.rs:1

What to do

  1. Resolve the 5 Change coupling finding(s) in Change Coupling — start with state.rs (2), cli.rs, consts.rs. — One of this dimension's main actionable groups (5 warning-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED

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.

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

AC2 · Forms & labels4.8 / 10Adequate✓ Tool-verified

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.

  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×24) — ui/settings.html:661, ui/settings.html:682, ui/settings.html:684, …
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). — ui/settings.html:769

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

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.

AC5 · ARIA correctness3.7 / 10Weak✓ Tool-verified

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • The switch role requires aria-checked to convey its state. Add it. (×38) — ui/settings.html:689, ui/settings.html:702, ui/settings.html:703, …

What to do

  • Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
AC6 · Visual & motion safety7.6 / 10Strong✓ Tool-verified

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.

  • `.hotkey-box.recording:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ui/settings.html:317
  • `.file-icon` sets color: #eef7ff on background-color: #749cca — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — ui/settings.html:365

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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.

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.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

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

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

M2 · Architecture documentation2.0 / 10Weak✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

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

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

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

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

P10 · Library API & versioning9.9 / 10Exemplary✓ Tool-verified

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

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

  • 4 public types in `pecofence_render.comp` are marked as implementation by their own namespace, folder or name: `ICompositionAnimationBase_Impl` (crates/render/src/comp.rs:9742, name ends in `Impl`), `ICompositionSurface_Impl` (crates/render/src/comp.rs:10524, name ends in `Impl`), `IIterable_Impl` (crates/render/src/comp.rs:11146, name ends in `Impl`), `IMap_Impl` (crates/render/src/comp.rs:11525, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — crates/render/src/comp.rs:9742

What to do

  • Hide `pecofence_render.comp` (`ICompositionAnimationBase_Impl`, `ICompositionSurface_Impl`, `IIterable_Impl`, `IMap_Impl`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
P2 · Observability5.8 / 10Adequate✓ Tool-verified

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

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

  • Only 3/5 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/cli`, `crates/watchdog`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance 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.

  • `extras/pecofence-promo/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — extras/pecofence-promo/package.json:8

What to do

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

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

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

P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
  • Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

R1 · Type Safety7.6 / 10Strong✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

R10 · Code Duplication8.7 / 10Exemplary✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • extras/pecofence-promo/scripts/prepare-autosort-media.mjs:29 · extras/pecofence-promo/scripts/prepare-motion-media.mjs:9 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — extras/pecofence-promo/scripts/prepare-autosort-media.mjs:29
  • scripts/test-settings-ui.mjs:71 · scripts/test-settings-ui.mjs:240 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/test-settings-ui.mjs:71
  • scripts/test-settings-ui.mjs:674 · scripts/test-settings-ui.mjs:1373 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/test-settings-ui.mjs:674
  • extras/pecofence-promo/src/launch/Beauty.tsx:2 · extras/pecofence-promo/src/launch/Closing.tsx:3 · extras/pecofence-promo/src/launch/Opening.tsx:2 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — extras/pecofence-promo/src/launch/Beauty.tsx:2
  • extras/pecofence-promo/src/motion/Closing.tsx:1 · extras/pecofence-promo/src/motion/Hero.tsx:1 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — extras/pecofence-promo/src/motion/Closing.tsx:1
  • extras/pecofence-promo/src/motion/NewFiles.tsx:22 · extras/pecofence-promo/src/motion/NewFiles.tsx:35 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — extras/pecofence-promo/src/motion/NewFiles.tsx:22
  • scripts/test-settings-ui.mjs:811 · scripts/test-settings-ui.mjs:894 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/test-settings-ui.mjs:811
  • extras/pecofence-promo/scripts/make-assets.mjs:2 · extras/pecofence-promo/scripts/make-energy-audio.mjs:2 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — extras/pecofence-promo/scripts/make-assets.mjs:2
  • extras/pecofence-promo/src/motion/Closing.tsx:2 · extras/pecofence-promo/src/motion/Groups.tsx:4 · extras/pecofence-promo/src/motion/Hero.tsx:2 · extras/pecofence-promo/src/motion/Tabs.tsx:2 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — extras/pecofence-promo/src/motion/Closing.tsx:2
  • extras/pecofence-promo/src/reviewed/EndCard.tsx:3 · extras/pecofence-promo/src/reviewed/FileAccess.tsx:4 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — extras/pecofence-promo/src/reviewed/EndCard.tsx:3
  • extras/pecofence-promo/src/reviewed/EndCard.tsx:1 · extras/pecofence-promo/src/reviewed/FileAccess.tsx:2 · extras/pecofence-promo/src/reviewed/ProjectTabs.tsx:2 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — extras/pecofence-promo/src/reviewed/EndCard.tsx:1
  • scripts/test-settings-ui.mjs:356 · scripts/test-settings-ui.mjs:1837 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/test-settings-ui.mjs:356
  • scripts/test-settings-ui.mjs:1595 · scripts/test-settings-ui.mjs:1610 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/test-settings-ui.mjs:1595
  • extras/pecofence-promo/scripts/prepare-autosort-media.mjs:5 · extras/pecofence-promo/scripts/prepare-reviewed-media.mjs:4 — the two spans are one implementation copied and then locally edited — 61 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — extras/pecofence-promo/scripts/prepare-autosort-media.mjs:5
  • scripts/test-settings-ui.mjs:1509 · scripts/test-settings-ui.mjs:1549 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/test-settings-ui.mjs:1509

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity6.7 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • postMessage has cyclomatic complexity 69 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/test-settings-ui.mjs:78
  • validate has cyclomatic complexity 26 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — services/usage/src/usage.mjs:18
  • validate has cyclomatic complexity 23 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — services/feedback/src/index.js:31
  • (anonymous) has cyclomatic complexity 18 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/test-settings-ui.mjs:565
  • (anonymous) has cyclomatic complexity 18 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/test-settings-ui.mjs:2140
  • (anonymous) has cyclomatic complexity 17 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — scripts/test-settings-ui.mjs:605, scripts/test-settings-ui.mjs:814
  • fetch has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — services/feedback/src/index.js:93
  • (anonymous) has cyclomatic complexity 16 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/test-settings-ui.mjs:2347
  • (anonymous) has cyclomatic complexity 15 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/test-settings-ui.mjs:3640
  • (anonymous) has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/test-settings-ui.mjs:1510
  • note has cyclomatic complexity 13 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — extras/pecofence-promo/scripts/make-assets.mjs:47
  • DesktopIcon has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — extras/pecofence-promo/src/trailer/scenes/Opening.tsx:115
  • (anonymous) has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/test-settings-ui.mjs:520
  • (anonymous) has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/test-settings-ui.mjs:1271
  • (anonymous) has cyclomatic complexity 13 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/test-settings-ui.mjs:2378
  • (anonymous) has cyclomatic complexity 12 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/test-settings-ui.mjs:3569
  • (anonymous) has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×3) — scripts/test-settings-ui.mjs:739, scripts/test-settings-ui.mjs:897, scripts/test-settings-ui.mjs:2488
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

R4 · Test Coverage0.3 / 10Critical✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — extras/pecofence-promo/src/trailer/scenes/Opening.tsx:1, extras/pecofence-promo/scripts/make-energy-audio.mjs:1, extras/pecofence-promo/src/trailer/scenes/Agent.tsx:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • The package in `extras/pecofence-promo` declares the lint script `lint` (`eslint src && tsc`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `extras/pecofence-promo` (or the workspace's task runner). — extras/pecofence-promo/package.json:32
R7 · Dead Code8.7 / 10Strong✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 17 application, 3 tooling and 3 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (17 application, 3 tooling, 3 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×6) — extras/pecofence-promo/scripts/prepare-isolated-build.mjs, extras/pecofence-promo/src/reviewed/FileAccess.tsx, extras/pecofence-promo/src/reviewed/EndCard.tsx, …
  • Nothing imports this binding — it is safe to review for removal. — extras/pecofence-promo/src/trailer/timing.ts:10

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene9.5 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Declared in extras/pecofence-promo/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — extras/pecofence-promo/package.json:13

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

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

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

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

  • 0/3 C# file(s) are in a nullable-enabled context. This repository commits no project file, so nothing sets <Nullable>enable</Nullable> for it: a file is enabled only by its own `#nullable enable`, by a Unity `csc.rsp` with `-nullable:enable` for its assembly, or as a file-based app (`#:` directives) whose `#:property Nullable` does not turn it off. NRTs catch a whole class of null-deref bugs at compile time.

What to do

  • Put every file in a nullable-enabled context — `#nullable enable` at its top, or commit a project file with <Nullable>enable</Nullable> — and resolve warnings rather than suppressing with `!`.

WCAG coverage — what static analysis assessed

Statically assessed 10 of 55 WCAG 2.2 Level A/AA success criteria (18%; ≈20% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 45 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
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
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 45 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 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 Health59.4Adequate — gated by D2, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture93.4ExemplarySolid.
Maturity65.0Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness48.9Adequate — gated by R4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security62.5Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event Sourcing100.0ExemplaryStrongest area.
Accessibility57.8Adequate — gated by AC5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100.0ExemplarySolid.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 70 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • 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
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, 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 the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • 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 does not read html yet; not measured.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go 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 (crates), 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"]`.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • 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): 2 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 291 value object(s); 5 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 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 (this repository commits no MSBuild project, so its C# was read as syntax-only projects — a handler marked ONLY by an interface from a package is not visible without a build)
  • IC1 Incompleteness & stubs — IC1 reached only 0% of this repository's production lines — rust (186,993 lines), javascript (12,960 lines), python (6,468 lines), typescript (2,247 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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 measured — the application kind could not be determined for this repo
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 4 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • 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.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X12 Unreachable branch — X12 reached only 0% of this repository's production lines — rust (186,993 lines), javascript (12,960 lines), python (6,468 lines), typescript (2,247 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — X16 reached only 0% of this repository's production lines — rust (186,993 lines), javascript (12,960 lines), python (6,468 lines), typescript (2,247 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no async method does work a token could cancel
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 103 finding(s)
AC5 · ARIA correctness · role="switch" missing required aria-checked · ×38
  • role="switch" missing required aria-checked ui/settings.html:689 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:702 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:703 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:705 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:707 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:713 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:715 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:716 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:717 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:719 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:735 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:737 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:738 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:741 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:744 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:745 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:749 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:757 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:765 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:768 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:772 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:784 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:789 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:798 — The switch role requires aria-checked to convey its state. Add it.
  • role="switch" missing required aria-checked ui/settings.html:818 — The switch role requires aria-checked to convey its state. Add it.
  • + 13 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <select> without a programmatic label · ×20
  • <select> without a programmatic label ui/settings.html:661 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:682 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:684 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:686 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:688 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:691 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:700 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:727 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:740 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:748 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:793 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:803 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:805 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:807 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:809 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:814 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:817 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:826 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:828 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label ui/settings.html:854 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×4
  • <input> without a programmatic label ui/settings.html:694 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label ui/settings.html:783 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label ui/settings.html:822 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label ui/settings.html:824 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D30 · Dependency Vulnerabilities · High CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <button> with no accessible text · ×1
  • <button> with no accessible text ui/settings.html:769 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
Serious — 1102 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×69
  • Hotspot: scripts/test-settings-ui.mjs scripts/test-settings-ui.mjs:264 — scripts/test-settings-ui.mjs changed 148 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 795 in test-settings-ui.runTests at line 264. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- scripts/test-settings-ui.mjs`: 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/app/src/app/mod.rs crates/app/src/app/mod.rs:851 — crates/app/src/app/mod.rs changed 255 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 291 in App::create at line 851. 8 of those changes were fix/bug commits, and the other 247 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/app/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: ui/settings.html ui/settings.html:2108 — ui/settings.html changed 203 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in settings.html.renderFences at line 2108. 3 of those changes were fix/bug commits, and the other 200 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- ui/settings.html`: 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: REDACTED REDACTED:920 — REDACTED changed 120 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in App::on_settings_message at line 920. 4 of those changes were fix/bug commits, and the other 116 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- REDACTED`: 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/app/src/app/ipc.rs crates/app/src/app/ipc.rs:703 — crates/app/src/app/ipc.rs changed 100 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in App::ipc_dispatch at line 703. 5 of those changes were fix/bug commits, and the other 95 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/app/ipc.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/render/src/fence_chrome.rs crates/render/src/fence_chrome.rs:2998 — crates/render/src/fence_chrome.rs changed 113 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in FenceChrome::draw at line 2998. 3 of those changes were fix/bug commits, and the other 110 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/render/src/fence_chrome.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: REDACTED REDACTED:836 — REDACTED changed 89 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 110 in App::show_fence_menu at line 836. 4 of those changes were fix/bug commits, and the other 85 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- REDACTED`: 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/app/src/fence_window/api.rs crates/app/src/fence_window/api.rs:1403 — crates/app/src/fence_window/api.rs changed 187 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in FenceWindow::set_tabs at line 1403. 4 of those changes were fix/bug commits, and the other 183 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/fence_window/api.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/app/src/state.rs crates/app/src/state.rs:1479 — crates/app/src/state.rs changed 116 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in AppState::sync_desktop_partly_read at line 1479. 6 of those changes were fix/bug commits, and the other 110 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/state.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/app/src/app/fence_options.rs crates/app/src/app/fence_options.rs:267 — crates/app/src/app/fence_options.rs changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in pecofence::app::fence_options::parse_fence_prop at line 267. 3 of those changes were fix/bug commits, and the other 48 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/app/fence_options.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/app/src/fence_window/handler/mouse_move.rs crates/app/src/fence_window/handler/mouse_move.rs:5 — crates/app/src/fence_window/handler/mouse_move.rs changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 104 in pecofence::fence_window::handler::mouse_move::on_mousemove at line 5. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/fence_window/handler/mouse_move.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/app/src/app/testscript.rs crates/app/src/app/testscript.rs:104 — crates/app/src/app/testscript.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 117 in App::test_step at line 104. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/app/testscript.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/app/src/fence_window/handler/keyboard.rs crates/app/src/fence_window/handler/keyboard.rs:68 — crates/app/src/fence_window/handler/keyboard.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in pecofence::fence_window::handler::keyboard::on_keydown 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/fence_window/handler/keyboard.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/app/src/fence_window/handler/mouse.rs crates/app/src/fence_window/handler/mouse.rs:157 — crates/app/src/fence_window/handler/mouse.rs changed 61 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in pecofence::fence_window::handler::mouse::on_lbuttondown at line 157. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/fence_window/handler/mouse.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/app/src/fence_window/handler/mod.rs crates/app/src/fence_window/handler/mod.rs:215 — crates/app/src/fence_window/handler/mod.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in FenceWindow::make_handler at line 215. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/fence_window/handler/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/app/src/fence_window/render.rs crates/app/src/fence_window/render.rs:890 — crates/app/src/fence_window/render.rs changed 110 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in FenceViewState::draw_chrome_panel at line 890. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/fence_window/render.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/app/src/fence_window/dnd.rs crates/app/src/fence_window/dnd.rs:815 — crates/app/src/fence_window/dnd.rs changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in FenceDropHandler::drop at line 815. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/fence_window/dnd.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/app/src/app/fences.rs crates/app/src/app/fences.rs:387 — crates/app/src/app/fences.rs changed 92 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in App::apply_cell_snap at line 387. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/app/fences.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/app/src/fence_window/items.rs crates/app/src/fence_window/items.rs:309 — crates/app/src/fence_window/items.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in FenceViewState::replace_items at line 309. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/fence_window/items.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/app/src/fence_window/handler/nc.rs crates/app/src/fence_window/handler/nc.rs:816 — crates/app/src/fence_window/handler/nc.rs changed 68 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in pecofence::fence_window::handler::nc::on_exitsizemove at line 816. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/fence_window/handler/nc.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/app/src/peek_search.rs crates/app/src/peek_search.rs:1157 — crates/app/src/peek_search.rs changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in pecofence::peek_search::paint_box at line 1157. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/peek_search.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/app/src/anchor.rs crates/app/src/anchor.rs:2138 — crates/app/src/anchor.rs changed 55 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in DesktopAnchor::on_timer at line 2138. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/anchor.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: REDACTED REDACTED:755 — REDACTED changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in App::script_row_clicked at line 755. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- REDACTED`: 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/app/src/fence_window/hit.rs crates/app/src/fence_window/hit.rs:152 — crates/app/src/fence_window/hit.rs changed 61 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in FenceViewState::up_button_at at line 152. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/fence_window/hit.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/app/src/app/visuals.rs crates/app/src/app/visuals.rs:1469 — crates/app/src/app/visuals.rs changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in App::refresh_visuals at line 1469. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:30:30 +09:00' --until='2026-11-15 15:30:30 +09:00' --full-history --no-merges -- crates/app/src/app/visuals.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.
  • + 44 more in this group — see findings.md.
D6 · Cohesion (LCOM4) · Low cohesion · ×67
  • Low cohesion: SpriteVisual (LCOM4 53) crates/render/src/comp.rs:17887 — SpriteVisual's methods fall into 53 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 53 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: ContainerVisual (LCOM4 51) crates/render/src/comp.rs:7692 — ContainerVisual's methods fall into 51 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 51 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: LayerVisual (LCOM4 51) crates/render/src/comp.rs:13512 — LayerVisual's methods fall into 51 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 51 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: Visual (LCOM4 50) crates/render/src/comp.rs:21255 — Visual's methods fall into 50 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 50 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: ColorKeyFrameAnimation (LCOM4 46) crates/render/src/comp.rs:741 — ColorKeyFrameAnimation'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: Compositor (LCOM4 45) crates/render/src/comp.rs:7057 — Compositor's methods fall into 45 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 45 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: ScalarKeyFrameAnimation (LCOM4 44) crates/render/src/comp.rs:15540 — ScalarKeyFrameAnimation's methods fall into 44 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 44 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: Vector2KeyFrameAnimation (LCOM4 44) crates/render/src/comp.rs:18801 — Vector2KeyFrameAnimation's methods fall into 44 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 44 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: Vector3KeyFrameAnimation (LCOM4 44) crates/render/src/comp.rs:19750 — Vector3KeyFrameAnimation's methods fall into 44 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 44 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: KeyFrameAnimation (LCOM4 42) crates/render/src/comp.rs:12968 — KeyFrameAnimation's methods fall into 42 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 42 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: QuaternionKeyFrameAnimation (LCOM4 42) crates/render/src/comp.rs:14984 — QuaternionKeyFrameAnimation's methods fall into 42 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 42 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: Vector4KeyFrameAnimation (LCOM4 42) crates/render/src/comp.rs:20699 — Vector4KeyFrameAnimation's methods fall into 42 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 42 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: InsetClip (LCOM4 33) crates/render/src/comp.rs:12572 — InsetClip's methods fall into 33 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 33 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: CompositionGeometricClip (LCOM4 29) crates/render/src/comp.rs:3891 — CompositionGeometricClip's methods fall into 29 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 29 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: CompositionPropertySet (LCOM4 27) crates/render/src/comp.rs:5501 — CompositionPropertySet's methods fall into 27 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 27 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: ExpressionAnimation (LCOM4 27) crates/render/src/comp.rs:9137 — ExpressionAnimation's methods fall into 27 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 27 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: CompositionAnimation (LCOM4 25) crates/render/src/comp.rs:1354 — CompositionAnimation's methods fall into 25 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 25 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: CompositionClip (LCOM4 25) crates/render/src/comp.rs:2462 — CompositionClip's methods fall into 25 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 25 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: NaturalMotionAnimation (LCOM4 25) crates/render/src/comp.rs:14288 — NaturalMotionAnimation's methods fall into 25 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 25 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: ScalarNaturalMotionAnimation (LCOM4 25) crates/render/src/comp.rs:16131 — ScalarNaturalMotionAnimation's methods fall into 25 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 25 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: SpringScalarNaturalMotionAnimation (LCOM4 25) crates/render/src/comp.rs:16810 — SpringScalarNaturalMotionAnimation's methods fall into 25 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 25 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: SpringVector2NaturalMotionAnimation (LCOM4 25) crates/render/src/comp.rs:17169 — SpringVector2NaturalMotionAnimation's methods fall into 25 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 25 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: SpringVector3NaturalMotionAnimation (LCOM4 25) crates/render/src/comp.rs:17528 — SpringVector3NaturalMotionAnimation's methods fall into 25 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 25 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: Vector2NaturalMotionAnimation (LCOM4 25) crates/render/src/comp.rs:19392 — Vector2NaturalMotionAnimation's methods fall into 25 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 25 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: Vector3NaturalMotionAnimation (LCOM4 25) crates/render/src/comp.rs:20341 — Vector3NaturalMotionAnimation's methods fall into 25 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 25 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.
  • + 42 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×56
  • MethodTooLong: ID3D11Device_Vtbl.new crates/render/src/gpu_bindings.rs:5485 — MethodTooLong — new runs 726 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 626 over it, 7.26× 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: App.show_fence_menu REDACTED:836 — MethodTooLong — show_fence_menu runs 617 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 517 over it, 6.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: IWICImagingFactory_Vtbl.new crates/platform/src/bindings.rs:17141 — MethodTooLong — new runs 514 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 414 over it, 5.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: App.ipc_dispatch crates/app/src/app/ipc.rs:703 — MethodTooLong — ipc_dispatch runs 505 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 405 over it, 5.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FenceChrome.draw crates/render/src/fence_chrome.rs:2998 — MethodTooLong — draw runs 498 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 398 over it, 4.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.
  • MethodTooLong: FenceWindow.create crates/app/src/fence_window/api.rs:31 — MethodTooLong — create runs 372 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 272 over it, 3.72× 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: App.test_step crates/app/src/app/testscript.rs:104 — MethodTooLong — test_step runs 364 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 264 over it, 3.64× 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: FenceViewState.replace_items crates/app/src/fence_window/items.rs:309 — MethodTooLong — replace_items runs 330 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 230 over it, 3.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.on_settings_message REDACTED:920 — MethodTooLong — on_settings_message runs 319 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 219 over it, 3.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: IFileOperation_Vtbl.new crates/platform/src/bindings.rs:9647 — MethodTooLong — new runs 293 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 193 over it, 2.93× 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: FenceChrome.draw_rows crates/render/src/fence_chrome.rs:4051 — MethodTooLong — draw_rows runs 290 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 190 over it, 2.90× 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: IFileDialog_Vtbl.new crates/platform/src/bindings.rs:8711 — MethodTooLong — new runs 276 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 176 over it, 2.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: IDesktopWallpaper_Vtbl.new crates/platform/src/bindings.rs:7111 — MethodTooLong — new runs 251 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 151 over it, 2.51× 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: FenceDropHandler.drop crates/app/src/fence_window/dnd.rs:815 — MethodTooLong — drop runs 248 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 148 over it, 2.48× 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: IShellLinkW_Vtbl.new crates/platform/src/bindings.rs:14061 — MethodTooLong — new runs 244 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 144 over it, 2.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: IShellBrowser_Vtbl.new crates/platform/src/bindings.rs:12217 — MethodTooLong — new runs 216 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 116 over it, 2.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FenceViewState.render_drag_image crates/app/src/fence_window/dnd.rs:1587 — MethodTooLong — render_drag_image runs 212 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 112 over it, 2.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: IFolderView_Vtbl.new crates/platform/src/bindings.rs:10511 — MethodTooLong — new runs 210 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 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FenceViewState.redraw_rows crates/app/src/fence_window/render.rs:2207 — MethodTooLong — redraw_rows 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.
  • MethodTooLong: IShellFolder_Vtbl.new crates/platform/src/bindings.rs:12819 — MethodTooLong — new runs 205 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 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FenceChrome.draw_tab_list crates/render/src/fence_chrome.rs:3777 — MethodTooLong — draw_tab_list 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.
  • MethodTooLong: FenceViewState.redraw_content crates/app/src/fence_window/render.rs:1961 — MethodTooLong — redraw_content runs 190 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 90 over it, 1.90× 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: App.build_item_menu REDACTED:588 — MethodTooLong — build_item_menu runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: IWICBitmapDecoder_Vtbl.new crates/platform/src/bindings.rs:15482 — MethodTooLong — new runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ID2D1Properties_Vtbl.new crates/render/src/gpu_bindings.rs:2925 — MethodTooLong — new runs 175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 31 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×52
  • FileTooLong: src/bindings.rs crates/platform/src/bindings.rs — FileTooLong — 16859 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 292 free functions. The bar is 500 significant lines; this is 16359 over it, 33.72× 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/comp.rs crates/render/src/comp.rs — FileTooLong — 16745 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 16245 over it, 33.49× 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/gpu_bindings.rs crates/render/src/gpu_bindings.rs — FileTooLong — 7654 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 7154 over it, 15.31× 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/fence_chrome.rs crates/render/src/fence_chrome.rs — FileTooLong — 4085 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 67% of them inside a single declaration: FenceChrome (6 blocks, 87-5911), declaring 42 free functions. The bar is 500 significant lines; this is 3585 over it, 8.17× 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/state.rs crates/app/src/state.rs — FileTooLong — 2374 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 1874 over it, 4.75× 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: app/mod.rs crates/app/src/app/mod.rs — FileTooLong — 2354 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 1854 over it, 4.71× 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: app/ipc.rs crates/app/src/app/ipc.rs — FileTooLong — 2290 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 83% of them inside a single declaration: App (617-3182). The bar is 500 significant lines; this is 1790 over it, 4.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: fence_window/api.rs crates/app/src/fence_window/api.rs — FileTooLong — 2146 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 99% of them inside a single declaration: FenceWindow (3 blocks, 5-3334). The bar is 500 significant lines; this is 1646 over it, 4.29× 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: ui/settings.html ui/settings.html — FileTooLong — 2057 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1557 over it, 4.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: fence_window/render.rs crates/app/src/fence_window/render.rs — FileTooLong — 1750 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: FenceViewState (234-2446). The bar is 500 significant lines; this is 1250 over it, 3.50× 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/model.rs crates/core/src/model.rs — FileTooLong — 1576 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 1076 over it, 3.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/make-trailer-audio.py extras/pecofence-promo/scripts/make-trailer-audio.py — FileTooLong — 1564 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1064 over it, 3.13× 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/anchor.rs crates/app/src/anchor.rs — FileTooLong — 1458 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 86% of them inside a single declaration: DesktopAnchor (3 blocks, 338-2359). The bar is 500 significant lines; this is 958 over it, 2.92× 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/peek_search.rs crates/app/src/peek_search.rs — FileTooLong — 1416 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 48 free functions. The bar is 500 significant lines; this is 916 over it, 2.83× 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: fence_window/dnd.rs crates/app/src/fence_window/dnd.rs — FileTooLong — 1253 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 753 over it, 2.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1239 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 88% of them inside a single declaration: App (267-1693). The bar is 500 significant lines; this is 739 over it, 2.48× 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: REDACTED REDACTED — FileTooLong — 1167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 90% of them inside a single declaration: App (2 blocks, 196-1754). The bar is 500 significant lines; this is 667 over it, 2.33× 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: app/fences.rs crates/app/src/app/fences.rs — FileTooLong — 1102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 95% of them inside a single declaration: App (71-1664). The bar is 500 significant lines; this is 602 over it, 2.20× 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: app/visuals.rs crates/app/src/app/visuals.rs — FileTooLong — 1086 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 586 over it, 2.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/shell.rs crates/platform/src/shell.rs — FileTooLong — 1082 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 88 free functions. The bar is 500 significant lines; this is 582 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: app/smart.rs crates/app/src/app/smart.rs — FileTooLong — 957 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 84% of them inside a single declaration: App (2 blocks, 208-1410). The bar is 500 significant lines; this is 457 over it, 1.91× 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: app/items.rs crates/app/src/app/items.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), about 91% of them inside a single declaration: App (72-1378). The bar is 500 significant lines; this is 439 over it, 1.88× 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: handler/nc.rs crates/app/src/fence_window/handler/nc.rs — FileTooLong — 918 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 418 over it, 1.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: app/fence_options.rs crates/app/src/app/fence_options.rs — FileTooLong — 915 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 415 over it, 1.83× 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/layout.rs crates/app/src/layout.rs — FileTooLong — 905 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 405 over it, 1.81× 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.
  • + 27 more in this group — see findings.md.
D2 · Cognitive Complexity · App · ×48
  • App::create (cognitive 355) crates/app/src/app/mod.rs:851 — App::create has cognitive complexity 355 (threshold 15). Drivers by points: if/else 144 (272 pts), boolean chains 57, match/switch 13 (24 pts), loops 2 (nesting depth added 139). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::test_step (cognitive 166) crates/app/src/app/testscript.rs:104 — App::test_step has cognitive complexity 166 (threshold 15). Drivers by points: if/else 40 (119 pts), match/switch 6 (20 pts), boolean chains 16, loops 4 (11 pts) (nesting depth added 100). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::handle (cognitive 136) crates/app/src/app/mod.rs:2757 — App::handle has cognitive complexity 136 (threshold 15). Drivers by points: if/else 44 (97 pts), loops 9 (25 pts), boolean chains 13, match/switch 1 (nesting depth added 69). 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.
  • App::on_settings_message (cognitive 122) REDACTED:920 — App::on_settings_message has cognitive complexity 122 (threshold 15). Drivers by points: if/else 36 (93 pts), match/switch 8 (23 pts), boolean chains 6 (nesting depth added 72). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::show_fence_menu (cognitive 113) REDACTED:836 — App::show_fence_menu has cognitive complexity 113 (threshold 15). Drivers by points: if/else 53 (88 pts), loops 5 (13 pts), boolean chains 7, match/switch 3 (5 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::ipc_dispatch (cognitive 107) crates/app/src/app/ipc.rs:703 — App::ipc_dispatch has cognitive complexity 107 (threshold 15). Drivers by points: if/else 45 (91 pts), boolean chains 13, match/switch 2 (3 pts) (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.
  • App::apply_undo (cognitive 62) crates/app/src/app/undo.rs:376 — App::apply_undo has cognitive complexity 62 (threshold 15). Drivers by points: if/else 16 (38 pts), loops 5 (13 pts), match/switch 3 (6 pts), boolean chains 5 (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.
  • App::reflow_pushed_once (cognitive 59) crates/app/src/app/push.rs:322 — App::reflow_pushed_once has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 13, loops 5 (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.
  • App::apply_settings (cognitive 57) REDACTED:1452 — App::apply_settings has cognitive complexity 57 (threshold 15). Drivers by points: if/else 28 (35 pts), boolean chains 10, loops 4 (8 pts), match/switch 2 (4 pts) (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.
  • App::on_fileop_done (cognitive 41) crates/app/src/app/fileops.rs:287 — App::on_fileop_done has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 9 (14 pts), loops 3 (7 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.
  • App::on_fs_changed (cognitive 41) crates/app/src/app/sync.rs:245 — App::on_fs_changed has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 5 (9 pts), boolean chains 6, match/switch 2 (4 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.
  • App::finish_live_capture (cognitive 38) crates/app/src/app/live_wallpaper.rs:617 — App::finish_live_capture has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 8, loops 4 (5 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.
  • App::ipc_events_tick (cognitive 36) crates/app/src/app/ipc.rs:2989 — App::ipc_events_tick has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 7 (8 pts), match/switch 3 (7 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.
  • App::script_row_clicked (cognitive 36) REDACTED:755 — App::script_row_clicked has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 5 (7 pts), boolean chains 4, loops 1 (3 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.
  • App::detach_tab (cognitive 32) crates/app/src/app/tabs.rs:51 — App::detach_tab has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 3 (8 pts), boolean chains 4 (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.
  • App::build_item_menu (cognitive 31) REDACTED:588 — App::build_item_menu has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::drain_smart_reads (cognitive 31) crates/app/src/app/smart.rs:475 — App::drain_smart_reads has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::on_desktop_marquee (cognitive 30) crates/app/src/app/group.rs:13 — App::on_desktop_marquee has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 3, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • App::run_smart (cognitive 29) crates/app/src/app/smart.rs:257 — App::run_smart has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::apply_cell_snap (cognitive 27) crates/app/src/app/fences.rs:387 — App::apply_cell_snap has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 8 (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.
  • App::process_commands (cognitive 26) crates/app/src/app/mod.rs:2696 — App::process_commands has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::drain_scripts (cognitive 26) REDACTED:652 — App::drain_scripts has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 3 (8 pts), loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::plan_item_move (cognitive 25) crates/app/src/app/ipc.rs:2590 — App::plan_item_move has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::rank_fence_matches_now (cognitive 25) REDACTED:141 — App::rank_fence_matches_now has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (9 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.
  • App::follow_desktops (cognitive 25) crates/app/src/app/vdesktops.rs:261 — App::follow_desktops has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 5 (10 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.
  • + 23 more in this group — see findings.md.
D2 · Cognitive Complexity · pecofence · ×44
  • pecofence::fence_window::handler::mouse_move::on_mousemove (cognitive 148) crates/app/src/fence_window/handler/mouse_move.rs:5 — pecofence::fence_window::handler::mouse_move::on_mousemove has cognitive complexity 148 (threshold 15). Drivers by points: if/else 67 (104 pts), boolean chains 35, match/switch 4 (9 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.
  • pecofence::peek_search::paint_box (cognitive 79) crates/app/src/peek_search.rs:1157 — pecofence::peek_search::paint_box has cognitive complexity 79 (threshold 15). Drivers by points: if/else 41 (62 pts), boolean chains 6, loops 5 (6 pts), match/switch 3 (5 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • pecofence::app::fence_options::parse_fence_prop (cognitive 67) crates/app/src/app/fence_options.rs:267 — pecofence::app::fence_options::parse_fence_prop has cognitive complexity 67 (threshold 15). Drivers by points: match/switch 21 (43 pts), if/else 11 (21 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 33). 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.
  • pecofence::fence_window::handler::keyboard::on_keydown (cognitive 60) crates/app/src/fence_window/handler/keyboard.rs:68 — pecofence::fence_window::handler::keyboard::on_keydown has cognitive complexity 60 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 15, match/switch 2 (3 pts), loops 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.
  • pecofence::fence_window::handler::mouse::on_lbuttondown (cognitive 60) crates/app/src/fence_window/handler/mouse.rs:157 — pecofence::fence_window::handler::mouse::on_lbuttondown has cognitive complexity 60 (threshold 15). Drivers by points: if/else 30 (44 pts), boolean chains 13, match/switch 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • pecofence::note_edit::on_key (cognitive 51) crates/app/src/note_edit.rs:617 — pecofence::note_edit::on_key has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 17, match/switch 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.
  • pecofence::fence_window::handler::mouse::on_lbuttonup (cognitive 50) crates/app/src/fence_window/handler/mouse.rs:447 — pecofence::fence_window::handler::mouse::on_lbuttonup has cognitive complexity 50 (threshold 15). Drivers by points: if/else 25 (39 pts), boolean chains 7, match/switch 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • pecofence::fence_window::handler::mouse::on_mousewheel (cognitive 50) crates/app/src/fence_window/handler/mouse.rs:1154 — pecofence::fence_window::handler::mouse::on_mousewheel has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 6, loops 1 (4 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • pecofence::notice::handle (cognitive 47) crates/app/src/notice.rs:554 — pecofence::notice::handle has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 9, match/switch 2 (3 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.
  • pecofence::app::push::stack (cognitive 45) crates/app/src/app/push.rs:116 — pecofence::app::push::stack has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 4 (7 pts), match/switch 2 (5 pts), boolean chains 4 (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.
  • pecofence::fence_window::snap::size_among (cognitive 35) crates/app/src/fence_window/snap.rs:316 — pecofence::fence_window::snap::size_among has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 12 (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.
  • pecofence::fence_window::handler::nc::on_exitsizemove (cognitive 34) crates/app/src/fence_window/handler/nc.rs:816 — pecofence::fence_window::handler::nc::on_exitsizemove has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 10, 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.
  • pecofence::fence_window::handler::mouse::on_lbuttondblclk (cognitive 32) crates/app/src/fence_window/handler/mouse.rs:788 — pecofence::fence_window::handler::mouse::on_lbuttondblclk has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 5 (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.
  • pecofence::note_edit::tell_fence (cognitive 32) crates/app/src/note_edit.rs:251 — pecofence::note_edit::tell_fence has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 5 (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.
  • pecofence::marquee_offer::handle (cognitive 31) crates/app/src/marquee_offer.rs:214 — pecofence::marquee_offer::handle has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 4, match/switch 2 (3 pts) (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.
  • pecofence::peek_search::on_key (cognitive 31) crates/app/src/peek_search.rs:1695 — pecofence::peek_search::on_key has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 8, match/switch 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.
  • pecofence::fence_window::handler::nc::hit_code (cognitive 30) crates/app/src/fence_window/handler/nc.rs:89 — pecofence::fence_window::handler::nc::hit_code has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 10, 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.
  • pecofence::share_log::numeric_shape (cognitive 30) crates/app/src/share_log.rs:164 — pecofence::share_log::numeric_shape has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (7 pts), boolean chains 4 (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.
  • pecofence::fence_window::handler::nc::on_ncmousemove (cognitive 29) crates/app/src/fence_window/handler/nc.rs:194 — pecofence::fence_window::handler::nc::on_ncmousemove has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 9 (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.
  • pecofence::fence_window::handler::mouse::on_capturechanged (cognitive 28) crates/app/src/fence_window/handler/mouse.rs:714 — pecofence::fence_window::handler::mouse::on_capturechanged has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, loops 1 (3 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.
  • pecofence::peek_search::build (cognitive 27) crates/app/src/peek_search.rs:875 — pecofence::peek_search::build has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • pecofence::app::ipc::patch_settings_path (cognitive 25) crates/app/src/app/ipc.rs:294 — pecofence::app::ipc::patch_settings_path has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 10 (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.
  • pecofence::app::visuals::tray_icon_image (cognitive 25) crates/app/src/app/visuals.rs:932 — pecofence::app::visuals::tray_icon_image has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 6 (11 pts), boolean chains 1 (nesting depth added 11). 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.
  • pecofence::fence_window::handler::mouse::on_mouseleave (cognitive 23) crates/app/src/fence_window/handler/mouse.rs:74 — pecofence::fence_window::handler::mouse::on_mouseleave has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7 (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.
  • pecofence::app::live_wallpaper::capture_and_build (cognitive 22) crates/app/src/app/live_wallpaper.rs:138 — pecofence::app::live_wallpaper::capture_and_build has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 3 (13 pts), if/else 3 (8 pts), loops 1 (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • + 19 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file extras/pecofence-promo/src/trailer/scenes/Opening.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/scripts/make-energy-audio.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/trailer/scenes/Agent.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/scripts/make-assets.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/trailer/TrailerFilm.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/scripts/prepare-isolated-build.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/trailer/scenes/AutoSort.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/trailer/Type.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/design.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/trailer/Stage.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/trailer/scenes/Tabs.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/scripts/render.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/trailer/scenes/EndCard.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/scripts/prepare-autosort-media.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/trailer/timing.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/motion/TechField.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/features/common.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/scripts/finish-trailer.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/motion/Groups.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file ui/i18n.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/motion/Tabs.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/motion/Closing.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/motion/Hero.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/motion/NewFiles.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extras/pecofence-promo/src/Root.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
D1 · Cyclomatic Complexity · App · ×31
  • App::create (cyclomatic 291) crates/app/src/app/mod.rs:851 — App::create has cyclomatic complexity 291 (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.
  • App::handle (cyclomatic 182) crates/app/src/app/mod.rs:2757 — App::handle has cyclomatic complexity 182 (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.
  • App::test_step (cyclomatic 117) crates/app/src/app/testscript.rs:104 — App::test_step has cyclomatic complexity 117 (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.
  • App::show_fence_menu (cyclomatic 110) REDACTED:836 — App::show_fence_menu has cyclomatic complexity 110 (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.
  • App::ipc_dispatch (cyclomatic 107) crates/app/src/app/ipc.rs:703 — App::ipc_dispatch 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.
  • App::on_settings_message (cyclomatic 97) REDACTED:920 — App::on_settings_message has cyclomatic complexity 97 (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.
  • App::apply_settings (cyclomatic 45) REDACTED:1452 — App::apply_settings 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.
  • App::apply_fence_prop (cyclomatic 42) crates/app/src/app/fence_options.rs:1155 — App::apply_fence_prop has cyclomatic complexity 42 (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.
  • App::apply_undo (cyclomatic 40) crates/app/src/app/undo.rs:376 — App::apply_undo has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • App::reflow_pushed_once (cyclomatic 39) crates/app/src/app/push.rs:322 — App::reflow_pushed_once has cyclomatic complexity 39 (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.
  • App::on_fileop_done (cyclomatic 35) crates/app/src/app/fileops.rs:287 — App::on_fileop_done 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.
  • App::script_row_clicked (cyclomatic 32) REDACTED:755 — App::script_row_clicked 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.
  • App::show_item_menu (cyclomatic 31) REDACTED:461 — App::show_item_menu 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.
  • App::show_tray_menu (cyclomatic 27) REDACTED:268 — App::show_tray_menu has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • App::finish_live_capture (cyclomatic 26) crates/app/src/app/live_wallpaper.rs:617 — App::finish_live_capture 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.
  • App::on_fs_changed (cyclomatic 25) crates/app/src/app/sync.rs:245 — App::on_fs_changed 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.
  • App::apply_cell_snap (cyclomatic 24) crates/app/src/app/fences.rs:387 — App::apply_cell_snap has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • App::ipc_events_tick (cyclomatic 23) crates/app/src/app/ipc.rs:2989 — App::ipc_events_tick 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.
  • App::on_desktop_marquee (cyclomatic 20) crates/app/src/app/group.rs:13 — App::on_desktop_marquee 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.
  • App::plan_item_move (cyclomatic 20) crates/app/src/app/ipc.rs:2590 — App::plan_item_move 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.
  • App::on_editor_message (cyclomatic 20) crates/app/src/app/smart_editor.rs:149 — App::on_editor_message 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.
  • App::detach_tab (cyclomatic 20) crates/app/src/app/tabs.rs:51 — App::detach_tab 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.
  • App::build_item_menu (cyclomatic 19) REDACTED:588 — App::build_item_menu 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.
  • App::show_search_actions (cyclomatic 19) REDACTED:797 — App::show_search_actions 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.
  • App::run_smart (cyclomatic 19) crates/app/src/app/smart.rs:257 — App::run_smart 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.
  • + 6 more in this group — see findings.md.
D1 · Cyclomatic Complexity · pecofence · ×29
  • pecofence::fence_window::handler::mouse_move::on_mousemove (cyclomatic 104) crates/app/src/fence_window/handler/mouse_move.rs:5 — pecofence::fence_window::handler::mouse_move::on_mousemove has cyclomatic complexity 104 (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.
  • pecofence::app::fence_options::parse_fence_prop (cyclomatic 101) crates/app/src/app/fence_options.rs:267 — pecofence::app::fence_options::parse_fence_prop has cyclomatic complexity 101 (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.
  • pecofence::fence_window::handler::keyboard::on_keydown (cyclomatic 63) crates/app/src/fence_window/handler/keyboard.rs:68 — pecofence::fence_window::handler::keyboard::on_keydown has cyclomatic complexity 63 (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.
  • pecofence::peek_search::paint_box (cyclomatic 48) crates/app/src/peek_search.rs:1157 — pecofence::peek_search::paint_box 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.
  • pecofence::fence_window::handler::mouse::on_lbuttondown (cyclomatic 43) crates/app/src/fence_window/handler/mouse.rs:157 — pecofence::fence_window::handler::mouse::on_lbuttondown 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.
  • pecofence::fence_window::handler::mouse::on_lbuttonup (cyclomatic 42) crates/app/src/fence_window/handler/mouse.rs:447 — pecofence::fence_window::handler::mouse::on_lbuttonup 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.
  • pecofence::notice::handle (cyclomatic 40) crates/app/src/notice.rs:554 — pecofence::notice::handle has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • pecofence::note_edit::on_key (cyclomatic 39) crates/app/src/note_edit.rs:617 — pecofence::note_edit::on_key has cyclomatic complexity 39 (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.
  • pecofence::peek_search::build (cyclomatic 36) crates/app/src/peek_search.rs:875 — pecofence::peek_search::build has cyclomatic complexity 36 (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.
  • pecofence::peek_search::on_key (cyclomatic 33) crates/app/src/peek_search.rs:1695 — pecofence::peek_search::on_key has cyclomatic complexity 33 (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.
  • pecofence::fence_window::snap::size_among (cyclomatic 29) crates/app/src/fence_window/snap.rs:316 — pecofence::fence_window::snap::size_among has cyclomatic complexity 29 (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.
  • pecofence::fence_window::handler::nc::on_exitsizemove (cyclomatic 27) crates/app/src/fence_window/handler/nc.rs:816 — pecofence::fence_window::handler::nc::on_exitsizemove 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.
  • pecofence::marquee_offer::handle (cyclomatic 27) crates/app/src/marquee_offer.rs:214 — pecofence::marquee_offer::handle 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.
  • pecofence::fence_window::handler::nc::hit_code (cyclomatic 25) crates/app/src/fence_window/handler/nc.rs:89 — pecofence::fence_window::handler::nc::hit_code 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.
  • pecofence::rename::begin_rename_at (cyclomatic 25) crates/app/src/rename.rs:482 — pecofence::rename::begin_rename_at 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.
  • pecofence::app::ipc::patch_settings_path (cyclomatic 23) crates/app/src/app/ipc.rs:294 — pecofence::app::ipc::patch_settings_path 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.
  • pecofence::app::push::stack (cyclomatic 23) crates/app/src/app/push.rs:116 — pecofence::app::push::stack 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.
  • pecofence::fence_window::handler::mouse::on_mousewheel (cyclomatic 23) crates/app/src/fence_window/handler/mouse.rs:1154 — pecofence::fence_window::handler::mouse::on_mousewheel 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.
  • pecofence::note_edit::tell_fence (cyclomatic 23) crates/app/src/note_edit.rs:251 — pecofence::note_edit::tell_fence 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.
  • pecofence::fence_window::handler::nc::on_ncmousemove (cyclomatic 22) crates/app/src/fence_window/handler/nc.rs:194 — pecofence::fence_window::handler::nc::on_ncmousemove 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.
  • pecofence::fence_window::hit::resize_edge_at (cyclomatic 21) crates/app/src/fence_window/hit.rs:26 — pecofence::fence_window::hit::resize_edge_at 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.
  • pecofence::fence_window::window_drag::flush_window_drag (cyclomatic 21) crates/app/src/fence_window/window_drag.rs:48 — pecofence::fence_window::window_drag::flush_window_drag 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.
  • pecofence::fence_window::handler::mouse::on_lbuttondblclk (cyclomatic 20) crates/app/src/fence_window/handler/mouse.rs:788 — pecofence::fence_window::handler::mouse::on_lbuttondblclk 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.
  • pecofence::app::visuals::monitor_recipes (cyclomatic 17) crates/app/src/app/visuals.rs:394 — pecofence::app::visuals::monitor_recipes 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.
  • pecofence::fence_window::handler::mouse::on_mouseleave (cyclomatic 17) crates/app/src/fence_window/handler/mouse.rs:74 — pecofence::fence_window::handler::mouse::on_mouseleave 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.
  • + 4 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×25
  • Duplicated block (10 lines × 3) crates/platform/src/bindings.rs:11733 — crates/platform/src/bindings.rs:11733-11742 | crates/platform/src/bindings.rs:11782-11791 | crates/platform/src/bindings.rs:11807-11816 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:11733` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:2471 — crates/render/src/comp.rs:2471-2480 | crates/render/src/comp.rs:3905-3914 | crates/render/src/comp.rs:12586-12595 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:2495 — crates/render/src/comp.rs:2495-2504 | crates/render/src/comp.rs:3929-3938 | crates/render/src/comp.rs:12610-12619 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:2519 — crates/render/src/comp.rs:2519-2528 | crates/render/src/comp.rs:3953-3962 | crates/render/src/comp.rs:12634-12643 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:2540 — crates/render/src/comp.rs:2540-2549 | crates/render/src/comp.rs:3974-3983 | crates/render/src/comp.rs:12655-12664 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:2561 — crates/render/src/comp.rs:2561-2570 | crates/render/src/comp.rs:3995-4004 | crates/render/src/comp.rs:12676-12685 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:2582 — crates/render/src/comp.rs:2582-2591 | crates/render/src/comp.rs:4016-4025 | crates/render/src/comp.rs:12697-12706 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:2603 — crates/render/src/comp.rs:2603-2612 | crates/render/src/comp.rs:4037-4046 | crates/render/src/comp.rs:12718-12727 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:7851 — crates/render/src/comp.rs:7851-7860 | crates/render/src/comp.rs:13667-13676 | crates/render/src/comp.rs:18070-18079 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:7875 — crates/render/src/comp.rs:7875-7884 | crates/render/src/comp.rs:13691-13700 | crates/render/src/comp.rs:18094-18103 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:7899 — crates/render/src/comp.rs:7899-7908 | crates/render/src/comp.rs:13715-13724 | crates/render/src/comp.rs:18118-18127 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:7920 — crates/render/src/comp.rs:7920-7929 | crates/render/src/comp.rs:13736-13745 | crates/render/src/comp.rs:18139-18148 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:7944 — crates/render/src/comp.rs:7944-7953 | crates/render/src/comp.rs:13760-13769 | crates/render/src/comp.rs:18163-18172 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:7968 — crates/render/src/comp.rs:7968-7977 | crates/render/src/comp.rs:13784-13793 | crates/render/src/comp.rs:18187-18196 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:7992 — crates/render/src/comp.rs:7992-8001 | crates/render/src/comp.rs:13808-13817 | crates/render/src/comp.rs:18211-18220 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:8013 — crates/render/src/comp.rs:8013-8022 | crates/render/src/comp.rs:13829-13838 | crates/render/src/comp.rs:18232-18241 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:8034 — crates/render/src/comp.rs:8034-8043 | crates/render/src/comp.rs:13850-13859 | crates/render/src/comp.rs:18253-18262 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:8055 — crates/render/src/comp.rs:8055-8064 | crates/render/src/comp.rs:13871-13880 | crates/render/src/comp.rs:18274-18283 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:8076 — crates/render/src/comp.rs:8076-8085 | crates/render/src/comp.rs:13892-13901 | crates/render/src/comp.rs:18295-18304 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:8087 — crates/render/src/comp.rs:8087-8096 | crates/render/src/comp.rs:13903-13912 | crates/render/src/comp.rs:18306-18315 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:8108 — crates/render/src/comp.rs:8108-8117 | crates/render/src/comp.rs:13924-13933 | crates/render/src/comp.rs:18327-18336 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:8129 — crates/render/src/comp.rs:8129-8138 | crates/render/src/comp.rs:13945-13954 | crates/render/src/comp.rs:18348-18357 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:8153 — crates/render/src/comp.rs:8153-8162 | crates/render/src/comp.rs:13969-13978 | crates/render/src/comp.rs:18372-18381 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:8174 — crates/render/src/comp.rs:8174-8183 | crates/render/src/comp.rs:13990-13999 | crates/render/src/comp.rs:18393-18402 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) crates/render/src/comp.rs:8195 — crates/render/src/comp.rs:8195-8204 | crates/render/src/comp.rs:14011-14020 | crates/render/src/comp.rs:18414-18423 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D3 · God Classes · TooManyFields · ×21
  • TooManyFields: FenceViewState crates/app/src/fence_window/state.rs:99 — TooManyFields — 265 stored fields beside 339 methods. The bar is 30 stored fields; this is 235 over it, 8.83× 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: App crates/app/src/app/mod.rs:346 — TooManyFields — 133 stored fields beside 660 methods. The bar is 30 stored fields; this is 103 over it, 4.43× 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: ID3D11DeviceContext_Vtbl crates/render/src/gpu_bindings.rs:7965 — TooManyFields — 109 stored fields. The bar is 30 stored fields; this is 79 over it, 3.63× 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: ID2D1RenderTarget_Vtbl crates/platform/src/bindings.rs:5993 — TooManyFields — 54 stored fields. The bar is 30 stored fields; this is 24 over it, 1.80× 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: ID2D1RenderTarget_Vtbl crates/render/src/gpu_bindings.rs:3914 — TooManyFields — 54 stored fields. The bar is 30 stored fields; this is 24 over it, 1.80× 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: FenceDto crates/ipc/src/dto.rs:173 — TooManyFields — 51 stored fields. The bar is 30 stored fields; this is 21 over it, 1.70× 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: CONTEXT crates/platform/src/bindings.rs:3396 — TooManyFields — 46 stored fields. The bar is 30 stored fields; this is 16 over it, 1.53× 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: Session crates/app/src/peek_search.rs:349 — TooManyFields — 43 stored fields beside 7 methods. The bar is 30 stored fields; this is 13 over it, 1.43× 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: ID3D11Device_Vtbl crates/render/src/gpu_bindings.rs:5056 — TooManyFields — 41 stored fields beside 2 methods. The bar is 30 stored fields; this is 11 over it, 1.37× 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: MIB_IF_ROW2 crates/platform/src/bindings.rs:18058 — TooManyFields — 41 stored fields. The bar is 30 stored fields; this is 11 over it, 1.37× 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: DWM_TIMING_INFO crates/platform/src/bindings.rs:4145 — TooManyFields — 40 stored fields. The bar is 30 stored fields; this is 10 over it, 1.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: IDWriteTextLayout_Vtbl crates/platform/src/bindings.rs:6387 — TooManyFields — 40 stored fields. The bar is 30 stored fields; this is 10 over it, 1.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: IDWriteTextLayout_Vtbl crates/render/src/gpu_bindings.rs:8808 — TooManyFields — 40 stored fields. The bar is 30 stored fields; this is 10 over it, 1.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: DesktopAnchor crates/app/src/anchor.rs:338 — TooManyFields — 38 stored fields beside 71 methods. 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.
  • TooManyFields: Theme crates/render/src/theme.rs:20 — TooManyFields — 37 stored fields beside 36 methods. The bar is 30 stored fields; this is 7 over it, 1.23× 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: IP_ADAPTER_ADDRESSES_LH crates/platform/src/bindings.rs:10983 — TooManyFields — 36 stored fields. The bar is 30 stored fields; this is 6 over it, 1.20× 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: ID2D1DeviceContext_Vtbl crates/render/src/gpu_bindings.rs:1999 — TooManyFields — 36 stored fields. The bar is 30 stored fields; this is 6 over it, 1.20× 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: IVisual_Vtbl crates/render/src/comp.rs:12075 — TooManyFields — 34 stored fields. The bar is 30 stored fields; this is 4 over it, 1.13× 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: Behavior crates/app/src/fence_window/mod.rs:135 — TooManyFields — 31 stored fields beside 10 methods. The bar is 30 stored fields; this is 1 over it, 1.03× 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: ARM64_NT_CONTEXT_0_0 crates/platform/src/bindings.rs:3056 — TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× 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: ARM64_NT_CONTEXT_0_0 crates/platform/src/bindings.rs:3128 — TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× 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.
D3 · God Classes · TooManyMethods · ×20
  • TooManyMethods: App crates/app/src/app/mod.rs:346 — TooManyMethods — 660 methods, declared across 38 files: app/ipc.rs (55), app/fences.rs (50), REDACTED (42), app/smart.rs (38), +34 more file(s). The bar is 30 methods; this is 630 over it, 22.00× 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: FenceViewState crates/app/src/fence_window/state.rs:99 — TooManyMethods — 339 methods, declared across 13 files: fence_window/render.rs (55), fence_window/hit.rs (49), fence_window/tabs.rs (37), fence_window/scroll.rs (36), +9 more file(s). The bar is 30 methods; this is 309 over it, 11.30× 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: AppState crates/app/src/state.rs:24 — TooManyMethods — 170 methods. The bar is 30 methods; this is 140 over it, 5.67× 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: FenceWindow crates/app/src/fence_window/api.rs:5 — TooManyMethods — 156 methods, declared across 3 files: fence_window/api.rs (153), fence_window/frame.rs (2), handler/mod.rs (1). The bar is 30 methods; this is 126 over it, 5.20× 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: FenceChrome crates/render/src/fence_chrome.rs:87 — TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.47× 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: DesktopAnchor crates/app/src/anchor.rs:338 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 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.
  • TooManyMethods: SpriteVisual crates/render/src/comp.rs:17887 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: ContainerVisual crates/render/src/comp.rs:7692 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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: LayerVisual crates/render/src/comp.rs:13512 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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: Compositor crates/render/src/comp.rs:7057 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× 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: Visual crates/render/src/comp.rs:21255 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× 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: ColorKeyFrameAnimation crates/render/src/comp.rs:741 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× 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: ScalarKeyFrameAnimation crates/render/src/comp.rs:15540 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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: Vector2KeyFrameAnimation crates/render/src/comp.rs:18801 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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: Vector3KeyFrameAnimation crates/render/src/comp.rs:19750 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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: KeyFrameAnimation crates/render/src/comp.rs:12968 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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: QuaternionKeyFrameAnimation crates/render/src/comp.rs:14984 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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: Vector4KeyFrameAnimation crates/render/src/comp.rs:20699 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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: Theme crates/render/src/theme.rs:20 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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: InsetClip crates/render/src/comp.rs:12572 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× 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.
D2 · Cognitive Complexity · FenceViewState · ×18
  • FenceViewState::replace_items (cognitive 79) crates/app/src/fence_window/items.rs:309 — FenceViewState::replace_items has cognitive complexity 79 (threshold 15). Drivers by points: if/else 33 (47 pts), boolean chains 25, loops 3 (5 pts), 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.
  • FenceViewState::ensure_icons_and_labels (cognitive 30) crates/app/src/fence_window/render.rs:1280 — FenceViewState::ensure_icons_and_labels has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (3 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.
  • FenceViewState::start_roll_anim (cognitive 30) crates/app/src/fence_window/roll.rs:759 — FenceViewState::start_roll_anim has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23 (27 pts), boolean chains 3 (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.
  • FenceViewState::tip_text (cognitive 24) crates/app/src/fence_window/tooltip.rs:181 — FenceViewState::tip_text has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, match/switch 3 (4 pts) (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.
  • FenceViewState::tick (cognitive 23) crates/app/src/fence_window/frame.rs:12 — FenceViewState::tick has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (20 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.
  • FenceViewState::up_button_at (cognitive 23) crates/app/src/fence_window/hit.rs:152 — FenceViewState::up_button_at has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, 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.
  • FenceViewState::reflow_items (cognitive 23) crates/app/src/fence_window/items.rs:787 — FenceViewState::reflow_items has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (4 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.
  • FenceViewState::remap_item_state (cognitive 21) crates/app/src/fence_window/items.rs:924 — FenceViewState::remap_item_state has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 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.
  • FenceViewState::item_alphas (cognitive 21) crates/app/src/fence_window/render.rs:451 — FenceViewState::item_alphas has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (4 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.
  • FenceViewState::draw_chrome_panel (cognitive 21) crates/app/src/fence_window/render.rs:890 — FenceViewState::draw_chrome_panel has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 6, match/switch 4. 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.
  • FenceViewState::redraw_content (cognitive 20) crates/app/src/fence_window/render.rs:1961 — FenceViewState::redraw_content has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 5, match/switch 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.
  • FenceViewState::update_backdrop_at (cognitive 19) crates/app/src/fence_window/render.rs:1100 — FenceViewState::update_backdrop_at has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9 (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.
  • FenceViewState::material_foreground (cognitive 18) crates/app/src/fence_window/render.rs:284 — FenceViewState::material_foreground has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, 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.
  • FenceViewState::tab_rects_with_gap (cognitive 18) crates/app/src/fence_window/tabs.rs:459 — FenceViewState::tab_rects_with_gap has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, 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.
  • FenceViewState::sync_tab_slides (cognitive 18) crates/app/src/fence_window/tabs.rs:1123 — FenceViewState::sync_tab_slides has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (2 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.
  • FenceViewState::set_drop_feedback (cognitive 17) crates/app/src/fence_window/dnd.rs:1482 — FenceViewState::set_drop_feedback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, 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.
  • FenceViewState::set_scrollbar_zone (cognitive 17) crates/app/src/fence_window/scroll.rs:737 — FenceViewState::set_scrollbar_zone has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 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.
  • FenceViewState::redraw_rows (cognitive 16) crates/app/src/fence_window/render.rs:2207 — FenceViewState::redraw_rows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 5, match/switch 3, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body into named stages: move each independent 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 · ClassTooLong · ×18
  • ClassTooLong: FenceChrome crates/render/src/fence_chrome.rs:87 — ClassTooLong — 2722 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 74 methods, 6 blocks, lines 87-5911. The bar is 400 significant lines; this is 2322 over it, 6.81× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FenceWindow crates/app/src/fence_window/api.rs:5 — ClassTooLong — 2134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 156 methods, 3 blocks, lines 5-3334. The bar is 400 significant lines; this is 1734 over it, 5.34× 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: DesktopAnchor crates/app/src/anchor.rs:338 — ClassTooLong — 1260 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 71 methods, 3 blocks, lines 338-2359. The bar is 400 significant lines; this is 860 over it, 3.15× 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: ID3D11Device_Vtbl crates/render/src/gpu_bindings.rs:5056 — ClassTooLong — 948 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods, 2 blocks, lines 5056-6337. The bar is 400 significant lines; this is 548 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: IWICImagingFactory_Vtbl crates/platform/src/bindings.rs:16889 — ClassTooLong — 664 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods, 2 blocks, lines 16889-17777. The bar is 400 significant lines; this is 264 over it, 1.66× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FenceDropHandler crates/app/src/fence_window/dnd.rs:373 — ClassTooLong — 515 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 6 methods, 3 blocks, lines 373-1153. The bar is 400 significant lines; this is 115 over it, 1.29× 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: Theme crates/render/src/theme.rs:20 — ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 36 methods, 2 blocks, lines 20-1059. The bar is 400 significant lines; this is 104 over it, 1.26× 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: FenceViewState crates/app/src/fence_window/state.rs:99 — ClassTooLong — 497 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 339 methods, 2 blocks, lines 99-1091. The bar is 400 significant lines; this is 97 over it, 1.24× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Compositor crates/render/src/comp.rs:7057 — ClassTooLong — 473 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 50 methods, 4 blocks, lines 7063-7687. The bar is 400 significant lines; this is 73 over it, 1.18× 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: SpriteVisual crates/render/src/comp.rs:17887 — ClassTooLong — 453 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 53 methods, 4 blocks, lines 17900-18522. The bar is 400 significant lines; this is 53 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.
  • ClassTooLong: ColorKeyFrameAnimation crates/render/src/comp.rs:741 — ClassTooLong — 446 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, 4 blocks, lines 755-1349. The bar is 400 significant lines; this is 46 over it, 1.12× 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: LayerVisual crates/render/src/comp.rs:13512 — ClassTooLong — 438 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 51 methods, 4 blocks, lines 13519-14119. The bar is 400 significant lines; this is 38 over it, 1.10× 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: ContainerVisual crates/render/src/comp.rs:7692 — ClassTooLong — 437 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 51 methods, 4 blocks, lines 7704-8303. The bar is 400 significant lines; this is 37 over it, 1.09× 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: ScalarKeyFrameAnimation crates/render/src/comp.rs:15540 — ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 44 methods, 4 blocks, lines 15554-16126. The bar is 400 significant lines; this is 30 over it, 1.08× 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: Vector2KeyFrameAnimation crates/render/src/comp.rs:18801 — ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 44 methods, 4 blocks, lines 18815-19387. The bar is 400 significant lines; this is 30 over it, 1.08× 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: Vector3KeyFrameAnimation crates/render/src/comp.rs:19750 — ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 44 methods, 4 blocks, lines 19764-20336. The bar is 400 significant lines; this is 30 over it, 1.08× 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: QuaternionKeyFrameAnimation crates/render/src/comp.rs:14984 — ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 42 methods, 4 blocks, lines 14996-15535. The bar is 400 significant lines; this is 4 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.
  • ClassTooLong: Vector4KeyFrameAnimation crates/render/src/comp.rs:20699 — ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 42 methods, 4 blocks, lines 20711-21250. The bar is 400 significant lines; this is 4 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×14
  • Duplicated block (7 lines × 2) crates/app/src/app/fences.rs:1029 — crates/app/src/app/fences.rs:1029-1035 | crates/app/src/app/ipc.rs:2575-2581 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/app/fences.rs:1029` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn add_template(&mut` in one and `&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) crates/app/src/fence_window/render.rs:2078 — crates/app/src/fence_window/render.rs:2078-2084 | crates/app/src/fence_window/render.rs:2307-2313 — 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/app/src/fence_window/roll.rs:410 — crates/app/src/fence_window/roll.rs:410-416 | crates/app/src/fence_window/roll.rs:464-470 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/fence_window/roll.rs:410` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn start_fade_in(&mut` in one and `super) fn begin_fade_out(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) crates/platform/src/bindings.rs:6636 — crates/platform/src/bindings.rs:6636-6642 | crates/platform/src/bindings.rs:6653-6659 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:6636` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) crates/platform/src/bindings.rs:17177 — crates/platform/src/bindings.rs:17177-17183 | crates/platform/src/bindings.rs:17204-17210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:17177` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) crates/platform/src/bindings.rs:17512 — crates/platform/src/bindings.rs:17512-17518 | crates/platform/src/bindings.rs:17623-17629 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:17512` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) crates/render/src/comp.rs:11547 — crates/render/src/comp.rs:11547-11553 | crates/render/src/comp.rs:11591-11597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/comp.rs:11547` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/render/src/fence_chrome.rs:4907 — crates/render/src/fence_chrome.rs:4907-4913 | crates/render/src/fence_chrome.rs:5339-5345 — 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/app/src/fence_window/dnd.rs:1232 — crates/app/src/fence_window/dnd.rs:1232-1238 | crates/app/src/fence_window/dnd.rs:1272-1278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/fence_window/dnd.rs:1232` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn note_drop_landing(&mut` in one and `super) fn note_landing_at(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) crates/app/src/note_edit.rs:490 — crates/app/src/note_edit.rs:490-496 | crates/app/src/note_edit.rs:526-532 — 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/render/src/fence_chrome.rs:3359 — crates/render/src/fence_chrome.rs:3359-3365 | crates/render/src/fence_chrome.rs:3910-3916 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/fence_chrome.rs:3359` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/platform/src/bindings.rs:2402 — crates/platform/src/bindings.rs:2402-2408 | crates/platform/src/store_bindings.rs:8-14 — 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/app/src/app/ipc.rs:1417 — crates/app/src/app/ipc.rs:1417-1423 | crates/app/src/app/ipc.rs:1550-1556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/app/ipc.rs:1417` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) REDACTED:1189 — REDACTED:1189-1195 | REDACTED:1202-1208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1189` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn toggle_note_line(&mut` in one and `super) fn move_note_line(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D3 · God Classes · FunctionTooLong · ×13
  • FunctionTooLong: pecofence::fence_window::handler::mouse_move::on_mousemove crates/app/src/fence_window/handler/mouse_move.rs:5 — FunctionTooLong — pecofence::fence_window::handler::mouse_move::on_mousemove runs 405 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 305 over it, 4.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: settings.html.esc ui/settings.html:2469 — FunctionTooLong — esc runs 333 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 233 over it, 3.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: pecofence::app::fence_options::parse_fence_prop crates/app/src/app/fence_options.rs:267 — FunctionTooLong — pecofence::app::fence_options::parse_fence_prop runs 225 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: pecofence::fence_window::handler::keyboard::on_keydown crates/app/src/fence_window/handler/keyboard.rs:68 — FunctionTooLong — pecofence::fence_window::handler::keyboard::on_keydown runs 199 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 99 over it, 1.99× 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: pecofence::fence_window::handler::mouse::on_lbuttondown crates/app/src/fence_window/handler/mouse.rs:157 — FunctionTooLong — pecofence::fence_window::handler::mouse::on_lbuttondown runs 198 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: pecofence_render::fence_chrome::draw_plate crates/render/src/fence_chrome.rs:1122 — FunctionTooLong — pecofence_render::fence_chrome::draw_plate runs 194 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: pecofence::fence_window::handler::mouse::on_lbuttonup crates/app/src/fence_window/handler/mouse.rs:447 — FunctionTooLong — pecofence::fence_window::handler::mouse::on_lbuttonup 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: pecofence_cli::run::run_fence crates/cli/src/run.rs:206 — FunctionTooLong — pecofence_cli::run::run_fence runs 170 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 70 over it, 1.70× 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: pecofence_core::config_store::lint crates/core/src/config_store.rs:684 — FunctionTooLong — pecofence_core::config_store::lint runs 153 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 53 over it, 1.53× 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: pecofence::notice::handle crates/app/src/notice.rs:554 — FunctionTooLong — pecofence::notice::handle runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: pecofence::rename::begin_rename_at crates/app/src/rename.rs:482 — FunctionTooLong — pecofence::rename::begin_rename_at runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: pecofence::fence_window::window_drag::flush_window_drag crates/app/src/fence_window/window_drag.rs:48 — FunctionTooLong — pecofence::fence_window::window_drag::flush_window_drag runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: pecofence::filter_box::open crates/app/src/filter_box.rs:120 — FunctionTooLong — pecofence::filter_box::open runs 109 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 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×13
  • Duplicated block (6 lines × 2) crates/app/src/app/testscript.rs:166 — crates/app/src/app/testscript.rs:166-171 | crates/app/src/app/testscript.rs:196-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/app/testscript.rs:166` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/app/src/app/testscript.rs:173` calls `display` and `crates/app/src/app/testscript.rs:203` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) crates/app/src/fence_window/render.rs:2130 — crates/app/src/fence_window/render.rs:2130-2135 | crates/app/src/fence_window/render.rs:2354-2359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/app/src/fence_window/render.rs:2136` calls `Some`, `label_inset` and `crates/app/src/fence_window/render.rs:2360` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) crates/app/src/marquee_offer.rs:154 — crates/app/src/marquee_offer.rs:154-159 | crates/app/src/notice.rs:296-301 — 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/platform/src/bindings.rs:10547 — crates/platform/src/bindings.rs:10547-10552 | crates/platform/src/bindings.rs:10598-10603 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:10547` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) crates/render/src/fence_chrome.rs:1693 — crates/render/src/fence_chrome.rs:1693-1698 | crates/render/src/fence_chrome.rs:1700-1705 — 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/app/src/filter_box.rs:282 — crates/app/src/filter_box.rs:282-287 | crates/app/src/rename.rs:466-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/filter_box.rs:282` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/app/src/marquee_offer.rs:79 — crates/app/src/marquee_offer.rs:79-84 | crates/app/src/notice.rs:150-155 — 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/platform/src/dragdrop.rs:1477 — crates/platform/src/dragdrop.rs:1477-1482 | crates/platform/src/tray.rs:323-328 — 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) REDACTED:466 — REDACTED:466-471 | REDACTED:1655-1661 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1655` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn show_item_menu(&mut` in one and `super) fn show_header_menu(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) crates/app/src/fence_window/dnd.rs:1764 — crates/app/src/fence_window/dnd.rs:1764-1769 | crates/app/src/fence_window/render.rs:2345-2350 — 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/cli/src/client.rs:53 — crates/cli/src/client.rs:53-58 | crates/cli/src/client.rs:90-95 — 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/render/src/backdrop.rs:61 — crates/render/src/backdrop.rs:61-66 | crates/render/src/backdrop.rs:85-90 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) extras/pecofence-promo/scripts/prepare-trailer-fixtures.py:74 — extras/pecofence-promo/scripts/prepare-trailer-fixtures.py:74-79 | scripts/prepare-store-v2.py:154-159 — 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 (5 lines × 2) · ×12
  • Duplicated block (5 lines × 2) crates/app/src/app/ipc.rs:2429 — crates/app/src/app/ipc.rs:2429-2434 | crates/app/src/app/undo.rs:605-609 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `&mut` in one and `super) fn put_fence_at(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) crates/app/src/fence_window/state.rs:903 — crates/app/src/fence_window/state.rs:903-907 | crates/app/src/fence_window/state.rs:961-965 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/fence_window/state.rs:903` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/platform/src/bindings.rs:14605 — crates/platform/src/bindings.rs:14605-14609 | crates/platform/src/bindings.rs:14692-14696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:14605` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) crates/app/src/app/items.rs:1398 — crates/app/src/app/items.rs:1398-1402 | crates/app/src/fence_window/dnd.rs:122-126 — 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/app/src/app/rating.rs:46 — crates/app/src/app/rating.rs:46-50 | crates/watchdog/src/main.rs:54-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) REDACTED:472 — REDACTED:472-476 | REDACTED:881-886 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:472` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn show_item_menu(&mut` in one and `super) fn show_search_actions(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) crates/app/src/app/live_wallpaper.rs:578 — crates/app/src/app/live_wallpaper.rs:578-582 | crates/app/src/app/visuals.rs:1091-1095 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/app/live_wallpaper.rs:578` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn capture_live_wallpapers(&mut` in one and `super) fn prewarm_wallpapers(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/app/src/app/visuals.rs:1089` calls `clone` and `crates/app/src/app/live_wallpaper.rs:576` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) crates/app/src/app/testscript.rs:158 — crates/app/src/app/testscript.rs:158-162 | crates/app/src/app/testscript.rs:185-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/app/testscript.rs:158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/app/src/note_edit.rs:255 — crates/app/src/note_edit.rs:255-259 | crates/app/src/note_edit.rs:657-661 — 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/app/src/rename.rs:106 — crates/app/src/rename.rs:106-110 | crates/app/src/rename.rs:365-369 — 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/app/src/state.rs:3544 — crates/app/src/state.rs:3544-3548 | crates/app/src/state.rs:3549-3553 — 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/render/src/fence_chrome.rs:3317 — crates/render/src/fence_chrome.rs:3317-3321 | crates/render/src/fence_chrome.rs:3869-3873 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/fence_chrome.rs:3317` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×11
  • Duplicated block (9 lines × 2) crates/app/src/app/arrange.rs:204 — crates/app/src/app/arrange.rs:204-212 | crates/app/src/app/fences.rs:545-553 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn move_out_of_overlap(&mut` in one and `super) fn arrange_desktop_fence(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) REDACTED:176 — REDACTED:176-184 | REDACTED:363-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/platform/src/bindings.rs:9134 — crates/platform/src/bindings.rs:9134-9142 | crates/platform/src/bindings.rs:9153-9161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:9134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/platform/src/bindings.rs:10166 — crates/platform/src/bindings.rs:10166-10174 | crates/platform/src/bindings.rs:10179-10187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:10166` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/platform/src/bindings.rs:10614 — crates/platform/src/bindings.rs:10614-10622 | crates/platform/src/bindings.rs:10633-10641 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:10614` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/platform/src/bindings.rs:14109 — crates/platform/src/bindings.rs:14109-14117 | crates/platform/src/bindings.rs:14141-14149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:14109` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/platform/src/bindings.rs:14128 — crates/platform/src/bindings.rs:14128-14136 | crates/platform/src/bindings.rs:14160-14168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:14128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/platform/src/bindings.rs:15868 — crates/platform/src/bindings.rs:15868-15876 | crates/platform/src/bindings.rs:15908-15916 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:15868` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/platform/src/bindings.rs:17644 — crates/platform/src/bindings.rs:17644-17652 | crates/platform/src/bindings.rs:17667-17675 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:17644` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/render/src/gpu_bindings.rs:2960 — crates/render/src/gpu_bindings.rs:2960-2968 | crates/render/src/gpu_bindings.rs:3082-3090 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/gpu_bindings.rs:2960` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/render/src/fence_chrome.rs:2096 — crates/render/src/fence_chrome.rs:2096-2104 | crates/render/src/fence_chrome.rs:2118-2126 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/fence_chrome.rs:2096` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · FenceViewState · ×10
  • FenceViewState::replace_items (cyclomatic 61) crates/app/src/fence_window/items.rs:309 — FenceViewState::replace_items has cyclomatic complexity 61 (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.
  • FenceViewState::tip_text (cyclomatic 24) crates/app/src/fence_window/tooltip.rs:181 — FenceViewState::tip_text 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.
  • FenceViewState::draw_chrome_panel (cyclomatic 23) crates/app/src/fence_window/render.rs:890 — FenceViewState::draw_chrome_panel 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.
  • FenceViewState::start_roll_anim (cyclomatic 21) crates/app/src/fence_window/roll.rs:759 — FenceViewState::start_roll_anim 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.
  • FenceViewState::tick (cyclomatic 19) crates/app/src/fence_window/frame.rs:12 — FenceViewState::tick 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.
  • FenceViewState::ensure_icons_and_labels (cyclomatic 18) crates/app/src/fence_window/render.rs:1280 — FenceViewState::ensure_icons_and_labels 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.
  • FenceViewState::redraw_content (cyclomatic 18) crates/app/src/fence_window/render.rs:1961 — FenceViewState::redraw_content 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.
  • FenceViewState::reflow_items (cyclomatic 17) crates/app/src/fence_window/items.rs:787 — FenceViewState::reflow_items 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.
  • FenceViewState::update_backdrop_at (cyclomatic 17) crates/app/src/fence_window/render.rs:1100 — FenceViewState::update_backdrop_at 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.
  • FenceViewState::up_button_at (cyclomatic 16) crates/app/src/fence_window/hit.rs:152 — FenceViewState::up_button_at 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.
D4 · Code Duplication · Members sharing a duplicated core (15 members, 50+ identical tokens) · ×9
  • Members sharing a duplicated core (15 members, 50+ identical tokens) crates/render/src/comp.rs:834 — crates/render/src/comp.rs:834-844 | crates/render/src/comp.rs:9174-9184 | crates/render/src/comp.rs:13005-13015 | crates/render/src/comp.rs:14323-14333 | crates/render/src/comp.rs:15020-15030 | crates/render/src/comp.rs:15578-15588 | crates/render/src/comp.rs:16167-16177 | crates/render/src/comp.rs:16847-16857 | crates/render/src/comp.rs:17206-17216 | crates/render/src/comp.rs:17565-17575 | crates/render/src/comp.rs:18839-18849 | crates/render/src/comp.rs:19428-19438 | crates/render/src/comp.rs:19788-19798 | crates/render/src/comp.rs:20377-20387 | crates/render/src/comp.rs:20735-20745 — These 15 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 15 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 15 times.
  • Members sharing a duplicated core (15 members, 50+ identical tokens) crates/render/src/comp.rs:849 — crates/render/src/comp.rs:849-859 | crates/render/src/comp.rs:9189-9199 | crates/render/src/comp.rs:13020-13030 | crates/render/src/comp.rs:14338-14348 | crates/render/src/comp.rs:15035-15045 | crates/render/src/comp.rs:15593-15603 | crates/render/src/comp.rs:16182-16192 | crates/render/src/comp.rs:16862-16872 | crates/render/src/comp.rs:17221-17231 | crates/render/src/comp.rs:17580-17590 | crates/render/src/comp.rs:18854-18864 | crates/render/src/comp.rs:19443-19453 | crates/render/src/comp.rs:19803-19813 | crates/render/src/comp.rs:20392-20402 | crates/render/src/comp.rs:20750-20760 — These 15 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 15 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 15 times.
  • Members sharing a duplicated core (15 members, 50+ identical tokens) crates/render/src/comp.rs:864 — crates/render/src/comp.rs:864-874 | crates/render/src/comp.rs:9204-9214 | crates/render/src/comp.rs:13035-13045 | crates/render/src/comp.rs:14353-14363 | crates/render/src/comp.rs:15050-15060 | crates/render/src/comp.rs:15608-15618 | crates/render/src/comp.rs:16197-16207 | crates/render/src/comp.rs:16877-16887 | crates/render/src/comp.rs:17236-17246 | crates/render/src/comp.rs:17595-17605 | crates/render/src/comp.rs:18869-18879 | crates/render/src/comp.rs:19458-19468 | crates/render/src/comp.rs:19818-19828 | crates/render/src/comp.rs:20407-20417 | crates/render/src/comp.rs:20765-20775 — These 15 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 15 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 15 times.
  • Members sharing a duplicated core (15 members, 50+ identical tokens) crates/render/src/comp.rs:879 — crates/render/src/comp.rs:879-889 | crates/render/src/comp.rs:9219-9229 | crates/render/src/comp.rs:13050-13060 | crates/render/src/comp.rs:14368-14378 | crates/render/src/comp.rs:15065-15075 | crates/render/src/comp.rs:15623-15633 | crates/render/src/comp.rs:16212-16222 | crates/render/src/comp.rs:16892-16902 | crates/render/src/comp.rs:17251-17261 | crates/render/src/comp.rs:17610-17620 | crates/render/src/comp.rs:18884-18894 | crates/render/src/comp.rs:19473-19483 | crates/render/src/comp.rs:19833-19843 | crates/render/src/comp.rs:20422-20432 | crates/render/src/comp.rs:20780-20790 — These 15 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 15 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 15 times.
  • Members sharing a duplicated core (15 members, 50+ identical tokens) crates/render/src/comp.rs:897 — crates/render/src/comp.rs:897-907 | crates/render/src/comp.rs:9237-9247 | crates/render/src/comp.rs:13068-13078 | crates/render/src/comp.rs:14386-14396 | crates/render/src/comp.rs:15083-15093 | crates/render/src/comp.rs:15641-15651 | crates/render/src/comp.rs:16230-16240 | crates/render/src/comp.rs:16910-16920 | crates/render/src/comp.rs:17269-17279 | crates/render/src/comp.rs:17628-17638 | crates/render/src/comp.rs:18902-18912 | crates/render/src/comp.rs:19491-19501 | crates/render/src/comp.rs:19851-19861 | crates/render/src/comp.rs:20440-20450 | crates/render/src/comp.rs:20798-20808 — These 15 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 15 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 15 times.
  • Members sharing a duplicated core (15 members, 50+ identical tokens) crates/render/src/comp.rs:912 — crates/render/src/comp.rs:912-922 | crates/render/src/comp.rs:9252-9262 | crates/render/src/comp.rs:13083-13093 | crates/render/src/comp.rs:14401-14411 | crates/render/src/comp.rs:15098-15108 | crates/render/src/comp.rs:15656-15666 | crates/render/src/comp.rs:16245-16255 | crates/render/src/comp.rs:16925-16935 | crates/render/src/comp.rs:17284-17294 | crates/render/src/comp.rs:17643-17653 | crates/render/src/comp.rs:18917-18927 | crates/render/src/comp.rs:19506-19516 | crates/render/src/comp.rs:19866-19876 | crates/render/src/comp.rs:20455-20465 | crates/render/src/comp.rs:20813-20823 — These 15 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 15 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 15 times.
  • Members sharing a duplicated core (15 members, 50+ identical tokens) crates/render/src/comp.rs:927 — crates/render/src/comp.rs:927-937 | crates/render/src/comp.rs:9267-9277 | crates/render/src/comp.rs:13098-13108 | crates/render/src/comp.rs:14416-14426 | crates/render/src/comp.rs:15113-15123 | crates/render/src/comp.rs:15671-15681 | crates/render/src/comp.rs:16260-16270 | crates/render/src/comp.rs:16940-16950 | crates/render/src/comp.rs:17299-17309 | crates/render/src/comp.rs:17658-17668 | crates/render/src/comp.rs:18932-18942 | crates/render/src/comp.rs:19521-19531 | crates/render/src/comp.rs:19881-19891 | crates/render/src/comp.rs:20470-20480 | crates/render/src/comp.rs:20828-20838 — These 15 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 15 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 15 times.
  • Members sharing a duplicated core (15 members, 50+ identical tokens) crates/render/src/comp.rs:942 — crates/render/src/comp.rs:942-952 | crates/render/src/comp.rs:9282-9292 | crates/render/src/comp.rs:13113-13123 | crates/render/src/comp.rs:14431-14441 | crates/render/src/comp.rs:15128-15138 | crates/render/src/comp.rs:15686-15696 | crates/render/src/comp.rs:16275-16285 | crates/render/src/comp.rs:16955-16965 | crates/render/src/comp.rs:17314-17324 | crates/render/src/comp.rs:17673-17683 | crates/render/src/comp.rs:18947-18957 | crates/render/src/comp.rs:19536-19546 | crates/render/src/comp.rs:19896-19906 | crates/render/src/comp.rs:20485-20495 | crates/render/src/comp.rs:20843-20853 — These 15 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 15 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 15 times.
  • Members sharing a duplicated core (15 members, 50+ identical tokens) crates/render/src/comp.rs:957 — crates/render/src/comp.rs:957-967 | crates/render/src/comp.rs:9297-9307 | crates/render/src/comp.rs:13128-13138 | crates/render/src/comp.rs:14446-14456 | crates/render/src/comp.rs:15143-15153 | crates/render/src/comp.rs:15701-15711 | crates/render/src/comp.rs:16290-16300 | crates/render/src/comp.rs:16970-16980 | crates/render/src/comp.rs:17329-17339 | crates/render/src/comp.rs:17688-17698 | crates/render/src/comp.rs:18962-18972 | crates/render/src/comp.rs:19551-19561 | crates/render/src/comp.rs:19911-19921 | crates/render/src/comp.rs:20500-20510 | crates/render/src/comp.rs:20858-20868 — These 15 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 15 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 15 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×9
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/platform/src/bindings.rs:6634 — crates/platform/src/bindings.rs:6634-6795 | crates/platform/src/bindings.rs:12217-12473 | crates/platform/src/bindings.rs:13482-13632 | crates/platform/src/bindings.rs:15482-15708 | crates/render/src/gpu_bindings.rs:2925-3131 | crates/render/src/gpu_bindings.rs:5485-6333 — These 6 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 6 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 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/render/src/comp.rs:1139 — crates/render/src/comp.rs:1139-1149 | crates/render/src/comp.rs:15325-15335 | crates/render/src/comp.rs:15883-15893 | crates/render/src/comp.rs:19144-19154 | crates/render/src/comp.rs:20093-20103 | crates/render/src/comp.rs:21040-21050 — These 6 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 6 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 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/render/src/comp.rs:1160 — crates/render/src/comp.rs:1160-1170 | crates/render/src/comp.rs:15346-15356 | crates/render/src/comp.rs:15904-15914 | crates/render/src/comp.rs:19165-19175 | crates/render/src/comp.rs:20114-20124 | crates/render/src/comp.rs:21061-21071 — These 6 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 6 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 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/render/src/comp.rs:1181 — crates/render/src/comp.rs:1181-1191 | crates/render/src/comp.rs:15367-15377 | crates/render/src/comp.rs:15925-15935 | crates/render/src/comp.rs:19186-19196 | crates/render/src/comp.rs:20135-20145 | crates/render/src/comp.rs:21082-21092 — These 6 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 6 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 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/render/src/comp.rs:1205 — crates/render/src/comp.rs:1205-1215 | crates/render/src/comp.rs:15391-15401 | crates/render/src/comp.rs:15949-15959 | crates/render/src/comp.rs:19210-19220 | crates/render/src/comp.rs:20159-20169 | crates/render/src/comp.rs:21106-21116 — These 6 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 6 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 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/render/src/comp.rs:1226 — crates/render/src/comp.rs:1226-1236 | crates/render/src/comp.rs:15412-15422 | crates/render/src/comp.rs:15970-15980 | crates/render/src/comp.rs:19231-19241 | crates/render/src/comp.rs:20180-20190 | crates/render/src/comp.rs:21127-21137 — These 6 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 6 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 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/render/src/comp.rs:1237 — crates/render/src/comp.rs:1237-1247 | crates/render/src/comp.rs:15423-15433 | crates/render/src/comp.rs:15981-15991 | crates/render/src/comp.rs:19242-19252 | crates/render/src/comp.rs:20191-20201 | crates/render/src/comp.rs:21138-21148 — These 6 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 6 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 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/render/src/comp.rs:1262 — crates/render/src/comp.rs:1262-1272 | crates/render/src/comp.rs:15448-15458 | crates/render/src/comp.rs:16006-16016 | crates/render/src/comp.rs:19267-19277 | crates/render/src/comp.rs:20216-20226 | crates/render/src/comp.rs:21163-21173 — These 6 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 6 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 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/render/src/comp.rs:1281 — crates/render/src/comp.rs:1281-1292 | crates/render/src/comp.rs:15467-15478 | crates/render/src/comp.rs:16025-16036 | crates/render/src/comp.rs:19286-19297 | crates/render/src/comp.rs:20235-20246 | crates/render/src/comp.rs:21182-21193 — These 6 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 6 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 6 times.
D4 · Code Duplication · Duplicated block (10 lines × 15) · ×9
  • Duplicated block (10 lines × 15) crates/render/src/comp.rs:835 — crates/render/src/comp.rs:835-844 | crates/render/src/comp.rs:9175-9184 | crates/render/src/comp.rs:13006-13015 | crates/render/src/comp.rs:14324-14333 | crates/render/src/comp.rs:15021-15030 | crates/render/src/comp.rs:15579-15588 | crates/render/src/comp.rs:16168-16177 | crates/render/src/comp.rs:16848-16857 | crates/render/src/comp.rs:17207-17216 | crates/render/src/comp.rs:17566-17575 | crates/render/src/comp.rs:18840-18849 | crates/render/src/comp.rs:19429-19438 | crates/render/src/comp.rs:19789-19798 | crates/render/src/comp.rs:20378-20387 | crates/render/src/comp.rs:20736-20745 — all 15 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 15) crates/render/src/comp.rs:850 — crates/render/src/comp.rs:850-859 | crates/render/src/comp.rs:9190-9199 | crates/render/src/comp.rs:13021-13030 | crates/render/src/comp.rs:14339-14348 | crates/render/src/comp.rs:15036-15045 | crates/render/src/comp.rs:15594-15603 | crates/render/src/comp.rs:16183-16192 | crates/render/src/comp.rs:16863-16872 | crates/render/src/comp.rs:17222-17231 | crates/render/src/comp.rs:17581-17590 | crates/render/src/comp.rs:18855-18864 | crates/render/src/comp.rs:19444-19453 | crates/render/src/comp.rs:19804-19813 | crates/render/src/comp.rs:20393-20402 | crates/render/src/comp.rs:20751-20760 — all 15 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 15) crates/render/src/comp.rs:865 — crates/render/src/comp.rs:865-874 | crates/render/src/comp.rs:9205-9214 | crates/render/src/comp.rs:13036-13045 | crates/render/src/comp.rs:14354-14363 | crates/render/src/comp.rs:15051-15060 | crates/render/src/comp.rs:15609-15618 | crates/render/src/comp.rs:16198-16207 | crates/render/src/comp.rs:16878-16887 | crates/render/src/comp.rs:17237-17246 | crates/render/src/comp.rs:17596-17605 | crates/render/src/comp.rs:18870-18879 | crates/render/src/comp.rs:19459-19468 | crates/render/src/comp.rs:19819-19828 | crates/render/src/comp.rs:20408-20417 | crates/render/src/comp.rs:20766-20775 — all 15 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 15) crates/render/src/comp.rs:880 — crates/render/src/comp.rs:880-889 | crates/render/src/comp.rs:9220-9229 | crates/render/src/comp.rs:13051-13060 | crates/render/src/comp.rs:14369-14378 | crates/render/src/comp.rs:15066-15075 | crates/render/src/comp.rs:15624-15633 | crates/render/src/comp.rs:16213-16222 | crates/render/src/comp.rs:16893-16902 | crates/render/src/comp.rs:17252-17261 | crates/render/src/comp.rs:17611-17620 | crates/render/src/comp.rs:18885-18894 | crates/render/src/comp.rs:19474-19483 | crates/render/src/comp.rs:19834-19843 | crates/render/src/comp.rs:20423-20432 | crates/render/src/comp.rs:20781-20790 — all 15 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 15) crates/render/src/comp.rs:898 — crates/render/src/comp.rs:898-907 | crates/render/src/comp.rs:9238-9247 | crates/render/src/comp.rs:13069-13078 | crates/render/src/comp.rs:14387-14396 | crates/render/src/comp.rs:15084-15093 | crates/render/src/comp.rs:15642-15651 | crates/render/src/comp.rs:16231-16240 | crates/render/src/comp.rs:16911-16920 | crates/render/src/comp.rs:17270-17279 | crates/render/src/comp.rs:17629-17638 | crates/render/src/comp.rs:18903-18912 | crates/render/src/comp.rs:19492-19501 | crates/render/src/comp.rs:19852-19861 | crates/render/src/comp.rs:20441-20450 | crates/render/src/comp.rs:20799-20808 — all 15 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 15) crates/render/src/comp.rs:913 — crates/render/src/comp.rs:913-922 | crates/render/src/comp.rs:9253-9262 | crates/render/src/comp.rs:13084-13093 | crates/render/src/comp.rs:14402-14411 | crates/render/src/comp.rs:15099-15108 | crates/render/src/comp.rs:15657-15666 | crates/render/src/comp.rs:16246-16255 | crates/render/src/comp.rs:16926-16935 | crates/render/src/comp.rs:17285-17294 | crates/render/src/comp.rs:17644-17653 | crates/render/src/comp.rs:18918-18927 | crates/render/src/comp.rs:19507-19516 | crates/render/src/comp.rs:19867-19876 | crates/render/src/comp.rs:20456-20465 | crates/render/src/comp.rs:20814-20823 — all 15 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 15) crates/render/src/comp.rs:928 — crates/render/src/comp.rs:928-937 | crates/render/src/comp.rs:9268-9277 | crates/render/src/comp.rs:13099-13108 | crates/render/src/comp.rs:14417-14426 | crates/render/src/comp.rs:15114-15123 | crates/render/src/comp.rs:15672-15681 | crates/render/src/comp.rs:16261-16270 | crates/render/src/comp.rs:16941-16950 | crates/render/src/comp.rs:17300-17309 | crates/render/src/comp.rs:17659-17668 | crates/render/src/comp.rs:18933-18942 | crates/render/src/comp.rs:19522-19531 | crates/render/src/comp.rs:19882-19891 | crates/render/src/comp.rs:20471-20480 | crates/render/src/comp.rs:20829-20838 — all 15 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 15) crates/render/src/comp.rs:943 — crates/render/src/comp.rs:943-952 | crates/render/src/comp.rs:9283-9292 | crates/render/src/comp.rs:13114-13123 | crates/render/src/comp.rs:14432-14441 | crates/render/src/comp.rs:15129-15138 | crates/render/src/comp.rs:15687-15696 | crates/render/src/comp.rs:16276-16285 | crates/render/src/comp.rs:16956-16965 | crates/render/src/comp.rs:17315-17324 | crates/render/src/comp.rs:17674-17683 | crates/render/src/comp.rs:18948-18957 | crates/render/src/comp.rs:19537-19546 | crates/render/src/comp.rs:19897-19906 | crates/render/src/comp.rs:20486-20495 | crates/render/src/comp.rs:20844-20853 — all 15 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 15) crates/render/src/comp.rs:958 — crates/render/src/comp.rs:958-967 | crates/render/src/comp.rs:9298-9307 | crates/render/src/comp.rs:13129-13138 | crates/render/src/comp.rs:14447-14456 | crates/render/src/comp.rs:15144-15153 | crates/render/src/comp.rs:15702-15711 | crates/render/src/comp.rs:16291-16300 | crates/render/src/comp.rs:16971-16980 | crates/render/src/comp.rs:17330-17339 | crates/render/src/comp.rs:17689-17698 | crates/render/src/comp.rs:18963-18972 | crates/render/src/comp.rs:19552-19561 | crates/render/src/comp.rs:19912-19921 | crates/render/src/comp.rs:20501-20510 | crates/render/src/comp.rs:20859-20868 — all 15 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×8
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/platform/src/bindings.rs:8711 — crates/platform/src/bindings.rs:8711-9051 | crates/platform/src/bindings.rs:9647-9996 | crates/platform/src/bindings.rs:12217-12473 | crates/platform/src/bindings.rs:14061-14356 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/platform/src/bindings.rs:8711 — crates/platform/src/bindings.rs:8711-9051 | crates/platform/src/bindings.rs:9647-9996 | crates/platform/src/bindings.rs:10511-10768 | crates/render/src/gpu_bindings.rs:5485-6333 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/render/src/comp.rs:1845 — crates/render/src/comp.rs:1845-1855 | crates/render/src/comp.rs:11486-11498 | crates/render/src/comp.rs:12418-12435 | crates/render/src/comp.rs:21967-21977 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/render/src/comp.rs:8218 — crates/render/src/comp.rs:8218-8228 | crates/render/src/comp.rs:14034-14044 | crates/render/src/comp.rs:18437-18447 | crates/render/src/comp.rs:21729-21739 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/render/src/comp.rs:8232 — crates/render/src/comp.rs:8232-8241 | crates/render/src/comp.rs:14048-14057 | crates/render/src/comp.rs:18451-18460 | crates/render/src/comp.rs:21743-21752 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/render/src/comp.rs:8244 — crates/render/src/comp.rs:8244-8254 | crates/render/src/comp.rs:14060-14070 | crates/render/src/comp.rs:18463-18473 | crates/render/src/comp.rs:21755-21765 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/render/src/comp.rs:8268 — crates/render/src/comp.rs:8268-8278 | crates/render/src/comp.rs:14084-14094 | crates/render/src/comp.rs:18487-18497 | crates/render/src/comp.rs:21779-21789 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/render/src/fence_chrome.rs:510 — crates/render/src/fence_chrome.rs:510-543 | crates/render/src/fence_chrome.rs:552-584 | crates/render/src/fence_chrome.rs:594-623 | crates/render/src/fence_chrome.rs:633-677 — 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 · Edited copy of a member (10 corresponding lines) · ×8
  • Edited copy of a member (10 corresponding lines) REDACTED:1178 — REDACTED:1178-1195 | REDACTED:1199-1208 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/platform/src/bindings.rs:274 — crates/platform/src/bindings.rs:274-284 | crates/platform/src/bindings.rs:380-389 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/app/src/app/feedback.rs:325 — crates/app/src/app/feedback.rs:325-342 | crates/app/src/app/updates.rs:292-301 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/app/src/fence_window/selection.rs:228 — crates/app/src/fence_window/selection.rs:228-237 | crates/app/src/fence_window/selection.rs:242-252 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/render/src/comp.rs:5445 — crates/render/src/comp.rs:5445-5455 | crates/render/src/comp.rs:5463-5472 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/platform/src/bindings.rs:1535 — crates/platform/src/bindings.rs:1535-1544 | crates/platform/src/bindings.rs:1969-1980 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/platform/src/store_bindings.rs:369 — crates/platform/src/store_bindings.rs:369-378 | crates/render/src/comp.rs:9479-9488 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/platform/src/bindings.rs:1134 — crates/platform/src/bindings.rs:1134-1144 | crates/platform/src/bindings.rs:2790-2799 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D2 · Cognitive Complexity · pecofence_core · ×7
  • pecofence_core::config_store::lint (cognitive 48) crates/core/src/config_store.rs:684 — pecofence_core::config_store::lint has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (29 pts), match/switch 3 (8 pts), loops 4 (6 pts), boolean chains 5 (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.
  • pecofence_core::geometry::keep_groups_together (cognitive 32) crates/core/src/geometry.rs:268 — pecofence_core::geometry::keep_groups_together has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 5 (10 pts), boolean chains 8 (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.
  • pecofence_core::script_output::params (cognitive 29) crates/core/src/script_output.rs:122 — pecofence_core::script_output::params has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 5 (11 pts), match/switch 1 (2 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.
  • pecofence_core::model::pair_monitors (cognitive 20) crates/core/src/model.rs:1944 — pecofence_core::model::pair_monitors has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, loops 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.
  • pecofence_core::config_store::validate (cognitive 17) crates/core/src/config_store.rs:576 — pecofence_core::config_store::validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 2 (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.
  • pecofence_core::matcher::match_term (cognitive 16) crates/core/src/matcher.rs:116 — pecofence_core::matcher::match_term has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • pecofence_core::note::links (cognitive 16) crates/core/src/note.rs:297 — pecofence_core::note::links has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 3, loops 2 (3 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.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×7
  • Edited copy of a member (12 corresponding lines) crates/render/src/backdrop.rs:131 — crates/render/src/backdrop.rs:131-145 | crates/render/src/backdrop.rs:149-160 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/app/src/fence_window/roll.rs:494 — crates/app/src/fence_window/roll.rs:494-505 | crates/app/src/fence_window/roll.rs:513-528 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/render/src/theme.rs:536 — crates/render/src/theme.rs:536-547 | crates/render/src/theme.rs:586-601 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/core/src/model.rs:1740 — crates/core/src/model.rs:1740-1751 | crates/core/src/model.rs:1806-1817 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/platform/src/bindings.rs:1857 — crates/platform/src/bindings.rs:1857-1868 | crates/platform/src/bindings.rs:2377-2388 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/app/src/fence_window/handler/timers.rs:234 — crates/app/src/fence_window/handler/timers.rs:234-245 | crates/app/src/fence_window/handler/timers.rs:252-263 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/app/src/app/items.rs:595 — crates/app/src/app/items.rs:595-606 | crates/app/src/app/items.rs:1276-1290 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×7
  • Duplicated block (10 lines × 6) crates/render/src/comp.rs:1140 — crates/render/src/comp.rs:1140-1149 | crates/render/src/comp.rs:15326-15335 | crates/render/src/comp.rs:15884-15893 | crates/render/src/comp.rs:19145-19154 | crates/render/src/comp.rs:20094-20103 | crates/render/src/comp.rs:21041-21050 — all 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 6) crates/render/src/comp.rs:1161 — crates/render/src/comp.rs:1161-1170 | crates/render/src/comp.rs:15347-15356 | crates/render/src/comp.rs:15905-15914 | crates/render/src/comp.rs:19166-19175 | crates/render/src/comp.rs:20115-20124 | crates/render/src/comp.rs:21062-21071 — all 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 6) crates/render/src/comp.rs:1182 — crates/render/src/comp.rs:1182-1191 | crates/render/src/comp.rs:15368-15377 | crates/render/src/comp.rs:15926-15935 | crates/render/src/comp.rs:19187-19196 | crates/render/src/comp.rs:20136-20145 | crates/render/src/comp.rs:21083-21092 — all 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 6) crates/render/src/comp.rs:1206 — crates/render/src/comp.rs:1206-1215 | crates/render/src/comp.rs:15392-15401 | crates/render/src/comp.rs:15950-15959 | crates/render/src/comp.rs:19211-19220 | crates/render/src/comp.rs:20160-20169 | crates/render/src/comp.rs:21107-21116 — all 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 6) crates/render/src/comp.rs:1227 — crates/render/src/comp.rs:1227-1236 | crates/render/src/comp.rs:15413-15422 | crates/render/src/comp.rs:15971-15980 | crates/render/src/comp.rs:19232-19241 | crates/render/src/comp.rs:20181-20190 | crates/render/src/comp.rs:21128-21137 — all 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 6) crates/render/src/comp.rs:1238 — crates/render/src/comp.rs:1238-1247 | crates/render/src/comp.rs:15424-15433 | crates/render/src/comp.rs:15982-15991 | crates/render/src/comp.rs:19243-19252 | crates/render/src/comp.rs:20192-20201 | crates/render/src/comp.rs:21139-21148 — all 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 6) crates/render/src/comp.rs:1263 — crates/render/src/comp.rs:1263-1272 | crates/render/src/comp.rs:15449-15458 | crates/render/src/comp.rs:16007-16016 | crates/render/src/comp.rs:19268-19277 | crates/render/src/comp.rs:20217-20226 | crates/render/src/comp.rs:21164-21173 — all 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D1 · Cyclomatic Complexity · FenceChrome · ×6
  • FenceChrome::draw (cyclomatic 88) crates/render/src/fence_chrome.rs:2998 — FenceChrome::draw has cyclomatic complexity 88 (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.
  • FenceChrome::draw_tab_list (cyclomatic 44) crates/render/src/fence_chrome.rs:3777 — FenceChrome::draw_tab_list 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.
  • FenceChrome::draw_rows (cyclomatic 39) crates/render/src/fence_chrome.rs:4051 — FenceChrome::draw_rows has cyclomatic complexity 39 (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.
  • FenceChrome::draw_note (cyclomatic 34) crates/render/src/fence_chrome.rs:4876 — FenceChrome::draw_note 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.
  • FenceChrome::draw_script (cyclomatic 24) crates/render/src/fence_chrome.rs:5314 — FenceChrome::draw_script 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.
  • FenceChrome::draw_content (cyclomatic 20) crates/render/src/fence_chrome.rs:4422 — FenceChrome::draw_content 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 · pecofence_core · ×6
  • pecofence_core::config_store::lint (cyclomatic 30) crates/core/src/config_store.rs:684 — pecofence_core::config_store::lint 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.
  • pecofence_core::smart::everything_term (cyclomatic 23) crates/core/src/smart.rs:373 — pecofence_core::smart::everything_term 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.
  • pecofence_core::rules::cond_matches (cyclomatic 21) crates/core/src/rules.rs:413 — pecofence_core::rules::cond_matches has cyclomatic complexity 21 (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.
  • pecofence_core::geometry::keep_groups_together (cyclomatic 19) crates/core/src/geometry.rs:268 — pecofence_core::geometry::keep_groups_together has cyclomatic complexity 19 (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.
  • pecofence_core::model::pair_monitors (cyclomatic 16) crates/core/src/model.rs:1944 — pecofence_core::model::pair_monitors 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.
  • pecofence_core::rules::category_matches (cyclomatic 16) crates/core/src/rules.rs:339 — pecofence_core::rules::category_matches 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.
D2 · Cognitive Complexity · FenceChrome · ×6
  • FenceChrome::draw (cognitive 199) crates/render/src/fence_chrome.rs:2998 — FenceChrome::draw has cognitive complexity 199 (threshold 15). Drivers by points: if/else 87 (169 pts), boolean chains 19, match/switch 4 (6 pts), loops 2 (5 pts) (nesting depth added 87). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FenceChrome::draw_tab_list (cognitive 84) crates/render/src/fence_chrome.rs:3777 — FenceChrome::draw_tab_list has cognitive complexity 84 (threshold 15). Drivers by points: if/else 42 (71 pts), boolean chains 7, loops 3 (4 pts), match/switch 2 (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.
  • FenceChrome::draw_note (cognitive 73) crates/render/src/fence_chrome.rs:4876 — FenceChrome::draw_note has cognitive complexity 73 (threshold 15). Drivers by points: if/else 24 (50 pts), loops 5 (15 pts), match/switch 4 (6 pts), boolean chains 2 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FenceChrome::draw_rows (cognitive 66) crates/render/src/fence_chrome.rs:4051 — FenceChrome::draw_rows has cognitive complexity 66 (threshold 15). Drivers by points: if/else 31 (51 pts), loops 4 (7 pts), boolean chains 6, match/switch 2 (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.
  • FenceChrome::draw_script (cognitive 44) crates/render/src/fence_chrome.rs:5314 — FenceChrome::draw_script has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (37 pts), match/switch 2 (4 pts), boolean chains 2, loops 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.
  • FenceChrome::draw_content (cognitive 25) crates/render/src/fence_chrome.rs:4422 — FenceChrome::draw_content has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, loops 2 (3 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×6
  • Edited copy of a member (5 corresponding lines) crates/app/src/layout.rs:376 — crates/app/src/layout.rs:376-380 | crates/app/src/layout.rs:462-467 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/render/src/fence_chrome.rs:2473 — crates/render/src/fence_chrome.rs:2473-2477 | crates/render/src/fence_chrome.rs:2883-2888 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/platform/src/rawinput.rs:130 — crates/platform/src/rawinput.rs:130-135 | crates/platform/src/tray.rs:899-903 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/app/src/app/updates.rs:80 — crates/app/src/app/updates.rs:80-84 | crates/core/src/model.rs:2434-2439 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/app/src/fence_window/api.rs:2206 — crates/app/src/fence_window/api.rs:2206-2211 | crates/app/src/fence_window/handler/nc.rs:1332-1336 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/app/src/app/items.rs:922 — crates/app/src/app/items.rs:922-926 | crates/app/src/fence_window/api.rs:2663-2667 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×6
  • Duplicated block (10 lines × 2) crates/app/src/app/undo.rs:662 — crates/app/src/app/undo.rs:662-671 | crates/app/src/app/undo.rs:689-698 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/app/undo.rs:662` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn offer_undo_delete(&mut` in one and `super) fn offer_undo_refiled(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) crates/app/src/fence_window/hit.rs:610 — crates/app/src/fence_window/hit.rs:610-619 | crates/app/src/fence_window/hit.rs:625-634 — 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/app/src/state.rs:274 — crates/app/src/state.rs:274-283 | crates/app/src/state.rs:609-618 — 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/platform/src/bindings.rs:4752 — crates/platform/src/bindings.rs:4752-4761 | crates/platform/src/bindings.rs:10743-10752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:4752` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) crates/render/src/comp.rs:13656 — crates/render/src/comp.rs:13656-13665 | crates/render/src/comp.rs:18037-18046 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) crates/app/src/filter_box.rs:204 — crates/app/src/filter_box.rs:204-213 | crates/app/src/rename.rs:551-561 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/filter_box.rs:204` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · pecofence_render · ×5
  • pecofence_render::fence_chrome::draw_plate (cognitive 51) crates/render/src/fence_chrome.rs:1122 — pecofence_render::fence_chrome::draw_plate has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (35 pts), loops 2 (7 pts), boolean chains 5, match/switch 2 (4 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.
  • pecofence_render::liquid_glass::displacement_field (cognitive 38) crates/render/src/liquid_glass.rs:304 — pecofence_render::liquid_glass::displacement_field has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (6 pts), boolean chains 5 (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.
  • pecofence_render::liquid_glass::crop_with_neighbors (cognitive 34) crates/render/src/liquid_glass.rs:573 — pecofence_render::liquid_glass::crop_with_neighbors has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 3 (7 pts), boolean chains 6 (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.
  • pecofence_render::fence_chrome::draw_scrollbar (cognitive 18) crates/render/src/fence_chrome.rs:1840 — pecofence_render::fence_chrome::draw_scrollbar has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 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.
  • pecofence_render::liquid_glass::refracted_overlay (cognitive 17) crates/render/src/liquid_glass.rs:441 — pecofence_render::liquid_glass::refracted_overlay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), boolean chains 4 (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 · DesktopAnchor · ×5
  • DesktopAnchor::ensure_anchored (cognitive 49) crates/app/src/anchor.rs:1548 — DesktopAnchor::ensure_anchored has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (37 pts), boolean chains 6, match/switch 1 (4 pts), loops 1 (2 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • DesktopAnchor::on_timer (cognitive 46) crates/app/src/anchor.rs:2138 — DesktopAnchor::on_timer has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (36 pts), boolean chains 9, match/switch 1 (nesting depth added 19). 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.
  • DesktopAnchor::set_peek (cognitive 28) crates/app/src/anchor.rs:1493 — DesktopAnchor::set_peek has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 6 (12 pts), boolean chains 2 (nesting depth added 14). 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.
  • DesktopAnchor::on_foreground (cognitive 26) crates/app/src/anchor.rs:1261 — DesktopAnchor::on_foreground has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (23 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.
  • DesktopAnchor::on_raw_input (cognitive 19) crates/app/src/anchor.rs:1667 — DesktopAnchor::on_raw_input has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pecofence_platform · ×5
  • pecofence_platform::edit::handle (cognitive 32) crates/platform/src/edit.rs:884 — pecofence_platform::edit::handle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 13, 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.
  • pecofence_platform::desktop::describe_desktop_windows (cognitive 19) crates/platform/src/desktop.rs:513 — pecofence_platform::desktop::describe_desktop_windows has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, 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.
  • pecofence_platform::shell_menu::desktop_children (cognitive 18) crates/platform/src/shell_menu.rs:494 — pecofence_platform::shell_menu::desktop_children has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 2 (3 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.
  • pecofence_platform::shell::transfer_to_folder (cognitive 17) crates/platform/src/shell.rs:1293 — pecofence_platform::shell::transfer_to_folder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • pecofence_platform::wallpaper::watch_registry_key (cognitive 16) crates/platform/src/wallpaper.rs:406 — pecofence_platform::wallpaper::watch_registry_key has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (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.
D35 · Change Coupling · Change coupling · ×5
  • Change coupling: cli.rs ↔ lib.rs crates/cli/src/cli.rs:1 — `crates/cli/src/cli.rs` and `crates/ipc/src/lib.rs` change together 71% of the time (10 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `65f14849` Smart fences: CLI --match and several folders, docs, manual and kit t…; `2a7bf981` Smart fences sample: a fence showing a saved search (Everything or on…; `73bafdd6` CLI: fence open-folder, fence up, fence forward and peek start --search — run `git show` on any of them.
  • Change coupling: state.rs ↔ dto.rs crates/app/src/state.rs:1 — `crates/app/src/state.rs` and `crates/ipc/src/dto.rs` change together 56% of the time (10 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `76136139` 自由摆放 on in a new configuration, as on a new Windows desktop; `2a7bf981` Smart fences sample: a fence showing a saved search (Everything or on…; `58bf539c` pecofence-cli status reports live wallpaper captures; snapshot restor… — run `git show` on any of them.
  • Change coupling: consts.rs ↔ mod.rs crates/app/src/fence_window/consts.rs:1 — `crates/app/src/fence_window/consts.rs` and `crates/app/src/fence_window/handler/mod.rs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `0015a22d` Ctrl+V and Delete: the selection no longer turns grey and then blue a…; `36fdf1e0` The name box of a new fence opens as soon as the fence has faded in (…; `3efab2b0` In Fluent, a right click on a resting pointer cancels a title drag too — run `git show` on any of them.
  • Change coupling: state.rs ↔ cli.rs crates/app/src/state.rs:1 — `crates/app/src/state.rs` and `crates/cli/src/cli.rs` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `2a7bf981` Smart fences sample: a fence showing a saved search (Everything or on…; `b8ae1470` Tool fences: fixes from review; `58bf539c` pecofence-cli status reports live wallpaper captures; snapshot restor… — run `git show` on any of them.
  • Change coupling: model.rs ↔ lib.rs crates/core/src/model.rs:1 — `crates/core/src/model.rs` and `crates/ipc/src/lib.rs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `2be9d004` Icon alignment 右对齐: the rows of a fence fill from the right edge, the…; `a908f186` Security: the scripts of an imported configuration start only with th…; `2a7bf981` Smart fences sample: a fence showing a saved search (Everything or on… — run `git show` on any of them.
D4 · Code Duplication · Members sharing a duplicated core (63 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (63 members, 50+ identical tokens) crates/render/src/comp.rs:75 — crates/render/src/comp.rs:75-85 | crates/render/src/comp.rs:311-321 | crates/render/src/comp.rs:474-484 | crates/render/src/comp.rs:637-647 | crates/render/src/comp.rs:1068-1078 | crates/render/src/comp.rs:1613-1623 | crates/render/src/comp.rs:1772-1782 | crates/render/src/comp.rs:1962-1972 | crates/render/src/comp.rs:2144-2154 | crates/render/src/comp.rs:2375-2385 | crates/render/src/comp.rs:2690-2700 | crates/render/src/comp.rs:2873-2883 | crates/render/src/comp.rs:3032-3042 | crates/render/src/comp.rs:3221-3231 | crates/render/src/comp.rs:3614-3624 | crates/render/src/comp.rs:3804-3814 | crates/render/src/comp.rs:4168-4178 | crates/render/src/comp.rs:4384-4394 | crates/render/src/comp.rs:4566-4576 | crates/render/src/comp.rs:4725-4735 | crates/render/src/comp.rs:4889-4899 | crates/render/src/comp.rs:5049-5059 | crates/render/src/comp.rs:5212-5222 | crates/render/src/comp.rs:5366-5376 | crates/render/src/comp.rs:5573-5583 | crates/render/src/comp.rs:6040-6050 | crates/render/src/comp.rs:6260-6270 | crates/render/src/comp.rs:6489-6499 | crates/render/src/comp.rs:6652-6662 | crates/render/src/comp.rs:6811-6821 | crates/render/src/comp.rs:6970-6980 | crates/render/src/comp.rs:7769-7779 | crates/render/src/comp.rs:8406-8416 | crates/render/src/comp.rs:8565-8575 | crates/render/src/comp.rs:8724-8734 | crates/render/src/comp.rs:8887-8897 | crates/render/src/comp.rs:9050-9060 | crates/render/src/comp.rs:9408-9418 | crates/render/src/comp.rs:12341-12351 | crates/render/src/comp.rs:12805-12815 | crates/render/src/comp.rs:13239-13249 | crates/render/src/comp.rs:13584-13594 | crates/render/src/comp.rs:14201-14211 | crates/render/src/comp.rs:14557-14567 | crates/render/src/comp.rs:14716-14726 | crates/render/src/comp.rs:14879-14889 | crates/render/src/comp.rs:15254-15264 | crates/render/src/comp.rs:15812-15822 | crates/render/src/comp.rs:16401-16411 | crates/render/src/comp.rs:16564-16574 | crates/render/src/comp.rs:16723-16733 | crates/render/src/comp.rs:17081-17091 | crates/render/src/comp.rs:17440-17450 | crates/render/src/comp.rs:17799-17809 | crates/render/src/comp.rs:17965-17975 | crates/render/src/comp.rs:18603-18613 | crates/render/src/comp.rs:19073-19083 | crates/render/src/comp.rs:19662-19672 | crates/render/src/comp.rs:20022-20032 | crates/render/src/comp.rs:20611-20621 | crates/render/src/comp.rs:20969-20979 | crates/render/src/comp.rs:21323-21333 | crates/render/src/comp.rs:21896-21906 — These 63 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 63 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 63 times.
  • Members sharing a duplicated core (63 members, 50+ identical tokens) crates/render/src/comp.rs:96 — crates/render/src/comp.rs:96-106 | crates/render/src/comp.rs:332-342 | crates/render/src/comp.rs:495-505 | crates/render/src/comp.rs:658-668 | crates/render/src/comp.rs:1089-1099 | crates/render/src/comp.rs:1634-1644 | crates/render/src/comp.rs:1793-1803 | crates/render/src/comp.rs:1983-1993 | crates/render/src/comp.rs:2165-2175 | crates/render/src/comp.rs:2396-2406 | crates/render/src/comp.rs:2711-2721 | crates/render/src/comp.rs:2894-2904 | crates/render/src/comp.rs:3053-3063 | crates/render/src/comp.rs:3242-3252 | crates/render/src/comp.rs:3635-3645 | crates/render/src/comp.rs:3825-3835 | crates/render/src/comp.rs:4189-4199 | crates/render/src/comp.rs:4405-4415 | crates/render/src/comp.rs:4587-4597 | crates/render/src/comp.rs:4746-4756 | crates/render/src/comp.rs:4910-4920 | crates/render/src/comp.rs:5070-5080 | crates/render/src/comp.rs:5233-5243 | crates/render/src/comp.rs:5387-5397 | crates/render/src/comp.rs:5594-5604 | crates/render/src/comp.rs:6061-6071 | crates/render/src/comp.rs:6281-6291 | crates/render/src/comp.rs:6510-6520 | crates/render/src/comp.rs:6673-6683 | crates/render/src/comp.rs:6832-6842 | crates/render/src/comp.rs:6991-7001 | crates/render/src/comp.rs:7790-7800 | crates/render/src/comp.rs:8427-8437 | crates/render/src/comp.rs:8586-8596 | crates/render/src/comp.rs:8745-8755 | crates/render/src/comp.rs:8908-8918 | crates/render/src/comp.rs:9071-9081 | crates/render/src/comp.rs:9429-9439 | crates/render/src/comp.rs:12362-12372 | crates/render/src/comp.rs:12826-12836 | crates/render/src/comp.rs:13260-13270 | crates/render/src/comp.rs:13605-13615 | crates/render/src/comp.rs:14222-14232 | crates/render/src/comp.rs:14578-14588 | crates/render/src/comp.rs:14737-14747 | crates/render/src/comp.rs:14900-14910 | crates/render/src/comp.rs:15275-15285 | crates/render/src/comp.rs:15833-15843 | crates/render/src/comp.rs:16422-16432 | crates/render/src/comp.rs:16585-16595 | crates/render/src/comp.rs:16744-16754 | crates/render/src/comp.rs:17102-17112 | crates/render/src/comp.rs:17461-17471 | crates/render/src/comp.rs:17820-17830 | crates/render/src/comp.rs:17986-17996 | crates/render/src/comp.rs:18624-18634 | crates/render/src/comp.rs:19094-19104 | crates/render/src/comp.rs:19683-19693 | crates/render/src/comp.rs:20043-20053 | crates/render/src/comp.rs:20632-20642 | crates/render/src/comp.rs:20990-21000 | crates/render/src/comp.rs:21344-21354 | crates/render/src/comp.rs:21917-21927 — These 63 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 63 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 63 times.
  • Members sharing a duplicated core (63 members, 50+ identical tokens) crates/render/src/comp.rs:110 — crates/render/src/comp.rs:110-119 | crates/render/src/comp.rs:346-355 | crates/render/src/comp.rs:509-518 | crates/render/src/comp.rs:672-681 | crates/render/src/comp.rs:1103-1112 | crates/render/src/comp.rs:1648-1657 | crates/render/src/comp.rs:1807-1816 | crates/render/src/comp.rs:1997-2006 | crates/render/src/comp.rs:2179-2188 | crates/render/src/comp.rs:2410-2419 | crates/render/src/comp.rs:2725-2734 | crates/render/src/comp.rs:2908-2917 | crates/render/src/comp.rs:3067-3076 | crates/render/src/comp.rs:3256-3265 | crates/render/src/comp.rs:3649-3658 | crates/render/src/comp.rs:3839-3848 | crates/render/src/comp.rs:4203-4212 | crates/render/src/comp.rs:4419-4428 | crates/render/src/comp.rs:4601-4610 | crates/render/src/comp.rs:4760-4769 | crates/render/src/comp.rs:4924-4933 | crates/render/src/comp.rs:5084-5093 | crates/render/src/comp.rs:5247-5256 | crates/render/src/comp.rs:5401-5410 | crates/render/src/comp.rs:5608-5617 | crates/render/src/comp.rs:6075-6084 | crates/render/src/comp.rs:6295-6304 | crates/render/src/comp.rs:6524-6533 | crates/render/src/comp.rs:6687-6696 | crates/render/src/comp.rs:6846-6855 | crates/render/src/comp.rs:7005-7014 | crates/render/src/comp.rs:7804-7813 | crates/render/src/comp.rs:8441-8450 | crates/render/src/comp.rs:8600-8609 | crates/render/src/comp.rs:8759-8768 | crates/render/src/comp.rs:8922-8931 | crates/render/src/comp.rs:9085-9094 | crates/render/src/comp.rs:9443-9452 | crates/render/src/comp.rs:12376-12385 | crates/render/src/comp.rs:12840-12849 | crates/render/src/comp.rs:13274-13283 | crates/render/src/comp.rs:13619-13628 | crates/render/src/comp.rs:14236-14245 | crates/render/src/comp.rs:14592-14601 | crates/render/src/comp.rs:14751-14760 | crates/render/src/comp.rs:14914-14923 | crates/render/src/comp.rs:15289-15298 | crates/render/src/comp.rs:15847-15856 | crates/render/src/comp.rs:16436-16445 | crates/render/src/comp.rs:16599-16608 | crates/render/src/comp.rs:16758-16767 | crates/render/src/comp.rs:17116-17125 | crates/render/src/comp.rs:17475-17484 | crates/render/src/comp.rs:17834-17843 | crates/render/src/comp.rs:18000-18009 | crates/render/src/comp.rs:18638-18647 | crates/render/src/comp.rs:19108-19117 | crates/render/src/comp.rs:19697-19706 | crates/render/src/comp.rs:20057-20066 | crates/render/src/comp.rs:20646-20655 | crates/render/src/comp.rs:21004-21013 | crates/render/src/comp.rs:21358-21367 | crates/render/src/comp.rs:21931-21940 — These 63 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 63 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 63 times.
  • Members sharing a duplicated core (63 members, 50+ identical tokens) crates/render/src/comp.rs:123 — crates/render/src/comp.rs:123-132 | crates/render/src/comp.rs:359-368 | crates/render/src/comp.rs:522-531 | crates/render/src/comp.rs:685-694 | crates/render/src/comp.rs:1116-1125 | crates/render/src/comp.rs:1661-1670 | crates/render/src/comp.rs:1820-1829 | crates/render/src/comp.rs:2010-2019 | crates/render/src/comp.rs:2192-2201 | crates/render/src/comp.rs:2423-2432 | crates/render/src/comp.rs:2738-2747 | crates/render/src/comp.rs:2921-2930 | crates/render/src/comp.rs:3080-3089 | crates/render/src/comp.rs:3269-3278 | crates/render/src/comp.rs:3662-3671 | crates/render/src/comp.rs:3852-3861 | crates/render/src/comp.rs:4216-4225 | crates/render/src/comp.rs:4432-4441 | crates/render/src/comp.rs:4614-4623 | crates/render/src/comp.rs:4773-4782 | crates/render/src/comp.rs:4937-4946 | crates/render/src/comp.rs:5097-5106 | crates/render/src/comp.rs:5260-5269 | crates/render/src/comp.rs:5414-5423 | crates/render/src/comp.rs:5621-5630 | crates/render/src/comp.rs:6088-6097 | crates/render/src/comp.rs:6308-6317 | crates/render/src/comp.rs:6537-6546 | crates/render/src/comp.rs:6700-6709 | crates/render/src/comp.rs:6859-6868 | crates/render/src/comp.rs:7018-7027 | crates/render/src/comp.rs:7817-7826 | crates/render/src/comp.rs:8454-8463 | crates/render/src/comp.rs:8613-8622 | crates/render/src/comp.rs:8772-8781 | crates/render/src/comp.rs:8935-8944 | crates/render/src/comp.rs:9098-9107 | crates/render/src/comp.rs:9456-9465 | crates/render/src/comp.rs:12389-12398 | crates/render/src/comp.rs:12853-12862 | crates/render/src/comp.rs:13287-13296 | crates/render/src/comp.rs:13632-13641 | crates/render/src/comp.rs:14249-14258 | crates/render/src/comp.rs:14605-14614 | crates/render/src/comp.rs:14764-14773 | crates/render/src/comp.rs:14927-14936 | crates/render/src/comp.rs:15302-15311 | crates/render/src/comp.rs:15860-15869 | crates/render/src/comp.rs:16449-16458 | crates/render/src/comp.rs:16612-16621 | crates/render/src/comp.rs:16771-16780 | crates/render/src/comp.rs:17129-17138 | crates/render/src/comp.rs:17488-17497 | crates/render/src/comp.rs:17847-17856 | crates/render/src/comp.rs:18013-18022 | crates/render/src/comp.rs:18651-18660 | crates/render/src/comp.rs:19121-19130 | crates/render/src/comp.rs:19710-19719 | crates/render/src/comp.rs:20070-20079 | crates/render/src/comp.rs:20659-20668 | crates/render/src/comp.rs:21017-21026 | crates/render/src/comp.rs:21371-21380 | crates/render/src/comp.rs:21944-21953 — These 63 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 63 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 63 times.
  • Members sharing a duplicated core (63 members, 50+ identical tokens) crates/render/src/comp.rs:136 — crates/render/src/comp.rs:136-145 | crates/render/src/comp.rs:372-381 | crates/render/src/comp.rs:535-544 | crates/render/src/comp.rs:698-707 | crates/render/src/comp.rs:1129-1138 | crates/render/src/comp.rs:1674-1683 | crates/render/src/comp.rs:1833-1842 | crates/render/src/comp.rs:2023-2032 | crates/render/src/comp.rs:2205-2214 | crates/render/src/comp.rs:2436-2445 | crates/render/src/comp.rs:2751-2760 | crates/render/src/comp.rs:2934-2943 | crates/render/src/comp.rs:3093-3102 | crates/render/src/comp.rs:3282-3291 | crates/render/src/comp.rs:3675-3684 | crates/render/src/comp.rs:3865-3874 | crates/render/src/comp.rs:4229-4238 | crates/render/src/comp.rs:4445-4454 | crates/render/src/comp.rs:4627-4636 | crates/render/src/comp.rs:4786-4795 | crates/render/src/comp.rs:4950-4959 | crates/render/src/comp.rs:5110-5119 | crates/render/src/comp.rs:5273-5282 | crates/render/src/comp.rs:5427-5436 | crates/render/src/comp.rs:5634-5643 | crates/render/src/comp.rs:6101-6110 | crates/render/src/comp.rs:6321-6330 | crates/render/src/comp.rs:6550-6559 | crates/render/src/comp.rs:6713-6722 | crates/render/src/comp.rs:6872-6881 | crates/render/src/comp.rs:7031-7040 | crates/render/src/comp.rs:7830-7839 | crates/render/src/comp.rs:8467-8476 | crates/render/src/comp.rs:8626-8635 | crates/render/src/comp.rs:8785-8794 | crates/render/src/comp.rs:8948-8957 | crates/render/src/comp.rs:9111-9120 | crates/render/src/comp.rs:9469-9478 | crates/render/src/comp.rs:12402-12411 | crates/render/src/comp.rs:12866-12875 | crates/render/src/comp.rs:13300-13309 | crates/render/src/comp.rs:13645-13654 | crates/render/src/comp.rs:14262-14271 | crates/render/src/comp.rs:14618-14627 | crates/render/src/comp.rs:14777-14786 | crates/render/src/comp.rs:14940-14949 | crates/render/src/comp.rs:15315-15324 | crates/render/src/comp.rs:15873-15882 | crates/render/src/comp.rs:16462-16471 | crates/render/src/comp.rs:16625-16634 | crates/render/src/comp.rs:16784-16793 | crates/render/src/comp.rs:17142-17151 | crates/render/src/comp.rs:17501-17510 | crates/render/src/comp.rs:17860-17869 | crates/render/src/comp.rs:18026-18035 | crates/render/src/comp.rs:18664-18673 | crates/render/src/comp.rs:19134-19143 | crates/render/src/comp.rs:19723-19732 | crates/render/src/comp.rs:20083-20092 | crates/render/src/comp.rs:20672-20681 | crates/render/src/comp.rs:21030-21039 | crates/render/src/comp.rs:21384-21393 | crates/render/src/comp.rs:21957-21966 — These 63 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 63 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 63 times.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×5
  • Edited copy of a member (13 corresponding lines) crates/platform/src/bindings.rs:951 — crates/platform/src/bindings.rs:951-964 | crates/platform/src/bindings.rs:1326-1338 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/app/src/fence_window/hit.rs:609 — crates/app/src/fence_window/hit.rs:609-621 | crates/app/src/fence_window/hit.rs:624-636 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/platform/src/bindings.rs:297 — crates/platform/src/bindings.rs:297-310 | crates/platform/src/bindings.rs:2252-2264 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/app/src/fence_window/mod.rs:245 — crates/app/src/fence_window/mod.rs:245-258 | crates/app/src/fence_window/snap.rs:145-157 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/platform/src/crashlog.rs:45 — crates/platform/src/crashlog.rs:45-57 | crates/platform/src/crashlog.rs:61-73 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×5
  • Duplicated block (10 lines × 4) crates/platform/src/bindings.rs:4712 — crates/platform/src/bindings.rs:4712-4721 | crates/platform/src/bindings.rs:4750-4759 | crates/platform/src/bindings.rs:12393-12402 | crates/render/src/gpu_bindings.rs:5666-5675 — before extracting anything, compare `crates/platform/src/bindings.rs` and `crates/render/src/gpu_bindings.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:4712` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) crates/render/src/comp.rs:8219 — crates/render/src/comp.rs:8219-8228 | crates/render/src/comp.rs:14035-14044 | crates/render/src/comp.rs:18438-18447 | crates/render/src/comp.rs:21730-21739 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 4) crates/render/src/comp.rs:8245 — crates/render/src/comp.rs:8245-8254 | crates/render/src/comp.rs:14061-14070 | crates/render/src/comp.rs:18464-18473 | crates/render/src/comp.rs:21756-21765 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 4) crates/render/src/comp.rs:8269 — crates/render/src/comp.rs:8269-8278 | crates/render/src/comp.rs:14085-14094 | crates/render/src/comp.rs:18488-18497 | crates/render/src/comp.rs:21780-21789 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 4) crates/render/src/fence_chrome.rs:534 — crates/render/src/fence_chrome.rs:534-543 | crates/render/src/fence_chrome.rs:575-584 | crates/render/src/fence_chrome.rs:614-623 | crates/render/src/fence_chrome.rs:668-677 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/fence_chrome.rs:534` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/render/src/fence_chrome.rs:666` calls `width`, `height` and `crates/render/src/fence_chrome.rs:613` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D1 · Cyclomatic Complexity · FenceWindow · ×4
  • FenceWindow::make_handler (cyclomatic 90) crates/app/src/fence_window/handler/mod.rs:215 — FenceWindow::make_handler has cyclomatic complexity 90 (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.
  • FenceWindow::set_tabs (cyclomatic 35) crates/app/src/fence_window/api.rs:1403 — FenceWindow::set_tabs has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • FenceWindow::set_search_marks (cyclomatic 27) crates/app/src/fence_window/api.rs:1142 — FenceWindow::set_search_marks 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.
  • FenceWindow::test_input (cyclomatic 18) crates/app/src/fence_window/api.rs:705 — FenceWindow::test_input 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.
D2 · Cognitive Complexity · AppState · ×4
  • AppState::sync_desktop_partly_read (cognitive 100) crates/app/src/state.rs:1479 — AppState::sync_desktop_partly_read has cognitive complexity 100 (threshold 15). Drivers by points: if/else 31 (82 pts), boolean chains 9, match/switch 3 (5 pts), loops 4 (nesting depth added 53). 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.
  • AppState::plan_rules (cognitive 26) crates/app/src/state.rs:2683 — AppState::plan_rules has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, match/switch 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AppState::load (cognitive 17) crates/app/src/state.rs:220 — AppState::load has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 4, match/switch 2 (3 pts) (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.
  • AppState::ensure_layout (cognitive 17) crates/app/src/state.rs:749 — AppState::ensure_layout has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, loops 1, 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.
D4 · Code Duplication · Members sharing a duplicated core (62 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (62 members, 50+ identical tokens) crates/render/src/comp.rs:11 — crates/render/src/comp.rs:11-21 | crates/render/src/comp.rs:247-257 | crates/render/src/comp.rs:410-420 | crates/render/src/comp.rs:573-583 | crates/render/src/comp.rs:1004-1014 | crates/render/src/comp.rs:1549-1559 | crates/render/src/comp.rs:1708-1718 | crates/render/src/comp.rs:1898-1908 | crates/render/src/comp.rs:2080-2090 | crates/render/src/comp.rs:2311-2321 | crates/render/src/comp.rs:2626-2636 | crates/render/src/comp.rs:2809-2819 | crates/render/src/comp.rs:2968-2978 | crates/render/src/comp.rs:3157-3167 | crates/render/src/comp.rs:3550-3560 | crates/render/src/comp.rs:3740-3750 | crates/render/src/comp.rs:4104-4114 | crates/render/src/comp.rs:4320-4330 | crates/render/src/comp.rs:4502-4512 | crates/render/src/comp.rs:4661-4671 | crates/render/src/comp.rs:4825-4835 | crates/render/src/comp.rs:4985-4995 | crates/render/src/comp.rs:5148-5158 | crates/render/src/comp.rs:5509-5519 | crates/render/src/comp.rs:5976-5986 | crates/render/src/comp.rs:6196-6206 | crates/render/src/comp.rs:6425-6435 | crates/render/src/comp.rs:6588-6598 | crates/render/src/comp.rs:6747-6757 | crates/render/src/comp.rs:6906-6916 | crates/render/src/comp.rs:7705-7715 | crates/render/src/comp.rs:8342-8352 | crates/render/src/comp.rs:8501-8511 | crates/render/src/comp.rs:8660-8670 | crates/render/src/comp.rs:8823-8833 | crates/render/src/comp.rs:8986-8996 | crates/render/src/comp.rs:9344-9354 | crates/render/src/comp.rs:12277-12287 | crates/render/src/comp.rs:12741-12751 | crates/render/src/comp.rs:13175-13185 | crates/render/src/comp.rs:13520-13530 | crates/render/src/comp.rs:14137-14147 | crates/render/src/comp.rs:14493-14503 | crates/render/src/comp.rs:14652-14662 | crates/render/src/comp.rs:14815-14825 | crates/render/src/comp.rs:15190-15200 | crates/render/src/comp.rs:15748-15758 | crates/render/src/comp.rs:16337-16347 | crates/render/src/comp.rs:16500-16510 | crates/render/src/comp.rs:16659-16669 | crates/render/src/comp.rs:17017-17027 | crates/render/src/comp.rs:17376-17386 | crates/render/src/comp.rs:17735-17745 | crates/render/src/comp.rs:17901-17911 | crates/render/src/comp.rs:18539-18549 | crates/render/src/comp.rs:19009-19019 | crates/render/src/comp.rs:19598-19608 | crates/render/src/comp.rs:19958-19968 | crates/render/src/comp.rs:20547-20557 | crates/render/src/comp.rs:20905-20915 | crates/render/src/comp.rs:21259-21269 | crates/render/src/comp.rs:21832-21842 — These 62 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 62 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 62 times.
  • Members sharing a duplicated core (62 members, 50+ identical tokens) crates/render/src/comp.rs:22 — crates/render/src/comp.rs:22-32 | crates/render/src/comp.rs:258-268 | crates/render/src/comp.rs:421-431 | crates/render/src/comp.rs:584-594 | crates/render/src/comp.rs:1015-1025 | crates/render/src/comp.rs:1560-1570 | crates/render/src/comp.rs:1719-1729 | crates/render/src/comp.rs:1909-1919 | crates/render/src/comp.rs:2091-2101 | crates/render/src/comp.rs:2322-2332 | crates/render/src/comp.rs:2637-2647 | crates/render/src/comp.rs:2820-2830 | crates/render/src/comp.rs:2979-2989 | crates/render/src/comp.rs:3168-3178 | crates/render/src/comp.rs:3561-3571 | crates/render/src/comp.rs:3751-3761 | crates/render/src/comp.rs:4115-4125 | crates/render/src/comp.rs:4331-4341 | crates/render/src/comp.rs:4513-4523 | crates/render/src/comp.rs:4672-4682 | crates/render/src/comp.rs:4836-4846 | crates/render/src/comp.rs:4996-5006 | crates/render/src/comp.rs:5159-5169 | crates/render/src/comp.rs:5520-5530 | crates/render/src/comp.rs:5987-5997 | crates/render/src/comp.rs:6207-6217 | crates/render/src/comp.rs:6436-6446 | crates/render/src/comp.rs:6599-6609 | crates/render/src/comp.rs:6758-6768 | crates/render/src/comp.rs:6917-6927 | crates/render/src/comp.rs:7716-7726 | crates/render/src/comp.rs:8353-8363 | crates/render/src/comp.rs:8512-8522 | crates/render/src/comp.rs:8671-8681 | crates/render/src/comp.rs:8834-8844 | crates/render/src/comp.rs:8997-9007 | crates/render/src/comp.rs:9355-9365 | crates/render/src/comp.rs:12288-12298 | crates/render/src/comp.rs:12752-12762 | crates/render/src/comp.rs:13186-13196 | crates/render/src/comp.rs:13531-13541 | crates/render/src/comp.rs:14148-14158 | crates/render/src/comp.rs:14504-14514 | crates/render/src/comp.rs:14663-14673 | crates/render/src/comp.rs:14826-14836 | crates/render/src/comp.rs:15201-15211 | crates/render/src/comp.rs:15759-15769 | crates/render/src/comp.rs:16348-16358 | crates/render/src/comp.rs:16511-16521 | crates/render/src/comp.rs:16670-16680 | crates/render/src/comp.rs:17028-17038 | crates/render/src/comp.rs:17387-17397 | crates/render/src/comp.rs:17746-17756 | crates/render/src/comp.rs:17912-17922 | crates/render/src/comp.rs:18550-18560 | crates/render/src/comp.rs:19020-19030 | crates/render/src/comp.rs:19609-19619 | crates/render/src/comp.rs:19969-19979 | crates/render/src/comp.rs:20558-20568 | crates/render/src/comp.rs:20916-20926 | crates/render/src/comp.rs:21270-21280 | crates/render/src/comp.rs:21843-21853 — These 62 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 62 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 62 times.
  • Members sharing a duplicated core (62 members, 50+ identical tokens) crates/render/src/comp.rs:33 — crates/render/src/comp.rs:33-43 | crates/render/src/comp.rs:269-279 | crates/render/src/comp.rs:432-442 | crates/render/src/comp.rs:595-605 | crates/render/src/comp.rs:1026-1036 | crates/render/src/comp.rs:1571-1581 | crates/render/src/comp.rs:1730-1740 | crates/render/src/comp.rs:1920-1930 | crates/render/src/comp.rs:2102-2112 | crates/render/src/comp.rs:2333-2343 | crates/render/src/comp.rs:2648-2658 | crates/render/src/comp.rs:2831-2841 | crates/render/src/comp.rs:2990-3000 | crates/render/src/comp.rs:3179-3189 | crates/render/src/comp.rs:3572-3582 | crates/render/src/comp.rs:3762-3772 | crates/render/src/comp.rs:4126-4136 | crates/render/src/comp.rs:4342-4352 | crates/render/src/comp.rs:4524-4534 | crates/render/src/comp.rs:4683-4693 | crates/render/src/comp.rs:4847-4857 | crates/render/src/comp.rs:5007-5017 | crates/render/src/comp.rs:5170-5180 | crates/render/src/comp.rs:5531-5541 | crates/render/src/comp.rs:5998-6008 | crates/render/src/comp.rs:6218-6228 | crates/render/src/comp.rs:6447-6457 | crates/render/src/comp.rs:6610-6620 | crates/render/src/comp.rs:6769-6779 | crates/render/src/comp.rs:6928-6938 | crates/render/src/comp.rs:7727-7737 | crates/render/src/comp.rs:8364-8374 | crates/render/src/comp.rs:8523-8533 | crates/render/src/comp.rs:8682-8692 | crates/render/src/comp.rs:8845-8855 | crates/render/src/comp.rs:9008-9018 | crates/render/src/comp.rs:9366-9376 | crates/render/src/comp.rs:12299-12309 | crates/render/src/comp.rs:12763-12773 | crates/render/src/comp.rs:13197-13207 | crates/render/src/comp.rs:13542-13552 | crates/render/src/comp.rs:14159-14169 | crates/render/src/comp.rs:14515-14525 | crates/render/src/comp.rs:14674-14684 | crates/render/src/comp.rs:14837-14847 | crates/render/src/comp.rs:15212-15222 | crates/render/src/comp.rs:15770-15780 | crates/render/src/comp.rs:16359-16369 | crates/render/src/comp.rs:16522-16532 | crates/render/src/comp.rs:16681-16691 | crates/render/src/comp.rs:17039-17049 | crates/render/src/comp.rs:17398-17408 | crates/render/src/comp.rs:17757-17767 | crates/render/src/comp.rs:17923-17933 | crates/render/src/comp.rs:18561-18571 | crates/render/src/comp.rs:19031-19041 | crates/render/src/comp.rs:19620-19630 | crates/render/src/comp.rs:19980-19990 | crates/render/src/comp.rs:20569-20579 | crates/render/src/comp.rs:20927-20937 | crates/render/src/comp.rs:21281-21291 | crates/render/src/comp.rs:21854-21864 — These 62 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 62 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 62 times.
  • Members sharing a duplicated core (62 members, 50+ identical tokens) crates/render/src/comp.rs:51 — crates/render/src/comp.rs:51-61 | crates/render/src/comp.rs:287-297 | crates/render/src/comp.rs:450-460 | crates/render/src/comp.rs:613-623 | crates/render/src/comp.rs:1044-1054 | crates/render/src/comp.rs:1589-1599 | crates/render/src/comp.rs:1748-1758 | crates/render/src/comp.rs:1938-1948 | crates/render/src/comp.rs:2120-2130 | crates/render/src/comp.rs:2351-2361 | crates/render/src/comp.rs:2666-2676 | crates/render/src/comp.rs:2849-2859 | crates/render/src/comp.rs:3008-3018 | crates/render/src/comp.rs:3197-3207 | crates/render/src/comp.rs:3590-3600 | crates/render/src/comp.rs:3780-3790 | crates/render/src/comp.rs:4144-4154 | crates/render/src/comp.rs:4360-4370 | crates/render/src/comp.rs:4542-4552 | crates/render/src/comp.rs:4701-4711 | crates/render/src/comp.rs:4865-4875 | crates/render/src/comp.rs:5025-5035 | crates/render/src/comp.rs:5188-5198 | crates/render/src/comp.rs:5549-5559 | crates/render/src/comp.rs:6016-6026 | crates/render/src/comp.rs:6236-6246 | crates/render/src/comp.rs:6465-6475 | crates/render/src/comp.rs:6628-6638 | crates/render/src/comp.rs:6787-6797 | crates/render/src/comp.rs:6946-6956 | crates/render/src/comp.rs:7745-7755 | crates/render/src/comp.rs:8382-8392 | crates/render/src/comp.rs:8541-8551 | crates/render/src/comp.rs:8700-8710 | crates/render/src/comp.rs:8863-8873 | crates/render/src/comp.rs:9026-9036 | crates/render/src/comp.rs:9384-9394 | crates/render/src/comp.rs:12317-12327 | crates/render/src/comp.rs:12781-12791 | crates/render/src/comp.rs:13215-13225 | crates/render/src/comp.rs:13560-13570 | crates/render/src/comp.rs:14177-14187 | crates/render/src/comp.rs:14533-14543 | crates/render/src/comp.rs:14692-14702 | crates/render/src/comp.rs:14855-14865 | crates/render/src/comp.rs:15230-15240 | crates/render/src/comp.rs:15788-15798 | crates/render/src/comp.rs:16377-16387 | crates/render/src/comp.rs:16540-16550 | crates/render/src/comp.rs:16699-16709 | crates/render/src/comp.rs:17057-17067 | crates/render/src/comp.rs:17416-17426 | crates/render/src/comp.rs:17775-17785 | crates/render/src/comp.rs:17941-17951 | crates/render/src/comp.rs:18579-18589 | crates/render/src/comp.rs:19049-19059 | crates/render/src/comp.rs:19638-19648 | crates/render/src/comp.rs:19998-20008 | crates/render/src/comp.rs:20587-20597 | crates/render/src/comp.rs:20945-20955 | crates/render/src/comp.rs:21299-21309 | crates/render/src/comp.rs:21872-21882 — These 62 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 62 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 62 times.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/platform/src/bindings.rs:7111 — crates/platform/src/bindings.rs:7111-7417 | crates/platform/src/bindings.rs:8711-9051 | crates/platform/src/bindings.rs:9647-9996 | crates/platform/src/bindings.rs:10164-10260 | crates/platform/src/bindings.rs:12217-12473 | crates/platform/src/bindings.rs:15482-15708 | crates/platform/src/bindings.rs:16144-16248 — These 7 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 7 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 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/platform/src/bindings.rs:10511 — crates/platform/src/bindings.rs:10511-10768 | crates/platform/src/bindings.rs:11916-11942 | crates/platform/src/bindings.rs:12819-13059 | crates/platform/src/bindings.rs:13193-13294 | crates/platform/src/bindings.rs:13482-13632 | crates/platform/src/bindings.rs:14570-14748 | crates/platform/src/bindings.rs:17141-17773 — These 7 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 7 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 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/render/src/comp.rs:1293 — crates/render/src/comp.rs:1293-1303 | crates/render/src/comp.rs:13451-13461 | crates/render/src/comp.rs:15479-15489 | crates/render/src/comp.rs:16037-16047 | crates/render/src/comp.rs:19298-19308 | crates/render/src/comp.rs:20247-20257 | crates/render/src/comp.rs:21194-21204 — These 7 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 7 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 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/render/src/comp.rs:1314 — crates/render/src/comp.rs:1314-1324 | crates/render/src/comp.rs:13472-13482 | crates/render/src/comp.rs:15500-15510 | crates/render/src/comp.rs:16058-16068 | crates/render/src/comp.rs:19319-19329 | crates/render/src/comp.rs:20268-20278 | crates/render/src/comp.rs:21215-21225 — These 7 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 7 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 7 times.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×4
  • Edited copy of a member (11 corresponding lines) extras/pecofence-promo/scripts/make-trailer-audio.py:578 — extras/pecofence-promo/scripts/make-trailer-audio.py:578-588 | extras/pecofence-promo/scripts/make-trailer-audio.py:625-635 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/app/src/app/arrange.rs:112 — crates/app/src/app/arrange.rs:112-123 | crates/app/src/app/arrange.rs:128-138 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/platform/src/store_bindings.rs:245 — crates/platform/src/store_bindings.rs:245-255 | crates/render/src/comp.rs:7191-7201 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/render/src/comp.rs:11427 — crates/render/src/comp.rs:11427-11437 | crates/render/src/comp.rs:11452-11463 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/app/src/fence_window/state.rs:901 — crates/app/src/fence_window/state.rs:901-915 | crates/app/src/fence_window/state.rs:939-956 | crates/app/src/fence_window/state.rs:959-970 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/app/src/app/ipc.rs:501 — crates/app/src/app/ipc.rs:501-512 | crates/app/src/app/ipc.rs:2971-2983 | REDACTED:183-194 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/platform/src/bindings.rs:849 — crates/platform/src/bindings.rs:849-860 | crates/platform/src/bindings.rs:1236-1247 | crates/platform/src/bindings.rs:1346-1357 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/platform/src/bindings.rs:216 — crates/platform/src/bindings.rs:216-227 | crates/platform/src/bindings.rs:1663-1675 | crates/platform/src/bindings.rs:2605-2617 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×4
  • Edited copy of a member (9 corresponding lines) crates/app/src/fence_window/note_text.rs:515 — crates/app/src/fence_window/note_text.rs:515-523 | crates/app/src/fence_window/note_text.rs:527-537 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/app/src/marquee_offer.rs:86 — crates/app/src/marquee_offer.rs:86-96 | crates/app/src/notice.rs:119-127 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/app/src/anchor.rs:1024 — crates/app/src/anchor.rs:1024-1037 | crates/app/src/anchor.rs:1040-1048 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/app/src/app/fence_options.rs:588 — crates/app/src/app/fence_options.rs:588-596 | crates/app/src/app/fence_options.rs:624-633 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/platform/src/bindings.rs:979 — crates/platform/src/bindings.rs:979-989 | crates/platform/src/bindings.rs:1595-1608 | crates/platform/src/bindings.rs:1926-1939 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/render/src/comp.rs:5913 — crates/render/src/comp.rs:5913-5923 | crates/render/src/comp.rs:5934-5944 | crates/render/src/comp.rs:5955-5965 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/platform/src/bindings.rs:198 — crates/platform/src/bindings.rs:198-208 | crates/platform/src/bindings.rs:2109-2119 | crates/platform/src/bindings.rs:2146-2156 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/platform/src/bindings.rs:1117 — crates/platform/src/bindings.rs:1117-1127 | crates/platform/src/bindings.rs:1759-1769 | crates/platform/src/bindings.rs:2031-2041 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) crates/platform/src/autostart.rs:199 — crates/platform/src/autostart.rs:199-214 | crates/platform/src/autostart.rs:232-247 — 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 (16 lines × 2) crates/platform/src/fileinfo.rs:16 — crates/platform/src/fileinfo.rs:16-31 | crates/platform/src/fileinfo.rs:141-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/fileinfo.rs:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/render/src/fence_chrome.rs:5006 — crates/render/src/fence_chrome.rs:5006-5021 | crates/render/src/fence_chrome.rs:5393-5408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/fence_chrome.rs:5006` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/app/src/fence_window/render.rs:2011 — crates/app/src/fence_window/render.rs:2011-2026 | crates/app/src/fence_window/render.rs:2234-2249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn redraw_content(&mut` in one and `super) fn redraw_rows(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/app/src/fence_window/render.rs:2229` calls `columns_at`, `max` and `crates/app/src/fence_window/render.rs:2008` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×4
  • Duplicated block (12 lines × 2) crates/render/src/fence_chrome.rs:3325 — crates/render/src/fence_chrome.rs:3325-3336 | crates/render/src/fence_chrome.rs:3877-3888 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/fence_chrome.rs:3325` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) crates/render/src/gpu_glass.rs:272 — crates/render/src/gpu_glass.rs:272-283 | crates/render/src/gpu_glass.rs:311-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/app/src/settings_host.rs:809 — crates/app/src/settings_host.rs:809-820 | crates/app/src/settings_host.rs:826-837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) crates/app/src/filter_box.rs:201 — crates/app/src/filter_box.rs:201-212 | crates/app/src/note_edit.rs:167-179 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/filter_box.rs:201` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×4
  • Duplicated block (11 lines × 2) crates/app/src/fence_window/handler/mouse_move.rs:608 — crates/app/src/fence_window/handler/mouse_move.rs:608-618 | crates/app/src/fence_window/handler/nc.rs:267-277 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) crates/platform/src/autostart.rs:207 — crates/platform/src/autostart.rs:207-217 | crates/platform/src/shell.rs:908-918 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/autostart.rs:207` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) crates/platform/src/dragdrop.rs:961 — crates/platform/src/dragdrop.rs:961-971 | crates/platform/src/shell_menu.rs:479-489 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) crates/app/src/fence_window/roll.rs:495 — crates/app/src/fence_window/roll.rs:495-505 | crates/app/src/fence_window/roll.rs:518-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/fence_window/roll.rs:518` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn reset_root(&mut` in one and `super) fn rest_hidden(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (10 lines × 62) · ×4
  • Duplicated block (10 lines × 62) crates/render/src/comp.rs:12 — crates/render/src/comp.rs:12-21 | crates/render/src/comp.rs:248-257 | crates/render/src/comp.rs:411-420 | crates/render/src/comp.rs:574-583 | crates/render/src/comp.rs:1005-1014 | crates/render/src/comp.rs:1550-1559 | crates/render/src/comp.rs:1709-1718 | crates/render/src/comp.rs:1899-1908 | crates/render/src/comp.rs:2081-2090 | crates/render/src/comp.rs:2312-2321 | crates/render/src/comp.rs:2627-2636 | crates/render/src/comp.rs:2810-2819 | crates/render/src/comp.rs:2969-2978 | crates/render/src/comp.rs:3158-3167 | crates/render/src/comp.rs:3551-3560 | crates/render/src/comp.rs:3741-3750 | crates/render/src/comp.rs:4105-4114 | crates/render/src/comp.rs:4321-4330 | crates/render/src/comp.rs:4503-4512 | crates/render/src/comp.rs:4662-4671 | crates/render/src/comp.rs:4826-4835 | crates/render/src/comp.rs:4986-4995 | crates/render/src/comp.rs:5149-5158 | crates/render/src/comp.rs:5510-5519 | crates/render/src/comp.rs:5977-5986 | crates/render/src/comp.rs:6197-6206 | crates/render/src/comp.rs:6426-6435 | crates/render/src/comp.rs:6589-6598 | crates/render/src/comp.rs:6748-6757 | crates/render/src/comp.rs:6907-6916 | crates/render/src/comp.rs:7706-7715 | crates/render/src/comp.rs:8343-8352 | crates/render/src/comp.rs:8502-8511 | crates/render/src/comp.rs:8661-8670 | crates/render/src/comp.rs:8824-8833 | crates/render/src/comp.rs:8987-8996 | crates/render/src/comp.rs:9345-9354 | crates/render/src/comp.rs:12278-12287 | crates/render/src/comp.rs:12742-12751 | crates/render/src/comp.rs:13176-13185 | crates/render/src/comp.rs:13521-13530 | crates/render/src/comp.rs:14138-14147 | crates/render/src/comp.rs:14494-14503 | crates/render/src/comp.rs:14653-14662 | crates/render/src/comp.rs:14816-14825 | crates/render/src/comp.rs:15191-15200 | crates/render/src/comp.rs:15749-15758 | crates/render/src/comp.rs:16338-16347 | crates/render/src/comp.rs:16501-16510 | crates/render/src/comp.rs:16660-16669 | crates/render/src/comp.rs:17018-17027 | crates/render/src/comp.rs:17377-17386 | crates/render/src/comp.rs:17736-17745 | crates/render/src/comp.rs:17902-17911 | crates/render/src/comp.rs:18540-18549 | crates/render/src/comp.rs:19010-19019 | crates/render/src/comp.rs:19599-19608 | crates/render/src/comp.rs:19959-19968 | crates/render/src/comp.rs:20548-20557 | crates/render/src/comp.rs:20906-20915 | crates/render/src/comp.rs:21260-21269 | crates/render/src/comp.rs:21833-21842 — all 62 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 62) crates/render/src/comp.rs:23 — crates/render/src/comp.rs:23-32 | crates/render/src/comp.rs:259-268 | crates/render/src/comp.rs:422-431 | crates/render/src/comp.rs:585-594 | crates/render/src/comp.rs:1016-1025 | crates/render/src/comp.rs:1561-1570 | crates/render/src/comp.rs:1720-1729 | crates/render/src/comp.rs:1910-1919 | crates/render/src/comp.rs:2092-2101 | crates/render/src/comp.rs:2323-2332 | crates/render/src/comp.rs:2638-2647 | crates/render/src/comp.rs:2821-2830 | crates/render/src/comp.rs:2980-2989 | crates/render/src/comp.rs:3169-3178 | crates/render/src/comp.rs:3562-3571 | crates/render/src/comp.rs:3752-3761 | crates/render/src/comp.rs:4116-4125 | crates/render/src/comp.rs:4332-4341 | crates/render/src/comp.rs:4514-4523 | crates/render/src/comp.rs:4673-4682 | crates/render/src/comp.rs:4837-4846 | crates/render/src/comp.rs:4997-5006 | crates/render/src/comp.rs:5160-5169 | crates/render/src/comp.rs:5521-5530 | crates/render/src/comp.rs:5988-5997 | crates/render/src/comp.rs:6208-6217 | crates/render/src/comp.rs:6437-6446 | crates/render/src/comp.rs:6600-6609 | crates/render/src/comp.rs:6759-6768 | crates/render/src/comp.rs:6918-6927 | crates/render/src/comp.rs:7717-7726 | crates/render/src/comp.rs:8354-8363 | crates/render/src/comp.rs:8513-8522 | crates/render/src/comp.rs:8672-8681 | crates/render/src/comp.rs:8835-8844 | crates/render/src/comp.rs:8998-9007 | crates/render/src/comp.rs:9356-9365 | crates/render/src/comp.rs:12289-12298 | crates/render/src/comp.rs:12753-12762 | crates/render/src/comp.rs:13187-13196 | crates/render/src/comp.rs:13532-13541 | crates/render/src/comp.rs:14149-14158 | crates/render/src/comp.rs:14505-14514 | crates/render/src/comp.rs:14664-14673 | crates/render/src/comp.rs:14827-14836 | crates/render/src/comp.rs:15202-15211 | crates/render/src/comp.rs:15760-15769 | crates/render/src/comp.rs:16349-16358 | crates/render/src/comp.rs:16512-16521 | crates/render/src/comp.rs:16671-16680 | crates/render/src/comp.rs:17029-17038 | crates/render/src/comp.rs:17388-17397 | crates/render/src/comp.rs:17747-17756 | crates/render/src/comp.rs:17913-17922 | crates/render/src/comp.rs:18551-18560 | crates/render/src/comp.rs:19021-19030 | crates/render/src/comp.rs:19610-19619 | crates/render/src/comp.rs:19970-19979 | crates/render/src/comp.rs:20559-20568 | crates/render/src/comp.rs:20917-20926 | crates/render/src/comp.rs:21271-21280 | crates/render/src/comp.rs:21844-21853 — all 62 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 62) crates/render/src/comp.rs:34 — crates/render/src/comp.rs:34-43 | crates/render/src/comp.rs:270-279 | crates/render/src/comp.rs:433-442 | crates/render/src/comp.rs:596-605 | crates/render/src/comp.rs:1027-1036 | crates/render/src/comp.rs:1572-1581 | crates/render/src/comp.rs:1731-1740 | crates/render/src/comp.rs:1921-1930 | crates/render/src/comp.rs:2103-2112 | crates/render/src/comp.rs:2334-2343 | crates/render/src/comp.rs:2649-2658 | crates/render/src/comp.rs:2832-2841 | crates/render/src/comp.rs:2991-3000 | crates/render/src/comp.rs:3180-3189 | crates/render/src/comp.rs:3573-3582 | crates/render/src/comp.rs:3763-3772 | crates/render/src/comp.rs:4127-4136 | crates/render/src/comp.rs:4343-4352 | crates/render/src/comp.rs:4525-4534 | crates/render/src/comp.rs:4684-4693 | crates/render/src/comp.rs:4848-4857 | crates/render/src/comp.rs:5008-5017 | crates/render/src/comp.rs:5171-5180 | crates/render/src/comp.rs:5532-5541 | crates/render/src/comp.rs:5999-6008 | crates/render/src/comp.rs:6219-6228 | crates/render/src/comp.rs:6448-6457 | crates/render/src/comp.rs:6611-6620 | crates/render/src/comp.rs:6770-6779 | crates/render/src/comp.rs:6929-6938 | crates/render/src/comp.rs:7728-7737 | crates/render/src/comp.rs:8365-8374 | crates/render/src/comp.rs:8524-8533 | crates/render/src/comp.rs:8683-8692 | crates/render/src/comp.rs:8846-8855 | crates/render/src/comp.rs:9009-9018 | crates/render/src/comp.rs:9367-9376 | crates/render/src/comp.rs:12300-12309 | crates/render/src/comp.rs:12764-12773 | crates/render/src/comp.rs:13198-13207 | crates/render/src/comp.rs:13543-13552 | crates/render/src/comp.rs:14160-14169 | crates/render/src/comp.rs:14516-14525 | crates/render/src/comp.rs:14675-14684 | crates/render/src/comp.rs:14838-14847 | crates/render/src/comp.rs:15213-15222 | crates/render/src/comp.rs:15771-15780 | crates/render/src/comp.rs:16360-16369 | crates/render/src/comp.rs:16523-16532 | crates/render/src/comp.rs:16682-16691 | crates/render/src/comp.rs:17040-17049 | crates/render/src/comp.rs:17399-17408 | crates/render/src/comp.rs:17758-17767 | crates/render/src/comp.rs:17924-17933 | crates/render/src/comp.rs:18562-18571 | crates/render/src/comp.rs:19032-19041 | crates/render/src/comp.rs:19621-19630 | crates/render/src/comp.rs:19981-19990 | crates/render/src/comp.rs:20570-20579 | crates/render/src/comp.rs:20928-20937 | crates/render/src/comp.rs:21282-21291 | crates/render/src/comp.rs:21855-21864 — all 62 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 62) crates/render/src/comp.rs:52 — crates/render/src/comp.rs:52-61 | crates/render/src/comp.rs:288-297 | crates/render/src/comp.rs:451-460 | crates/render/src/comp.rs:614-623 | crates/render/src/comp.rs:1045-1054 | crates/render/src/comp.rs:1590-1599 | crates/render/src/comp.rs:1749-1758 | crates/render/src/comp.rs:1939-1948 | crates/render/src/comp.rs:2121-2130 | crates/render/src/comp.rs:2352-2361 | crates/render/src/comp.rs:2667-2676 | crates/render/src/comp.rs:2850-2859 | crates/render/src/comp.rs:3009-3018 | crates/render/src/comp.rs:3198-3207 | crates/render/src/comp.rs:3591-3600 | crates/render/src/comp.rs:3781-3790 | crates/render/src/comp.rs:4145-4154 | crates/render/src/comp.rs:4361-4370 | crates/render/src/comp.rs:4543-4552 | crates/render/src/comp.rs:4702-4711 | crates/render/src/comp.rs:4866-4875 | crates/render/src/comp.rs:5026-5035 | crates/render/src/comp.rs:5189-5198 | crates/render/src/comp.rs:5550-5559 | crates/render/src/comp.rs:6017-6026 | crates/render/src/comp.rs:6237-6246 | crates/render/src/comp.rs:6466-6475 | crates/render/src/comp.rs:6629-6638 | crates/render/src/comp.rs:6788-6797 | crates/render/src/comp.rs:6947-6956 | crates/render/src/comp.rs:7746-7755 | crates/render/src/comp.rs:8383-8392 | crates/render/src/comp.rs:8542-8551 | crates/render/src/comp.rs:8701-8710 | crates/render/src/comp.rs:8864-8873 | crates/render/src/comp.rs:9027-9036 | crates/render/src/comp.rs:9385-9394 | crates/render/src/comp.rs:12318-12327 | crates/render/src/comp.rs:12782-12791 | crates/render/src/comp.rs:13216-13225 | crates/render/src/comp.rs:13561-13570 | crates/render/src/comp.rs:14178-14187 | crates/render/src/comp.rs:14534-14543 | crates/render/src/comp.rs:14693-14702 | crates/render/src/comp.rs:14856-14865 | crates/render/src/comp.rs:15231-15240 | crates/render/src/comp.rs:15789-15798 | crates/render/src/comp.rs:16378-16387 | crates/render/src/comp.rs:16541-16550 | crates/render/src/comp.rs:16700-16709 | crates/render/src/comp.rs:17058-17067 | crates/render/src/comp.rs:17417-17426 | crates/render/src/comp.rs:17776-17785 | crates/render/src/comp.rs:17942-17951 | crates/render/src/comp.rs:18580-18589 | crates/render/src/comp.rs:19050-19059 | crates/render/src/comp.rs:19639-19648 | crates/render/src/comp.rs:19999-20008 | crates/render/src/comp.rs:20588-20597 | crates/render/src/comp.rs:20946-20955 | crates/render/src/comp.rs:21300-21309 | crates/render/src/comp.rs:21873-21882 — all 62 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×4
  • Duplicated block (8 lines × 2) crates/platform/src/bindings.rs:9736 — crates/platform/src/bindings.rs:9736-9743 | crates/platform/src/store_bindings.rs:48-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:9736` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/platform/src/bindings.rs:10596 — crates/platform/src/bindings.rs:10596-10603 | crates/platform/src/bindings.rs:14717-14724 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:10596` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) crates/platform/src/bindings.rs:10936 — crates/platform/src/bindings.rs:10936-10943 | crates/platform/src/bindings.rs:12285-12292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:10936` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/render/src/gpu_bindings.rs:6222 — crates/render/src/gpu_bindings.rs:6222-6229 | crates/render/src/gpu_bindings.rs:6276-6283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/gpu_bindings.rs:6222` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×4
  • Duplicated block (6 lines × 3) crates/platform/src/bindings.rs:7389 — crates/platform/src/bindings.rs:7389-7394 | crates/platform/src/bindings.rs:7856-7861 | crates/platform/src/bindings.rs:14585-14590 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:7389` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 3) crates/platform/src/bindings.rs:12873 — crates/platform/src/bindings.rs:12873-12878 | crates/platform/src/bindings.rs:12896-12901 | crates/platform/src/bindings.rs:12936-12941 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:12873` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 3) crates/platform/src/bindings.rs:13490 — crates/platform/src/bindings.rs:13490-13495 | crates/platform/src/bindings.rs:13512-13517 | crates/platform/src/bindings.rs:13533-13538 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:13490` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 3) crates/app/src/filter_box.rs:206 — crates/app/src/filter_box.rs:206-213 | crates/app/src/peek_search.rs:1073-1078 | crates/app/src/rename.rs:553-561 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/filter_box.rs:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×4
  • Duplicated block (6 lines × 2 locations) extras/pecofence-promo/scripts/make-assets.mjs:2 — extras/pecofence-promo/scripts/make-assets.mjs:2 · extras/pecofence-promo/scripts/make-energy-audio.mjs:2 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (6 lines × 2 locations) extras/pecofence-promo/src/reviewed/EndCard.tsx:3 — extras/pecofence-promo/src/reviewed/EndCard.tsx:3 · extras/pecofence-promo/src/reviewed/FileAccess.tsx:4 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) scripts/test-settings-ui.mjs:356 — scripts/test-settings-ui.mjs:356 · scripts/test-settings-ui.mjs:1837 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) scripts/test-settings-ui.mjs:1595 — scripts/test-settings-ui.mjs:1595 · scripts/test-settings-ui.mjs:1610 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
D1 · Cyclomatic Complexity · AppState · ×3
  • AppState::sync_desktop_partly_read (cyclomatic 46) crates/app/src/state.rs:1479 — AppState::sync_desktop_partly_read 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.
  • AppState::load (cyclomatic 17) crates/app/src/state.rs:220 — AppState::load 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.
  • AppState::plan_rules (cyclomatic 16) crates/app/src/state.rs:2683 — AppState::plan_rules has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DesktopAnchor · ×3
  • DesktopAnchor::on_timer (cyclomatic 33) crates/app/src/anchor.rs:2138 — DesktopAnchor::on_timer 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.
  • DesktopAnchor::ensure_anchored (cyclomatic 27) crates/app/src/anchor.rs:1548 — DesktopAnchor::ensure_anchored 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.
  • DesktopAnchor::on_foreground (cyclomatic 18) crates/app/src/anchor.rs:1261 — DesktopAnchor::on_foreground 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 · pecofence_render · ×3
  • pecofence_render::fence_chrome::draw_plate (cyclomatic 29) crates/render/src/fence_chrome.rs:1122 — pecofence_render::fence_chrome::draw_plate 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.
  • pecofence_render::liquid_glass::displacement_field (cyclomatic 18) crates/render/src/liquid_glass.rs:304 — pecofence_render::liquid_glass::displacement_field 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.
  • pecofence_render::liquid_glass::crop_with_neighbors (cyclomatic 16) crates/render/src/liquid_glass.rs:573 — pecofence_render::liquid_glass::crop_with_neighbors 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 · FenceWindow · ×3
  • FenceWindow::set_tabs (cognitive 51) crates/app/src/fence_window/api.rs:1403 — FenceWindow::set_tabs has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (33 pts), boolean chains 13, loops 1 (3 pts), match/switch 1 (2 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.
  • FenceWindow::set_search_marks (cognitive 46) crates/app/src/fence_window/api.rs:1142 — FenceWindow::set_search_marks has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 5, loops 1 (2 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.
  • FenceWindow::make_handler (cognitive 19) crates/app/src/fence_window/handler/mod.rs:215 — FenceWindow::make_handler has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, match/switch 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.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×3
  • Edited copy of a member (27 corresponding lines) crates/app/src/fence_window/dnd.rs:1230 — crates/app/src/fence_window/dnd.rs:1230-1256 | crates/app/src/fence_window/dnd.rs:1263-1291 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/platform/src/bindings.rs:4815 — crates/platform/src/bindings.rs:4815-4841 | crates/platform/src/bindings.rs:4905-4933 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/app/src/fence_window/handler/timers.rs:270 — crates/app/src/fence_window/handler/timers.rs:270-307 | crates/app/src/fence_window/handler/timers.rs:318-344 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×3
  • Edited copy of a member (22 corresponding lines) crates/app/src/app/undo.rs:656 — crates/app/src/app/undo.rs:656-677 | crates/app/src/app/undo.rs:682-708 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/platform/src/rawinput.rs:38 — crates/platform/src/rawinput.rs:38-69 | crates/platform/src/rawinput.rs:97-118 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) crates/platform/src/edit.rs:626 — crates/platform/src/edit.rs:626-647 | crates/platform/src/paint.rs:13-35 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×3
  • Edited copy of a member (8 corresponding lines) extras/pecofence-promo/scripts/make-trailer-audio.py:641 — extras/pecofence-promo/scripts/make-trailer-audio.py:641-650 | extras/pecofence-promo/scripts/make-trailer-audio.py:676-683 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/app/src/app/ipc.rs:217 — crates/app/src/app/ipc.rs:217-224 | crates/ipc/src/dto.rs:22-29 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/app/src/app/ipc.rs:226 — crates/app/src/app/ipc.rs:226-233 | crates/ipc/src/dto.rs:33-40 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×3
  • Edited copy of a member (17 corresponding lines) crates/platform/src/shell.rs:838 — crates/platform/src/shell.rs:838-854 | crates/platform/src/wide.rs:16-40 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/platform/src/dragdrop.rs:213 — crates/platform/src/dragdrop.rs:213-229 | crates/platform/src/dragdrop.rs:1147-1163 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/render/src/gpu_glass.rs:55 — crates/render/src/gpu_glass.rs:55-74 | crates/render/src/text_shadow.rs:170-186 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×3
  • Edited copy of a member (19 corresponding lines) crates/app/src/fence_window/hit.rs:431 — crates/app/src/fence_window/hit.rs:431-454 | crates/app/src/fence_window/hit.rs:478-496 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/platform/src/autostart.rs:231 — crates/platform/src/autostart.rs:231-249 | crates/platform/src/theme.rs:48-70 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/platform/src/dialogs.rs:169 — crates/platform/src/dialogs.rs:169-187 | crates/platform/src/shell_icons.rs:132-150 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) crates/platform/src/rawinput.rs:39 — crates/platform/src/rawinput.rs:39-52 | crates/platform/src/rawinput.rs:98-111 — 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 (14 lines × 2) crates/platform/src/shell.rs:1239 — crates/platform/src/shell.rs:1239-1252 | crates/platform/src/wallpaper.rs:605-618 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/platform/src/shell.rs:1235` calls `cast` and `crates/platform/src/wallpaper.rs:604` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) crates/render/src/fence_chrome.rs:3477 — crates/render/src/fence_chrome.rs:3477-3490 | crates/render/src/fence_chrome.rs:4030-4043 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/fence_chrome.rs:3477` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×3
  • Duplicated block (12 lines × 3) crates/platform/src/bindings.rs:6745 — crates/platform/src/bindings.rs:6745-6756 | crates/platform/src/bindings.rs:14630-14641 | crates/platform/src/bindings.rs:16228-16239 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:6745` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) crates/platform/src/bindings.rs:13275 — crates/platform/src/bindings.rs:13275-13286 | crates/platform/src/bindings.rs:16229-16240 | crates/platform/src/bindings.rs:16462-16473 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:13275` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 3) crates/platform/src/bindings.rs:13561 — crates/platform/src/bindings.rs:13561-13572 | crates/render/src/comp.rs:11649-11660 | crates/render/src/gpu_bindings.rs:6072-6083 — before extracting anything, compare `crates/platform/src/bindings.rs` and `crates/render/src/comp.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:13561` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 63) · ×3
  • Duplicated block (9 lines × 63) crates/render/src/comp.rs:111 — crates/render/src/comp.rs:111-119 | crates/render/src/comp.rs:347-355 | crates/render/src/comp.rs:510-518 | crates/render/src/comp.rs:673-681 | crates/render/src/comp.rs:1104-1112 | crates/render/src/comp.rs:1649-1657 | crates/render/src/comp.rs:1808-1816 | crates/render/src/comp.rs:1998-2006 | crates/render/src/comp.rs:2180-2188 | crates/render/src/comp.rs:2411-2419 | crates/render/src/comp.rs:2726-2734 | crates/render/src/comp.rs:2909-2917 | crates/render/src/comp.rs:3068-3076 | crates/render/src/comp.rs:3257-3265 | crates/render/src/comp.rs:3650-3658 | crates/render/src/comp.rs:3840-3848 | crates/render/src/comp.rs:4204-4212 | crates/render/src/comp.rs:4420-4428 | crates/render/src/comp.rs:4602-4610 | crates/render/src/comp.rs:4761-4769 | crates/render/src/comp.rs:4925-4933 | crates/render/src/comp.rs:5085-5093 | crates/render/src/comp.rs:5248-5256 | crates/render/src/comp.rs:5402-5410 | crates/render/src/comp.rs:5609-5617 | crates/render/src/comp.rs:6076-6084 | crates/render/src/comp.rs:6296-6304 | crates/render/src/comp.rs:6525-6533 | crates/render/src/comp.rs:6688-6696 | crates/render/src/comp.rs:6847-6855 | crates/render/src/comp.rs:7006-7014 | crates/render/src/comp.rs:7805-7813 | crates/render/src/comp.rs:8442-8450 | crates/render/src/comp.rs:8601-8609 | crates/render/src/comp.rs:8760-8768 | crates/render/src/comp.rs:8923-8931 | crates/render/src/comp.rs:9086-9094 | crates/render/src/comp.rs:9444-9452 | crates/render/src/comp.rs:12377-12385 | crates/render/src/comp.rs:12841-12849 | crates/render/src/comp.rs:13275-13283 | crates/render/src/comp.rs:13620-13628 | crates/render/src/comp.rs:14237-14245 | crates/render/src/comp.rs:14593-14601 | crates/render/src/comp.rs:14752-14760 | crates/render/src/comp.rs:14915-14923 | crates/render/src/comp.rs:15290-15298 | crates/render/src/comp.rs:15848-15856 | crates/render/src/comp.rs:16437-16445 | crates/render/src/comp.rs:16600-16608 | crates/render/src/comp.rs:16759-16767 | crates/render/src/comp.rs:17117-17125 | crates/render/src/comp.rs:17476-17484 | crates/render/src/comp.rs:17835-17843 | crates/render/src/comp.rs:18001-18009 | crates/render/src/comp.rs:18639-18647 | crates/render/src/comp.rs:19109-19117 | crates/render/src/comp.rs:19698-19706 | crates/render/src/comp.rs:20058-20066 | crates/render/src/comp.rs:20647-20655 | crates/render/src/comp.rs:21005-21013 | crates/render/src/comp.rs:21359-21367 | crates/render/src/comp.rs:21932-21940 — all 63 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 63) crates/render/src/comp.rs:124 — crates/render/src/comp.rs:124-132 | crates/render/src/comp.rs:360-368 | crates/render/src/comp.rs:523-531 | crates/render/src/comp.rs:686-694 | crates/render/src/comp.rs:1117-1125 | crates/render/src/comp.rs:1662-1670 | crates/render/src/comp.rs:1821-1829 | crates/render/src/comp.rs:2011-2019 | crates/render/src/comp.rs:2193-2201 | crates/render/src/comp.rs:2424-2432 | crates/render/src/comp.rs:2739-2747 | crates/render/src/comp.rs:2922-2930 | crates/render/src/comp.rs:3081-3089 | crates/render/src/comp.rs:3270-3278 | crates/render/src/comp.rs:3663-3671 | crates/render/src/comp.rs:3853-3861 | crates/render/src/comp.rs:4217-4225 | crates/render/src/comp.rs:4433-4441 | crates/render/src/comp.rs:4615-4623 | crates/render/src/comp.rs:4774-4782 | crates/render/src/comp.rs:4938-4946 | crates/render/src/comp.rs:5098-5106 | crates/render/src/comp.rs:5261-5269 | crates/render/src/comp.rs:5415-5423 | crates/render/src/comp.rs:5622-5630 | crates/render/src/comp.rs:6089-6097 | crates/render/src/comp.rs:6309-6317 | crates/render/src/comp.rs:6538-6546 | crates/render/src/comp.rs:6701-6709 | crates/render/src/comp.rs:6860-6868 | crates/render/src/comp.rs:7019-7027 | crates/render/src/comp.rs:7818-7826 | crates/render/src/comp.rs:8455-8463 | crates/render/src/comp.rs:8614-8622 | crates/render/src/comp.rs:8773-8781 | crates/render/src/comp.rs:8936-8944 | crates/render/src/comp.rs:9099-9107 | crates/render/src/comp.rs:9457-9465 | crates/render/src/comp.rs:12390-12398 | crates/render/src/comp.rs:12854-12862 | crates/render/src/comp.rs:13288-13296 | crates/render/src/comp.rs:13633-13641 | crates/render/src/comp.rs:14250-14258 | crates/render/src/comp.rs:14606-14614 | crates/render/src/comp.rs:14765-14773 | crates/render/src/comp.rs:14928-14936 | crates/render/src/comp.rs:15303-15311 | crates/render/src/comp.rs:15861-15869 | crates/render/src/comp.rs:16450-16458 | crates/render/src/comp.rs:16613-16621 | crates/render/src/comp.rs:16772-16780 | crates/render/src/comp.rs:17130-17138 | crates/render/src/comp.rs:17489-17497 | crates/render/src/comp.rs:17848-17856 | crates/render/src/comp.rs:18014-18022 | crates/render/src/comp.rs:18652-18660 | crates/render/src/comp.rs:19122-19130 | crates/render/src/comp.rs:19711-19719 | crates/render/src/comp.rs:20071-20079 | crates/render/src/comp.rs:20660-20668 | crates/render/src/comp.rs:21018-21026 | crates/render/src/comp.rs:21372-21380 | crates/render/src/comp.rs:21945-21953 — all 63 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 63) crates/render/src/comp.rs:137 — crates/render/src/comp.rs:137-145 | crates/render/src/comp.rs:373-381 | crates/render/src/comp.rs:536-544 | crates/render/src/comp.rs:699-707 | crates/render/src/comp.rs:1130-1138 | crates/render/src/comp.rs:1675-1683 | crates/render/src/comp.rs:1834-1842 | crates/render/src/comp.rs:2024-2032 | crates/render/src/comp.rs:2206-2214 | crates/render/src/comp.rs:2437-2445 | crates/render/src/comp.rs:2752-2760 | crates/render/src/comp.rs:2935-2943 | crates/render/src/comp.rs:3094-3102 | crates/render/src/comp.rs:3283-3291 | crates/render/src/comp.rs:3676-3684 | crates/render/src/comp.rs:3866-3874 | crates/render/src/comp.rs:4230-4238 | crates/render/src/comp.rs:4446-4454 | crates/render/src/comp.rs:4628-4636 | crates/render/src/comp.rs:4787-4795 | crates/render/src/comp.rs:4951-4959 | crates/render/src/comp.rs:5111-5119 | crates/render/src/comp.rs:5274-5282 | crates/render/src/comp.rs:5428-5436 | crates/render/src/comp.rs:5635-5643 | crates/render/src/comp.rs:6102-6110 | crates/render/src/comp.rs:6322-6330 | crates/render/src/comp.rs:6551-6559 | crates/render/src/comp.rs:6714-6722 | crates/render/src/comp.rs:6873-6881 | crates/render/src/comp.rs:7032-7040 | crates/render/src/comp.rs:7831-7839 | crates/render/src/comp.rs:8468-8476 | crates/render/src/comp.rs:8627-8635 | crates/render/src/comp.rs:8786-8794 | crates/render/src/comp.rs:8949-8957 | crates/render/src/comp.rs:9112-9120 | crates/render/src/comp.rs:9470-9478 | crates/render/src/comp.rs:12403-12411 | crates/render/src/comp.rs:12867-12875 | crates/render/src/comp.rs:13301-13309 | crates/render/src/comp.rs:13646-13654 | crates/render/src/comp.rs:14263-14271 | crates/render/src/comp.rs:14619-14627 | crates/render/src/comp.rs:14778-14786 | crates/render/src/comp.rs:14941-14949 | crates/render/src/comp.rs:15316-15324 | crates/render/src/comp.rs:15874-15882 | crates/render/src/comp.rs:16463-16471 | crates/render/src/comp.rs:16626-16634 | crates/render/src/comp.rs:16785-16793 | crates/render/src/comp.rs:17143-17151 | crates/render/src/comp.rs:17502-17510 | crates/render/src/comp.rs:17861-17869 | crates/render/src/comp.rs:18027-18035 | crates/render/src/comp.rs:18665-18673 | crates/render/src/comp.rs:19135-19143 | crates/render/src/comp.rs:19724-19732 | crates/render/src/comp.rs:20084-20092 | crates/render/src/comp.rs:20673-20681 | crates/render/src/comp.rs:21031-21039 | crates/render/src/comp.rs:21385-21393 | crates/render/src/comp.rs:21958-21966 — all 63 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×3
  • Duplicated block (9 lines × 4) crates/platform/src/bindings.rs:11919 — crates/platform/src/bindings.rs:11919-11927 | crates/platform/src/bindings.rs:17250-17258 | crates/platform/src/bindings.rs:17275-17283 | crates/platform/src/bindings.rs:17691-17699 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:11919` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) crates/platform/src/bindings.rs:15545 — crates/platform/src/bindings.rs:15545-15553 | crates/platform/src/bindings.rs:15578-15586 | crates/platform/src/bindings.rs:15597-15605 | crates/platform/src/bindings.rs:15637-15645 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:15545` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) crates/render/src/comp.rs:8233 — crates/render/src/comp.rs:8233-8241 | crates/render/src/comp.rs:14049-14057 | crates/render/src/comp.rs:18452-18460 | crates/render/src/comp.rs:21744-21752 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×3
  • Duplicated block (7 lines × 3) crates/platform/src/bindings.rs:7789 — crates/platform/src/bindings.rs:7789-7795 | crates/platform/src/bindings.rs:7822-7828 | crates/platform/src/bindings.rs:7839-7845 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:7789` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 3) crates/platform/src/bindings.rs:9840 — crates/platform/src/bindings.rs:9840-9846 | crates/platform/src/bindings.rs:9876-9882 | crates/platform/src/bindings.rs:9892-9898 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:9840` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 3) crates/platform/src/bindings.rs:14111 — crates/platform/src/bindings.rs:14111-14118 | crates/platform/src/bindings.rs:14143-14150 | crates/platform/src/bindings.rs:14173-14179 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:14111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (7 lines × 2 locations) · ×3
  • Duplicated block (7 lines × 2 locations) extras/pecofence-promo/src/motion/Closing.tsx:1 — extras/pecofence-promo/src/motion/Closing.tsx:1 · extras/pecofence-promo/src/motion/Hero.tsx:1 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (7 lines × 2 locations) extras/pecofence-promo/src/motion/NewFiles.tsx:22 — extras/pecofence-promo/src/motion/NewFiles.tsx:22 · extras/pecofence-promo/src/motion/NewFiles.tsx:35 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (7 lines × 2 locations) scripts/test-settings-ui.mjs:811 — scripts/test-settings-ui.mjs:811 · scripts/test-settings-ui.mjs:894 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 12, cognitive 9) · ×3
  • Complex function (anonymous) (cyclomatic 12, cognitive 9) scripts/test-settings-ui.mjs:739 — (anonymous) has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function (anonymous) (cyclomatic 12, cognitive 9) scripts/test-settings-ui.mjs:897 — (anonymous) has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function (anonymous) (cyclomatic 12, cognitive 9) scripts/test-settings-ui.mjs:2488 — (anonymous) has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
D1 · Cyclomatic Complexity · FenceDropHandler · ×2
  • FenceDropHandler::drop (cyclomatic 45) crates/app/src/fence_window/dnd.rs:815 — FenceDropHandler::drop has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • FenceDropHandler::feedback (cyclomatic 23) crates/app/src/fence_window/dnd.rs:565 — FenceDropHandler::feedback 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.
D2 · Cognitive Complexity · FenceDropHandler · ×2
  • FenceDropHandler::drop (cognitive 80) crates/app/src/fence_window/dnd.rs:815 — FenceDropHandler::drop has cognitive complexity 80 (threshold 15). Drivers by points: if/else 38 (73 pts), boolean chains 4, match/switch 2 (3 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.
  • FenceDropHandler::feedback (cognitive 26) crates/app/src/fence_window/dnd.rs:565 — FenceDropHandler::feedback has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · IconCache · ×2
  • IconCache::new (cognitive 44) crates/app/src/icons.rs:261 — IconCache::new has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (32 pts), boolean chains 6, loops 2 (3 pts), match/switch 1 (3 pts) (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.
  • IconCache::drain_results (cognitive 23) crates/app/src/icons.rs:505 — IconCache::drain_results has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, match/switch 1 (2 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 · pecofence_cli · ×2
  • pecofence_cli::run::run_fence (cognitive 35) crates/cli/src/run.rs:206 — pecofence_cli::run::run_fence has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • pecofence_cli::local::print_log (cognitive 16) crates/cli/src/local.rs:221 — pecofence_cli::local::print_log has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 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 · Layout · ×2
  • Layout::normalize_tabs (cognitive 35) crates/core/src/model.rs:1821 — Layout::normalize_tabs has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 7, loops 6 (7 pts), 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.
  • Layout::detach_tab (cognitive 17) crates/core/src/model.rs:1650 — Layout::detach_tab has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium CVE · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (16 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (16 members, 50+ identical tokens) crates/render/src/comp.rs:972 — crates/render/src/comp.rs:972-982 | crates/render/src/comp.rs:1517-1527 | crates/render/src/comp.rs:9312-9322 | crates/render/src/comp.rs:13143-13153 | crates/render/src/comp.rs:14461-14471 | crates/render/src/comp.rs:15158-15168 | crates/render/src/comp.rs:15716-15726 | crates/render/src/comp.rs:16305-16315 | crates/render/src/comp.rs:16985-16995 | crates/render/src/comp.rs:17344-17354 | crates/render/src/comp.rs:17703-17713 | crates/render/src/comp.rs:18977-18987 | crates/render/src/comp.rs:19566-19576 | crates/render/src/comp.rs:19926-19936 | crates/render/src/comp.rs:20515-20525 | crates/render/src/comp.rs:20873-20883 — These 16 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 16 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 16 times.
  • Members sharing a duplicated core (16 members, 50+ identical tokens) crates/render/src/comp.rs:983 — crates/render/src/comp.rs:983-993 | crates/render/src/comp.rs:1528-1538 | crates/render/src/comp.rs:9323-9333 | crates/render/src/comp.rs:13154-13164 | crates/render/src/comp.rs:14472-14482 | crates/render/src/comp.rs:15169-15179 | crates/render/src/comp.rs:15727-15737 | crates/render/src/comp.rs:16316-16326 | crates/render/src/comp.rs:16996-17006 | crates/render/src/comp.rs:17355-17365 | crates/render/src/comp.rs:17714-17724 | crates/render/src/comp.rs:18988-18998 | crates/render/src/comp.rs:19577-19587 | crates/render/src/comp.rs:19937-19947 | crates/render/src/comp.rs:20526-20536 | crates/render/src/comp.rs:20884-20894 — These 16 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 16 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 16 times.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×2
  • Edited copy of a member (21 corresponding lines) crates/app/src/drag_guides.rs:88 — crates/app/src/drag_guides.rs:88-108 | crates/app/src/drop_preview.rs:81-110 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/app/src/app/ipc.rs:1399 — crates/app/src/app/ipc.rs:1399-1423 | crates/app/src/app/ipc.rs:1536-1556 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) crates/platform/src/bindings.rs:10800 — crates/platform/src/bindings.rs:10800-10815 | crates/platform/src/store_bindings.rs:45-64 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/platform/src/shell.rs:1656 — crates/platform/src/shell.rs:1656-1676 | crates/platform/src/shell.rs:1679-1694 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×2
  • Edited copy of a member (14 corresponding lines) crates/app/src/filter_box.rs:366 — crates/app/src/filter_box.rs:366-380 | crates/app/src/peek_search.rs:1846-1859 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/platform/src/edit.rs:408 — crates/platform/src/edit.rs:408-422 | crates/platform/src/edit.rs:525-538 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (6 members, 11+ corresponding lines) crates/render/src/comp.rs:7538 — crates/render/src/comp.rs:7538-7548 | crates/render/src/comp.rs:7553-7565 | crates/render/src/comp.rs:7568-7578 | crates/render/src/comp.rs:7581-7591 | crates/render/src/comp.rs:7594-7604 | crates/render/src/comp.rs:7607-7617 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 11+ corresponding lines) crates/render/src/comp.rs:3398 — crates/render/src/comp.rs:3398-3409 | crates/render/src/comp.rs:3458-3469 | crates/render/src/comp.rs:3538-3549 | crates/render/src/comp.rs:7104-7114 | crates/render/src/comp.rs:7279-7289 | crates/render/src/comp.rs:7376-7386 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×2
  • Edited copy of a member (7 corresponding lines) crates/app/src/fence_window/selection.rs:466 — crates/app/src/fence_window/selection.rs:466-472 | crates/app/src/fence_window/selection.rs:744-750 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/app/src/fence_window/group.rs:80 — crates/app/src/fence_window/group.rs:80-91 | crates/app/src/fence_window/snap.rs:160-166 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 10+ corresponding lines) crates/platform/src/bindings.rs:758 — crates/platform/src/bindings.rs:758-768 | crates/platform/src/bindings.rs:812-822 | crates/platform/src/bindings.rs:1470-1479 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) crates/render/src/motion.rs:207 — crates/render/src/motion.rs:207-216 | crates/render/src/motion.rs:219-228 | crates/render/src/motion.rs:231-240 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) crates/app/src/app/mod.rs:1075 — crates/app/src/app/mod.rs:1075-1089 | crates/app/src/app/mod.rs:1097-1111 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/app/mod.rs:1075` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) crates/platform/src/filedialog.rs:63 — crates/platform/src/filedialog.rs:63-77 | crates/platform/src/filedialog.rs:89-103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/filedialog.rs:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) crates/app/src/fence_window/handler/mouse.rs:80 — crates/app/src/fence_window/handler/mouse.rs:80-93 | crates/app/src/fence_window/handler/nc.rs:293-307 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/app/src/fence_window/handler/nc.rs:311` calls `set`, `get_capture` and `crates/app/src/fence_window/handler/mouse.rs:94` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14–15 lines × 2) crates/app/src/fence_window/handler/mouse.rs:313 — crates/app/src/fence_window/handler/mouse.rs:313-326 | crates/app/src/fence_window/handler/mouse.rs:843-857 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/fence_window/handler/mouse.rs:313` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) crates/platform/src/bindings.rs:13274 — crates/platform/src/bindings.rs:13274-13286 | crates/platform/src/bindings.rs:16461-16473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:13274` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) crates/app/src/fence_window/render.rs:2040 — crates/app/src/fence_window/render.rs:2040-2052 | crates/app/src/fence_window/render.rs:2264-2276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/fence_window/render.rs:2040` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×2
  • Duplicated block (11 lines × 6) crates/render/src/comp.rs:1282 — crates/render/src/comp.rs:1282-1292 | crates/render/src/comp.rs:15468-15478 | crates/render/src/comp.rs:16026-16036 | crates/render/src/comp.rs:19287-19297 | crates/render/src/comp.rs:20236-20246 | crates/render/src/comp.rs:21183-21193 — all 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 6) crates/render/src/gpu_bindings.rs:5677 — crates/render/src/gpu_bindings.rs:5677-5687 | crates/render/src/gpu_bindings.rs:5700-5710 | crates/render/src/gpu_bindings.rs:5756-5766 | crates/render/src/gpu_bindings.rs:5779-5789 | crates/render/src/gpu_bindings.rs:5802-5812 | crates/render/src/gpu_bindings.rs:5825-5835 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/gpu_bindings.rs:5677` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×2
  • Duplicated block (11 lines × 5) crates/platform/src/bindings.rs:6746 — crates/platform/src/bindings.rs:6746-6756 | crates/platform/src/bindings.rs:13562-13572 | crates/platform/src/bindings.rs:14631-14641 | crates/render/src/comp.rs:11650-11660 | crates/render/src/gpu_bindings.rs:6073-6083 — before extracting anything, compare `crates/platform/src/bindings.rs` and `crates/render/src/comp.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:6746` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 5) crates/platform/src/bindings.rs:12347 — crates/platform/src/bindings.rs:12347-12357 | crates/platform/src/bindings.rs:17237-17247 | crates/platform/src/bindings.rs:17607-17617 | crates/platform/src/bindings.rs:17655-17665 | crates/platform/src/bindings.rs:17678-17688 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:12347` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 63) · ×2
  • Duplicated block (10 lines × 63) crates/render/src/comp.rs:76 — crates/render/src/comp.rs:76-85 | crates/render/src/comp.rs:312-321 | crates/render/src/comp.rs:475-484 | crates/render/src/comp.rs:638-647 | crates/render/src/comp.rs:1069-1078 | crates/render/src/comp.rs:1614-1623 | crates/render/src/comp.rs:1773-1782 | crates/render/src/comp.rs:1963-1972 | crates/render/src/comp.rs:2145-2154 | crates/render/src/comp.rs:2376-2385 | crates/render/src/comp.rs:2691-2700 | crates/render/src/comp.rs:2874-2883 | crates/render/src/comp.rs:3033-3042 | crates/render/src/comp.rs:3222-3231 | crates/render/src/comp.rs:3615-3624 | crates/render/src/comp.rs:3805-3814 | crates/render/src/comp.rs:4169-4178 | crates/render/src/comp.rs:4385-4394 | crates/render/src/comp.rs:4567-4576 | crates/render/src/comp.rs:4726-4735 | crates/render/src/comp.rs:4890-4899 | crates/render/src/comp.rs:5050-5059 | crates/render/src/comp.rs:5213-5222 | crates/render/src/comp.rs:5367-5376 | crates/render/src/comp.rs:5574-5583 | crates/render/src/comp.rs:6041-6050 | crates/render/src/comp.rs:6261-6270 | crates/render/src/comp.rs:6490-6499 | crates/render/src/comp.rs:6653-6662 | crates/render/src/comp.rs:6812-6821 | crates/render/src/comp.rs:6971-6980 | crates/render/src/comp.rs:7770-7779 | crates/render/src/comp.rs:8407-8416 | crates/render/src/comp.rs:8566-8575 | crates/render/src/comp.rs:8725-8734 | crates/render/src/comp.rs:8888-8897 | crates/render/src/comp.rs:9051-9060 | crates/render/src/comp.rs:9409-9418 | crates/render/src/comp.rs:12342-12351 | crates/render/src/comp.rs:12806-12815 | crates/render/src/comp.rs:13240-13249 | crates/render/src/comp.rs:13585-13594 | crates/render/src/comp.rs:14202-14211 | crates/render/src/comp.rs:14558-14567 | crates/render/src/comp.rs:14717-14726 | crates/render/src/comp.rs:14880-14889 | crates/render/src/comp.rs:15255-15264 | crates/render/src/comp.rs:15813-15822 | crates/render/src/comp.rs:16402-16411 | crates/render/src/comp.rs:16565-16574 | crates/render/src/comp.rs:16724-16733 | crates/render/src/comp.rs:17082-17091 | crates/render/src/comp.rs:17441-17450 | crates/render/src/comp.rs:17800-17809 | crates/render/src/comp.rs:17966-17975 | crates/render/src/comp.rs:18604-18613 | crates/render/src/comp.rs:19074-19083 | crates/render/src/comp.rs:19663-19672 | crates/render/src/comp.rs:20023-20032 | crates/render/src/comp.rs:20612-20621 | crates/render/src/comp.rs:20970-20979 | crates/render/src/comp.rs:21324-21333 | crates/render/src/comp.rs:21897-21906 — all 63 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 63) crates/render/src/comp.rs:97 — crates/render/src/comp.rs:97-106 | crates/render/src/comp.rs:333-342 | crates/render/src/comp.rs:496-505 | crates/render/src/comp.rs:659-668 | crates/render/src/comp.rs:1090-1099 | crates/render/src/comp.rs:1635-1644 | crates/render/src/comp.rs:1794-1803 | crates/render/src/comp.rs:1984-1993 | crates/render/src/comp.rs:2166-2175 | crates/render/src/comp.rs:2397-2406 | crates/render/src/comp.rs:2712-2721 | crates/render/src/comp.rs:2895-2904 | crates/render/src/comp.rs:3054-3063 | crates/render/src/comp.rs:3243-3252 | crates/render/src/comp.rs:3636-3645 | crates/render/src/comp.rs:3826-3835 | crates/render/src/comp.rs:4190-4199 | crates/render/src/comp.rs:4406-4415 | crates/render/src/comp.rs:4588-4597 | crates/render/src/comp.rs:4747-4756 | crates/render/src/comp.rs:4911-4920 | crates/render/src/comp.rs:5071-5080 | crates/render/src/comp.rs:5234-5243 | crates/render/src/comp.rs:5388-5397 | crates/render/src/comp.rs:5595-5604 | crates/render/src/comp.rs:6062-6071 | crates/render/src/comp.rs:6282-6291 | crates/render/src/comp.rs:6511-6520 | crates/render/src/comp.rs:6674-6683 | crates/render/src/comp.rs:6833-6842 | crates/render/src/comp.rs:6992-7001 | crates/render/src/comp.rs:7791-7800 | crates/render/src/comp.rs:8428-8437 | crates/render/src/comp.rs:8587-8596 | crates/render/src/comp.rs:8746-8755 | crates/render/src/comp.rs:8909-8918 | crates/render/src/comp.rs:9072-9081 | crates/render/src/comp.rs:9430-9439 | crates/render/src/comp.rs:12363-12372 | crates/render/src/comp.rs:12827-12836 | crates/render/src/comp.rs:13261-13270 | crates/render/src/comp.rs:13606-13615 | crates/render/src/comp.rs:14223-14232 | crates/render/src/comp.rs:14579-14588 | crates/render/src/comp.rs:14738-14747 | crates/render/src/comp.rs:14901-14910 | crates/render/src/comp.rs:15276-15285 | crates/render/src/comp.rs:15834-15843 | crates/render/src/comp.rs:16423-16432 | crates/render/src/comp.rs:16586-16595 | crates/render/src/comp.rs:16745-16754 | crates/render/src/comp.rs:17103-17112 | crates/render/src/comp.rs:17462-17471 | crates/render/src/comp.rs:17821-17830 | crates/render/src/comp.rs:17987-17996 | crates/render/src/comp.rs:18625-18634 | crates/render/src/comp.rs:19095-19104 | crates/render/src/comp.rs:19684-19693 | crates/render/src/comp.rs:20044-20053 | crates/render/src/comp.rs:20633-20642 | crates/render/src/comp.rs:20991-21000 | crates/render/src/comp.rs:21345-21354 | crates/render/src/comp.rs:21918-21927 — all 63 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10 lines × 16) · ×2
  • Duplicated block (10 lines × 16) crates/render/src/comp.rs:973 — crates/render/src/comp.rs:973-982 | crates/render/src/comp.rs:1518-1527 | crates/render/src/comp.rs:9313-9322 | crates/render/src/comp.rs:13144-13153 | crates/render/src/comp.rs:14462-14471 | crates/render/src/comp.rs:15159-15168 | crates/render/src/comp.rs:15717-15726 | crates/render/src/comp.rs:16306-16315 | crates/render/src/comp.rs:16986-16995 | crates/render/src/comp.rs:17345-17354 | crates/render/src/comp.rs:17704-17713 | crates/render/src/comp.rs:18978-18987 | crates/render/src/comp.rs:19567-19576 | crates/render/src/comp.rs:19927-19936 | crates/render/src/comp.rs:20516-20525 | crates/render/src/comp.rs:20874-20883 — all 16 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 16) crates/render/src/comp.rs:984 — crates/render/src/comp.rs:984-993 | crates/render/src/comp.rs:1529-1538 | crates/render/src/comp.rs:9324-9333 | crates/render/src/comp.rs:13155-13164 | crates/render/src/comp.rs:14473-14482 | crates/render/src/comp.rs:15170-15179 | crates/render/src/comp.rs:15728-15737 | crates/render/src/comp.rs:16317-16326 | crates/render/src/comp.rs:16997-17006 | crates/render/src/comp.rs:17356-17365 | crates/render/src/comp.rs:17715-17724 | crates/render/src/comp.rs:18989-18998 | crates/render/src/comp.rs:19578-19587 | crates/render/src/comp.rs:19938-19947 | crates/render/src/comp.rs:20527-20536 | crates/render/src/comp.rs:20885-20894 — all 16 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×2
  • Duplicated block (10 lines × 7) crates/render/src/comp.rs:1294 — crates/render/src/comp.rs:1294-1303 | crates/render/src/comp.rs:13452-13461 | crates/render/src/comp.rs:15480-15489 | crates/render/src/comp.rs:16038-16047 | crates/render/src/comp.rs:19299-19308 | crates/render/src/comp.rs:20248-20257 | crates/render/src/comp.rs:21195-21204 — all 7 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 7) crates/render/src/comp.rs:1315 — crates/render/src/comp.rs:1315-1324 | crates/render/src/comp.rs:13473-13482 | crates/render/src/comp.rs:15501-15510 | crates/render/src/comp.rs:16059-16068 | crates/render/src/comp.rs:19320-19329 | crates/render/src/comp.rs:20269-20278 | crates/render/src/comp.rs:21216-21225 — all 7 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×2
  • Duplicated block (8–9 lines × 3) crates/platform/src/bindings.rs:8252 — crates/platform/src/bindings.rs:8252-8259 | crates/platform/src/bindings.rs:15618-15626 | crates/platform/src/bindings.rs:15889-15897 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:8252` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8–9 lines × 3) crates/platform/src/filedialog.rs:73 — crates/platform/src/filedialog.rs:73-80 | crates/platform/src/filedialog.rs:99-106 | crates/platform/src/filedialog.rs:116-124 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/filedialog.rs:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) crates/platform/src/bindings.rs:8909 — crates/platform/src/bindings.rs:8909-8917 | crates/platform/src/bindings.rs:8922-8930 | crates/platform/src/bindings.rs:8967-8975 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:8909` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) crates/render/src/comp.rs:7958 — crates/render/src/comp.rs:7958-7966 | crates/render/src/comp.rs:13774-13782 | crates/render/src/comp.rs:18177-18185 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) crates/platform/src/bindings.rs:12870 — crates/platform/src/bindings.rs:12870-12877 | crates/platform/src/bindings.rs:12892-12900 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:12870` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8–9 lines × 2) crates/platform/src/bindings.rs:13195 — crates/platform/src/bindings.rs:13195-13202 | crates/platform/src/bindings.rs:13486-13494 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:13195` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) crates/platform/src/bindings.rs:7586 — crates/platform/src/bindings.rs:7586-7593 | crates/platform/src/bindings.rs:7605-7612 | crates/platform/src/bindings.rs:7633-7640 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:7586` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 3) crates/platform/src/bindings.rs:9783 — crates/platform/src/bindings.rs:9783-9790 | crates/platform/src/bindings.rs:9821-9828 | crates/platform/src/bindings.rs:9857-9864 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:9783` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) crates/app/src/note_edit.rs:148 — crates/app/src/note_edit.rs:148-155 | crates/app/src/rename.rs:513-519 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/note_edit.rs:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) crates/render/src/gpu_bindings.rs:5943 — crates/render/src/gpu_bindings.rs:5943-5949 | crates/render/src/gpu_bindings.rs:5961-5968 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/gpu_bindings.rs:5943` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: pecofence-core — pecofence-core: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
  • Off the main sequence: pecofence-platform — pecofence-platform: abstractness 0.07, instability 0.20, distance 0.73 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 17, cognitive 11) · ×2
  • Complex function (anonymous) (cyclomatic 17, cognitive 11) scripts/test-settings-ui.mjs:605 — (anonymous) has cyclomatic complexity 17 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function (anonymous) (cyclomatic 17, cognitive 11) scripts/test-settings-ui.mjs:814 — (anonymous) has cyclomatic complexity 17 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×1
  • Focus outline removed in CSS without a :focus replacement ui/settings.html:317 — `.hotkey-box.recording:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.6 · ×1
  • Low contrast colour pair in CSS (2.6:1) ui/settings.html:365 — `.file-icon` sets color: #eef7ff on background-color: #749cca — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · settings.html.renderFences (cyclomatic 77) · ×1
  • settings.html.renderFences (cyclomatic 77) ui/settings.html:2108 — settings.html.renderFences has cyclomatic complexity 77 (threshold 15). Of this number, 52 points are the body's own statements and 25 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · make-trailer-audio.compose_music (cyclomatic 62) · ×1
  • make-trailer-audio.compose_music (cyclomatic 62) extras/pecofence-promo/scripts/make-trailer-audio.py:795 — make-trailer-audio.compose_music has cyclomatic complexity 62 (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 · make-trailer-audio.compose_sfx (cyclomatic 52) · ×1
  • make-trailer-audio.compose_sfx (cyclomatic 52) extras/pecofence-promo/scripts/make-trailer-audio.py:1290 — make-trailer-audio.compose_sfx 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.
D1 · Cyclomatic Complexity · settings.html.seRead (cyclomatic 48) · ×1
  • settings.html.seRead (cyclomatic 48) ui/settings.html:3203 — settings.html.seRead has cyclomatic complexity 48 (threshold 15). Of this number, 46 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settings.html.readCond (cyclomatic 41) · ×1
  • settings.html.readCond (cyclomatic 41) ui/settings.html:2682 — settings.html.readCond has cyclomatic complexity 41 (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 · pecofence_cli · ×1
  • pecofence_cli::run::run_fence (cyclomatic 38) crates/cli/src/run.rs:206 — pecofence_cli::run::run_fence 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.
D1 · Cyclomatic Complexity · settings.html.hotkeyRecorder (cyclomatic 38) · ×1
  • settings.html.hotkeyRecorder (cyclomatic 38) ui/settings.html:1820 — settings.html.hotkeyRecorder has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 9 of the 38 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 1832, a function literal at line 1876, a function literal at line 1865, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · settings.html.slider (cyclomatic 37) · ×1
  • settings.html.slider (cyclomatic 37) ui/settings.html:1014 — settings.html.slider has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 6 of the 37 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 1104, a function literal at line 1116, fit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · settings.html.seVal (cyclomatic 34) · ×1
  • settings.html.seVal (cyclomatic 34) ui/settings.html:3137 — settings.html.seVal has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · settings.html.seRow (cyclomatic 34) · ×1
  • settings.html.seRow (cyclomatic 34) ui/settings.html:3277 — settings.html.seRow has cyclomatic complexity 34 (threshold 15). Of this number, 17 points are the body's own statements and 17 belong to 8 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · settings.html.fits (cyclomatic 31) · ×1
  • settings.html.fits (cyclomatic 31) ui/settings.html:2534 — settings.html.fits has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 2 function items inside it that branch. 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 · LiveStandIn.Main (cyclomatic 30) · ×1
  • LiveStandIn.Main (cyclomatic 30) scripts/wintest/assets/live-wallpaper-standin.cs:99 — LiveStandIn.Main has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pecofence_platform · ×1
  • pecofence_platform::edit::handle (cyclomatic 28) crates/platform/src/edit.rs:884 — pecofence_platform::edit::handle has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · measure-trailer-targets.main (cyclomatic 28) · ×1
  • measure-trailer-targets.main (cyclomatic 28) extras/pecofence-promo/scripts/measure-trailer-targets.py:492 — measure-trailer-targets.main has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settings.html.renderRules (cyclomatic 28) · ×1
  • settings.html.renderRules (cyclomatic 28) ui/settings.html:2392 — settings.html.renderRules has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2408, 2428, 2424). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PeekOverlay · ×1
  • PeekOverlay::show (cyclomatic 27) crates/app/src/peek.rs:156 — PeekOverlay::show has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · usage.validate (cyclomatic 27) · ×1
  • usage.validate (cyclomatic 27) services/usage/src/usage.mjs:18 — usage.validate has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settings.html.seRender (cyclomatic 27) · ×1
  • settings.html.seRender (cyclomatic 27) ui/settings.html:3440 — settings.html.seRender has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IWICImagingFactory_Vtbl · ×1
  • IWICImagingFactory_Vtbl::new (cyclomatic 26) crates/platform/src/bindings.rs:17141 — IWICImagingFactory_Vtbl::new has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 25 function items inside it that branch (CreateDecoderFromFilename, CreateDecoderFromStream, CreateDecoderFromFileHandle, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · manual.boot (cyclomatic 26) · ×1
  • manual.boot (cyclomatic 26) site/manual/manual.js:533 — manual.boot has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 539, a function literal at line 555, a function literal at line 564, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · settings.html.searchSettings (cyclomatic 25) · ×1
  • settings.html.searchSettings (cyclomatic 25) ui/settings.html:1486 — settings.html.searchSettings has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1495, 1526). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · settings.html.renderUpdate (cyclomatic 25) · ×1
  • settings.html.renderUpdate (cyclomatic 25) ui/settings.html:2836 — settings.html.renderUpdate 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.
D1 · Cyclomatic Complexity · settings.html.seValues (cyclomatic 25) · ×1
  • settings.html.seValues (cyclomatic 25) ui/settings.html:3177 — settings.html.seValues has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settings.html.seSpec (cyclomatic 25) · ×1
  • settings.html.seSpec (cyclomatic 25) ui/settings.html:3248 — settings.html.seSpec has cyclomatic complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsHost · ×1
  • SettingsHost::open (cyclomatic 24) crates/app/src/settings_host.rs:143 — SettingsHost::open 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 · index.validate (cyclomatic 24) · ×1
  • index.validate (cyclomatic 24) services/feedback/src/index.js:31 — index.validate has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · settings.html.condLabel (cyclomatic 24) · ×1
  • settings.html.condLabel (cyclomatic 24) ui/settings.html:2301 — settings.html.condLabel has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FrameClock · ×1
  • FrameClock::start (cyclomatic 23) crates/platform/src/frameclock.rs:311 — FrameClock::start 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.
D1 · Cyclomatic Complexity · Layout · ×1
  • Layout::normalize_tabs (cyclomatic 22) crates/core/src/model.rs:1821 — Layout::normalize_tabs 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 · ShadowWindow · ×1
  • ShadowWindow::update (cyclomatic 21) crates/app/src/shadow.rs:456 — ShadowWindow::update 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.
D1 · Cyclomatic Complexity · settings.html.pinyinRun (cyclomatic 21) · ×1
  • settings.html.pinyinRun (cyclomatic 21) ui/settings.html:1429 — settings.html.pinyinRun 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 · settings.html.seRowsOf (cyclomatic 20) · ×1
  • settings.html.seRowsOf (cyclomatic 20) ui/settings.html:3106 — settings.html.seRowsOf 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.
D1 · Cyclomatic Complexity · IconCache · ×1
  • IconCache::new (cyclomatic 19) crates/app/src/icons.rs:261 — IconCache::new 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 · settings.html.fbSend.onclick (cyclomatic 19) · ×1
  • settings.html.fbSend.onclick (cyclomatic 19) ui/settings.html:2982 — settings.html.fbSend.onclick has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Values · ×1
  • Values::apply (cyclomatic 18) crates/render/src/custom_theme.rs:220 — Values::apply 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. This is NOT this file's highest cyclomatic complexity: Values::parse (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 · settings.html.renderSwatches (cyclomatic 18) · ×1
  • settings.html.renderSwatches (cyclomatic 18) ui/settings.html:1980 — settings.html.renderSwatches has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1987, 2009, 1981, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · settings.html.newCond (cyclomatic 18) · ×1
  • settings.html.newCond (cyclomatic 18) ui/settings.html:2565 — settings.html.newCond has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NoticeCard · ×1
  • NoticeCard::draw (cyclomatic 16) crates/render/src/notice.rs:228 — NoticeCard::draw 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.
D1 · Cyclomatic Complexity · measure-trailer-targets.tabstrip (cyclomatic 16) · ×1
  • measure-trailer-targets.tabstrip (cyclomatic 16) extras/pecofence-promo/scripts/measure-trailer-targets.py:336 — measure-trailer-targets.tabstrip has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settings.html.matchText (cyclomatic 16) · ×1
  • settings.html.matchText (cyclomatic 16) ui/settings.html:1465 — settings.html.matchText has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fetch (cyclomatic 16) · ×1
  • fetch (cyclomatic 16) services/feedback/src/index.js:93 — fetch has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · make-trailer-audio.compose_music (cognitive 132) · ×1
  • make-trailer-audio.compose_music (cognitive 132) extras/pecofence-promo/scripts/make-trailer-audio.py:795 — make-trailer-audio.compose_music has cognitive complexity 132 (threshold 15). Drivers by points: if/else 23 (62 pts), loops 23 (33 pts), ternaries 11 (32 pts), boolean chains 5 (nesting depth added 70). To reduce it, split the body into named stages: move each independent 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 · make-trailer-audio.compose_sfx (cognitive 90) · ×1
  • make-trailer-audio.compose_sfx (cognitive 90) extras/pecofence-promo/scripts/make-trailer-audio.py:1290 — make-trailer-audio.compose_sfx has cognitive complexity 90 (threshold 15). Drivers by points: ternaries 13 (42 pts), if/else 13 (30 pts), loops 6 (15 pts), boolean chains 3 (nesting depth added 55). To reduce it, split the body into named stages: move each independent 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 · settings.html.seRead (cognitive 58) · ×1
  • settings.html.seRead (cognitive 58) ui/settings.html:3203 — settings.html.seRead has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 11 (24 pts), if/else 11 (23 pts), boolean chains 10, match/switch 1 (nesting depth added 25). Of this number, 56 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settings.html.readCond (cognitive 56) · ×1
  • settings.html.readCond (cognitive 56) ui/settings.html:2682 — settings.html.readCond has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (27 pts), ternaries 9 (18 pts), boolean chains 11 (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 · measure-trailer-targets.main (cognitive 55) · ×1
  • measure-trailer-targets.main (cognitive 55) extras/pecofence-promo/scripts/measure-trailer-targets.py:492 — measure-trailer-targets.main has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 14 (21 pts), boolean chains 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.
D2 · Cognitive Complexity · settings.html.renderFences (cognitive 55) · ×1
  • settings.html.renderFences (cognitive 55) ui/settings.html:2108 — settings.html.renderFences has cognitive complexity 55 (threshold 15). Drivers by points: boolean chains 28, if/else 15 (18 pts), ternaries 4 (8 pts), loops 1 (nesting depth added 7). Of this number, 30 points are the body's own statements and 25 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LiveStandIn.Main (cognitive 46) · ×1
  • LiveStandIn.Main (cognitive 46) scripts/wintest/assets/live-wallpaper-standin.cs:99 — LiveStandIn.Main has cognitive complexity 46 (threshold 15). Of this number, 44 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settings.html.pinyinRun (cognitive 38) · ×1
  • settings.html.pinyinRun (cognitive 38) ui/settings.html:1429 — settings.html.pinyinRun has cognitive complexity 38 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 4 (10 pts), boolean chains 8 (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.
D2 · Cognitive Complexity · FrameClock · ×1
  • FrameClock::start (cognitive 37) crates/platform/src/frameclock.rs:311 — FrameClock::start has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 5, match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settings.html.slider (cognitive 37) · ×1
  • settings.html.slider (cognitive 37) ui/settings.html:1014 — settings.html.slider has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 5 (8 pts), boolean chains 7, loops 3 (nesting depth added 7). Most of this is not in the body itself: 5 of the 37 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 1104, fit, finish, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PeekOverlay · ×1
  • PeekOverlay::show (cognitive 31) crates/app/src/peek.rs:156 — PeekOverlay::show has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 4, match/switch 1 (2 pts), 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.
D2 · Cognitive Complexity · usage.validate (cognitive 29) · ×1
  • usage.validate (cognitive 29) services/usage/src/usage.mjs:18 — usage.validate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 10, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · measure-trailer-targets.tabstrip (cognitive 28) · ×1
  • measure-trailer-targets.tabstrip (cognitive 28) extras/pecofence-promo/scripts/measure-trailer-targets.py:336 — measure-trailer-targets.tabstrip has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settings.html.searchSettings (cognitive 28) · ×1
  • settings.html.searchSettings (cognitive 28) ui/settings.html:1486 — settings.html.searchSettings has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 9, loops 4 (5 pts) (nesting depth added 7). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1495, 1526). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · manual.boot (cognitive 27) · ×1
  • manual.boot (cognitive 27) site/manual/manual.js:533 — manual.boot has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 6, loops 2, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 539, a function literal at line 555, a function literal at line 568, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · settings.html.seSpec (cognitive 27) · ×1
  • settings.html.seSpec (cognitive 27) ui/settings.html:3248 — settings.html.seSpec has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 9, loops 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IWICImagingFactory_Vtbl · ×1
  • IWICImagingFactory_Vtbl::new (cognitive 25) crates/platform/src/bindings.rs:17141 — IWICImagingFactory_Vtbl::new has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 25. None of this is in the body itself: all 25 points belong to 25 function items inside it that branch (CreateDecoderFromFilename, CreateDecoderFromStream, CreateDecoderFromFileHandle, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · validate (cognitive 25) · ×1
  • validate (cognitive 25) services/feedback/src/index.js:31 — validate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 12 (nesting depth added 2). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · analyze-trailer-takes.main (cognitive 24) · ×1
  • analyze-trailer-takes.main (cognitive 24) extras/pecofence-promo/scripts/analyze-trailer-takes.py:24 — analyze-trailer-takes.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 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.
D2 · Cognitive Complexity · measure-trailer-targets.snapshots (cognitive 24) · ×1
  • measure-trailer-targets.snapshots (cognitive 24) extras/pecofence-promo/scripts/measure-trailer-targets.py:71 — measure-trailer-targets.snapshots has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (15 pts), loops 4 (5 pts), if/else 1 (3 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.
D2 · Cognitive Complexity · SettingsHost · ×1
  • SettingsHost::open (cognitive 23) crates/app/src/settings_host.rs:143 — SettingsHost::open has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, match/switch 3 (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 · ShadowWindow · ×1
  • ShadowWindow::update (cognitive 23) crates/app/src/shadow.rs:456 — ShadowWindow::update has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 4, match/switch 3 (4 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.
D2 · Cognitive Complexity · Image · ×1
  • Image::blur_alpha (cognitive 22) crates/render/src/backdrop.rs:239 — Image::blur_alpha has cognitive complexity 22 (threshold 15). Drivers by points: loops 9 (20 pts), boolean chains 1, if/else 1 (nesting depth added 11). 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 · settings.html.matchText (cognitive 22) · ×1
  • settings.html.matchText (cognitive 22) ui/settings.html:1465 — settings.html.matchText has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, ternaries 1 (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 · ItemLayout · ×1
  • ItemLayout::insertion_caret (cognitive 21) crates/app/src/layout.rs:1090 — ItemLayout::insertion_caret has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · settings.html.updateLiquidMap (cognitive 21) · ×1
  • settings.html.updateLiquidMap (cognitive 21) ui/settings.html:1285 — settings.html.updateLiquidMap has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (14 pts), if/else 3, loops 2 (3 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 · settings.html.seValues (cognitive 21) · ×1
  • settings.html.seValues (cognitive 21) ui/settings.html:3177 — settings.html.seValues has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 2 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 9). Of this number, 11 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Config · ×1
  • Config::merge_layout_fences (cognitive 19) crates/core/src/model.rs:2279 — Config::merge_layout_fences has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 pts), boolean chains 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.
D2 · Cognitive Complexity · settings.html.seCounted (cognitive 19) · ×1
  • settings.html.seCounted (cognitive 19) ui/settings.html:3400 — settings.html.seCounted has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 4, boolean chains 3 (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 · FrameHandle · ×1
  • FrameHandle::land (cognitive 18) crates/app/src/fence_window/frame.rs:259 — FrameHandle::land has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4 (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 · MarqueeBand · ×1
  • MarqueeBand::show (cognitive 18) crates/app/src/marquee_band.rs:70 — MarqueeBand::show has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoticeCard · ×1
  • NoticeCard::draw (cognitive 18) crates/render/src/notice.rs:228 — NoticeCard::draw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · settings.html.hotkeyRecorder (cognitive 18) · ×1
  • settings.html.hotkeyRecorder (cognitive 18) ui/settings.html:1820 — settings.html.hotkeyRecorder has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 8. Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 1876, waitForKeys, a function literal at line 1875, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · settings.html.fbSend.onclick (cognitive 18) · ×1
  • settings.html.fbSend.onclick (cognitive 18) ui/settings.html:2982 — settings.html.fbSend.onclick has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 3, error handling 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 · settings.html.seVal (cognitive 18) · ×1
  • settings.html.seVal (cognitive 18) ui/settings.html:3137 — settings.html.seVal has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, ternaries 2 (4 pts), if/else 1 (2 pts), match/switch 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. 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 · Values · ×1
  • Values::apply (cognitive 17) crates/render/src/custom_theme.rs:220 — Values::apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 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 · make-trailer-audio.chord_report (cognitive 17) · ×1
  • make-trailer-audio.chord_report (cognitive 17) extras/pecofence-promo/scripts/make-trailer-audio.py:1698 — make-trailer-audio.chord_report has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (9 pts), loops 3 (6 pts), if/else 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · make-trailer-clutter.shot_chat (cognitive 17) · ×1
  • make-trailer-clutter.shot_chat (cognitive 17) extras/pecofence-promo/scripts/make-trailer-clutter.py:273 — make-trailer-clutter.shot_chat has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (10 pts), loops 3 (4 pts), if/else 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · measure-trailer-targets.find_items (cognitive 17) · ×1
  • measure-trailer-targets.find_items (cognitive 17) extras/pecofence-promo/scripts/measure-trailer-targets.py:240 — measure-trailer-targets.find_items has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 4 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settings.html.renderRules (cognitive 17) · ×1
  • settings.html.renderRules (cognitive 17) ui/settings.html:2392 — settings.html.renderRules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 5 belong to 3 function literals inside it that branch. 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 · settings.html.newCond (cognitive 17) · ×1
  • settings.html.newCond (cognitive 17) ui/settings.html:2565 — settings.html.newCond has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 3. Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. 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 · settings.html.seRow (cognitive 17) · ×1
  • settings.html.seRow (cognitive 17) ui/settings.html:3277 — settings.html.seRow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 1. Of this number, 14 points are the body's own statements and 3 belong to 8 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · settings.html.seRender (cognitive 17) · ×1
  • settings.html.seRender (cognitive 17) ui/settings.html:3440 — settings.html.seRender has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 5 (6 pts), if/else 3 (nesting depth added 1). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. 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 · IoDeadline · ×1
  • IoDeadline::arm (cognitive 16) crates/app/src/ipc_server.rs:180 — IoDeadline::arm has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · measure-trailer-targets.search_radius (cognitive 16) · ×1
  • measure-trailer-targets.search_radius (cognitive 16) extras/pecofence-promo/scripts/measure-trailer-targets.py:158 — measure-trailer-targets.search_radius has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fetch (cognitive 16) · ×1
  • fetch (cognitive 16) services/feedback/src/index.js:93 — fetch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, error handling 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyFunctions · ×1
  • TooManyFunctions: pecofence_platform::desktop crates/platform/src/desktop.rs:42 — TooManyFunctions — 40 free functions. The bar is 30 free functions; this is 10 over it, 1.33× 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 · Members sharing a duplicated core (17 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (17 members, 50+ identical tokens) crates/platform/src/bindings.rs:6634 — crates/platform/src/bindings.rs:6634-6795 | crates/platform/src/bindings.rs:7111-7417 | crates/platform/src/bindings.rs:7953-8014 | crates/platform/src/bindings.rs:8094-8155 | crates/platform/src/bindings.rs:8250-8311 | crates/platform/src/bindings.rs:8711-9051 | crates/platform/src/bindings.rs:9132-9176 | crates/platform/src/bindings.rs:10164-10260 | crates/platform/src/bindings.rs:12217-12473 | crates/platform/src/bindings.rs:13193-13294 | crates/platform/src/bindings.rs:13482-13632 | crates/platform/src/bindings.rs:15482-15708 | crates/platform/src/bindings.rs:15866-15932 | crates/platform/src/bindings.rs:17141-17773 | crates/render/src/comp.rs:11153-11180 | crates/render/src/comp.rs:11545-11702 | crates/render/src/gpu_bindings.rs:5485-6333 — These 17 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 17 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 17 times.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) crates/platform/src/bindings.rs:6634 — crates/platform/src/bindings.rs:6634-6795 | crates/platform/src/bindings.rs:12819-13059 | crates/platform/src/bindings.rs:13193-13294 | crates/platform/src/bindings.rs:13482-13632 | crates/platform/src/bindings.rs:13689-13719 | crates/platform/src/bindings.rs:14570-14748 | crates/platform/src/bindings.rs:16144-16248 | crates/platform/src/bindings.rs:16420-16478 | crates/render/src/comp.rs:11545-11702 | crates/render/src/gpu_bindings.rs:5485-6333 — These 10 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 10 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 10 times.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) crates/platform/src/bindings.rs:6634 — crates/platform/src/bindings.rs:6634-6795 | crates/platform/src/bindings.rs:7953-8014 | crates/platform/src/bindings.rs:8094-8155 | crates/platform/src/bindings.rs:8250-8311 | crates/platform/src/bindings.rs:12819-13059 | crates/platform/src/bindings.rs:13482-13632 | crates/platform/src/bindings.rs:15482-15708 | crates/platform/src/bindings.rs:17141-17773 | crates/render/src/gpu_bindings.rs:2925-3131 — These 9 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 9 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 9 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/platform/src/bindings.rs:7111 — crates/platform/src/bindings.rs:7111-7417 | crates/platform/src/bindings.rs:8711-9051 | crates/platform/src/bindings.rs:10511-10768 | crates/platform/src/bindings.rs:15482-15708 | crates/render/src/comp.rs:11545-11702 — These 5 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 5 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 5 times.
D4 · Code Duplication · Edited copy of a member (76 corresponding lines) · ×1
  • Edited copy of a member (76 corresponding lines) crates/platform/src/bindings.rs:7583 — crates/platform/src/bindings.rs:7583-7658 | crates/platform/src/bindings.rs:7782-7873 — These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) crates/render/src/theme.rs:355 — crates/render/src/theme.rs:355-395 | crates/render/src/theme.rs:397-437 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (50 corresponding lines) · ×1
  • Edited copy of a member (50 corresponding lines) crates/platform/src/fileinfo.rs:13 — crates/platform/src/fileinfo.rs:13-65 | crates/platform/src/fileinfo.rs:137-186 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) crates/render/src/backdrop.rs:372 — crates/render/src/backdrop.rs:372-396 | crates/render/src/backdrop.rs:398-423 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) crates/platform/src/dragdrop.rs:1057 — crates/platform/src/dragdrop.rs:1057-1096 | crates/platform/src/dragdrop.rs:1488-1518 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 23+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 23+ corresponding lines) crates/platform/src/filedialog.rs:28 — crates/platform/src/filedialog.rs:28-55 | crates/platform/src/filedialog.rs:58-80 | crates/platform/src/filedialog.rs:84-106 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) crates/platform/src/autostart.rs:141 — crates/platform/src/autostart.rs:141-163 | crates/platform/src/autostart.rs:167-190 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) crates/platform/src/autostart.rs:198 — crates/platform/src/autostart.rs:198-221 | crates/platform/src/shell.rs:898-925 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) crates/app/src/anchor.rs:1197 — crates/app/src/anchor.rs:1197-1214 | crates/app/src/anchor.rs:1240-1259 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) extras/pecofence-promo/scripts/make-trailer-audio.py:667 — extras/pecofence-promo/scripts/make-trailer-audio.py:667-672 | extras/pecofence-promo/scripts/make-trailer-audio.py:1182-1187 | extras/pecofence-promo/scripts/make-trailer-audio.py:1217-1223 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 22+ corresponding lines) crates/app/src/state.rs:2884 — crates/app/src/state.rs:2884-2905 | crates/app/src/state.rs:3099-3120 | crates/app/src/state.rs:3132-3153 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 8+ corresponding lines) crates/platform/src/bindings.rs:23 — crates/platform/src/bindings.rs:23-30 | crates/platform/src/bindings.rs:141-154 | crates/platform/src/bindings.rs:2132-2139 | crates/platform/src/bindings.rs:2183-2190 | crates/platform/src/bindings.rs:2200-2212 | crates/platform/src/bindings.rs:2233-2240 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 13+ corresponding lines) crates/render/src/comp.rs:3347 — crates/render/src/comp.rs:3347-3359 | crates/render/src/comp.rs:3417-3429 | crates/render/src/comp.rs:3438-3451 | crates/render/src/comp.rs:3478-3491 | crates/render/src/comp.rs:3499-3511 | crates/render/src/comp.rs:3519-3531 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 13+ corresponding lines) crates/render/src/comp.rs:12439 — crates/render/src/comp.rs:12439-12452 | crates/render/src/comp.rs:12453-12465 | crates/render/src/comp.rs:12466-12479 | crates/render/src/comp.rs:12484-12496 | crates/render/src/comp.rs:12504-12518 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) crates/platform/src/dragdrop.rs:293 — crates/platform/src/dragdrop.rs:293-309 | crates/platform/src/dragdrop.rs:316-329 | crates/platform/src/dragdrop.rs:345-361 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 11+ corresponding lines) crates/render/src/comp.rs:3365 — crates/render/src/comp.rs:3365-3375 | crates/render/src/comp.rs:3381-3391 | crates/render/src/comp.rs:7147-7157 | crates/render/src/comp.rs:7166-7177 | crates/render/src/comp.rs:7316-7326 | crates/render/src/comp.rs:7637-7648 | crates/render/src/comp.rs:11403-11413 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 13+ corresponding lines) crates/platform/src/bindings.rs:623 — crates/platform/src/bindings.rs:623-638 | crates/platform/src/bindings.rs:2428-2441 | crates/platform/src/bindings.rs:2882-2894 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/platform/src/bindings.rs:257 — crates/platform/src/bindings.rs:257-264 | crates/platform/src/bindings.rs:1677-1683 | crates/platform/src/bindings.rs:2308-2314 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 12+ corresponding lines) crates/render/src/comp.rs:5760 — crates/render/src/comp.rs:5760-5771 | crates/render/src/comp.rs:5776-5787 | crates/render/src/comp.rs:5792-5803 | crates/render/src/comp.rs:5808-5819 | crates/render/src/comp.rs:5824-5835 | crates/render/src/comp.rs:5840-5851 | crates/render/src/comp.rs:5856-5867 | crates/render/src/comp.rs:5872-5883 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 10+ corresponding lines) crates/platform/src/bindings.rs:470 — crates/platform/src/bindings.rs:470-480 | crates/platform/src/bindings.rs:792-801 | crates/platform/src/bindings.rs:1575-1585 | crates/platform/src/bindings.rs:2297-2306 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 12+ corresponding lines) crates/platform/src/bindings.rs:538 — crates/platform/src/bindings.rs:538-552 | crates/platform/src/bindings.rs:1741-1752 | crates/platform/src/bindings.rs:2474-2485 | crates/platform/src/bindings.rs:2627-2640 | crates/platform/src/bindings.rs:2667-2680 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) crates/render/src/custom_theme.rs:293 — crates/render/src/custom_theme.rs:293-296 | crates/render/src/theme.rs:1055-1058 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×1
  • Edited copy of a member (6 corresponding lines) crates/app/src/marquee_offer.rs:205 — crates/app/src/marquee_offer.rs:205-212 | crates/app/src/notice.rs:547-552 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 5+ corresponding lines) crates/app/src/app/feedback.rs:505 — crates/app/src/app/feedback.rs:505-509 | crates/app/src/app/fence_options.rs:898-902 | REDACTED:906-910 | crates/app/src/app/updates.rs:338-344 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×1
  • Edited copy of a member (3 corresponding lines) crates/app/src/filter_box.rs:455 — crates/app/src/filter_box.rs:455-457 | crates/app/src/note_edit.rs:67-69 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (16–20 lines × 2) · ×1
  • Duplicated block (16–20 lines × 2) crates/app/src/fence_window/tabs.rs:477 — crates/app/src/fence_window/tabs.rs:477-492 | crates/app/src/fence_window/tabs.rs:514-533 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/fence_window/tabs.rs:477` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–19 lines × 3) · ×1
  • Duplicated block (13–19 lines × 3) crates/platform/src/layered.rs:41 — crates/platform/src/layered.rs:41-59 | crates/platform/src/live_wallpaper.rs:108-120 | crates/platform/src/tray.rs:362-374 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/layered.rs:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) REDACTED:319 — REDACTED:319-335 | REDACTED:1356-1373 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:319` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) crates/platform/src/bindings.rs:7999 — crates/platform/src/bindings.rs:7999-8014 | crates/platform/src/bindings.rs:8140-8155 | crates/platform/src/bindings.rs:8296-8311 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:7999` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–14 lines × 3) · ×1
  • Duplicated block (11–14 lines × 3) crates/render/src/fence_chrome.rs:519 — crates/render/src/fence_chrome.rs:519-530 | crates/render/src/fence_chrome.rs:600-610 | crates/render/src/fence_chrome.rs:651-664 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/fence_chrome.rs:519` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) crates/platform/src/bindings.rs:13036 — crates/platform/src/bindings.rs:13036-13047 | crates/platform/src/bindings.rs:13276-13287 | crates/platform/src/bindings.rs:13705-13716 | crates/platform/src/bindings.rs:16230-16241 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:13036` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/platform/src/bindings.rs:13034` calls `transmute_copy`, `transmute` and `crates/platform/src/bindings.rs:13275` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 14) · ×1
  • Duplicated block (11 lines × 14) crates/platform/src/bindings.rs:12858 — crates/platform/src/bindings.rs:12858-12868 | crates/platform/src/bindings.rs:17160-17170 | crates/platform/src/bindings.rs:17187-17197 | crates/platform/src/bindings.rs:17214-17224 | crates/platform/src/bindings.rs:17262-17272 | crates/platform/src/bindings.rs:17287-17297 | crates/platform/src/bindings.rs:17468-17478 | crates/platform/src/bindings.rs:17493-17503 | crates/platform/src/bindings.rs:17524-17534 | crates/platform/src/bindings.rs:17557-17567 | crates/platform/src/bindings.rs:17584-17594 | crates/platform/src/bindings.rs:17632-17642 | crates/platform/src/bindings.rs:17703-17713 | crates/platform/src/bindings.rs:17728-17738 — all 14 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:12858` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 8) · ×1
  • Duplicated block (10–11 lines × 8) crates/platform/src/bindings.rs:6775 — crates/platform/src/bindings.rs:6775-6784 | crates/platform/src/bindings.rs:7999-8008 | crates/platform/src/bindings.rs:8140-8149 | crates/platform/src/bindings.rs:8296-8305 | crates/platform/src/bindings.rs:13614-13623 | crates/platform/src/bindings.rs:15686-15695 | crates/platform/src/bindings.rs:17730-17740 | crates/render/src/gpu_bindings.rs:3108-3118 — before extracting anything, compare `crates/platform/src/bindings.rs` and `crates/render/src/gpu_bindings.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:6775` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) crates/render/src/fence_chrome.rs:519 — crates/render/src/fence_chrome.rs:519-529 | crates/render/src/fence_chrome.rs:560-570 | crates/render/src/fence_chrome.rs:651-663 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/fence_chrome.rs:519` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) crates/platform/src/clipboard.rs:128 — crates/platform/src/clipboard.rs:128-137 | crates/platform/src/dragdrop.rs:1079-1089 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) crates/render/src/comp.rs:1847 — crates/render/src/comp.rs:1847-1855 | crates/render/src/comp.rs:11489-11498 | crates/render/src/comp.rs:12426-12435 | crates/render/src/comp.rs:21969-21977 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/comp.rs:1847` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 7) · ×1
  • Duplicated block (9 lines × 7) crates/platform/src/bindings.rs:4713 — crates/platform/src/bindings.rs:4713-4721 | crates/platform/src/bindings.rs:12394-12402 | crates/platform/src/bindings.rs:12990-12998 | crates/platform/src/bindings.rs:16439-16447 | crates/render/src/gpu_bindings.rs:5667-5675 | crates/render/src/gpu_bindings.rs:5746-5754 | crates/render/src/gpu_bindings.rs:6118-6126 — before extracting anything, compare `crates/platform/src/bindings.rs` and `crates/render/src/gpu_bindings.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:4713` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) crates/platform/src/bindings.rs:9707 — crates/platform/src/bindings.rs:9707-9715 | crates/platform/src/bindings.rs:9721-9729 | crates/platform/src/bindings.rs:9749-9757 | crates/platform/src/bindings.rs:9766-9774 | crates/platform/src/bindings.rs:9908-9916 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:9707` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–9 lines × 2) · ×1
  • Duplicated block (6–9 lines × 2) crates/render/src/fence_chrome.rs:4390 — crates/render/src/fence_chrome.rs:4390-4395 | crates/render/src/fence_chrome.rs:4540-4548 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/render/src/fence_chrome.rs:4390` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 8) · ×1
  • Duplicated block (8 lines × 8) crates/platform/src/bindings.rs:17299 — crates/platform/src/bindings.rs:17299-17306 | crates/platform/src/bindings.rs:17318-17325 | crates/platform/src/bindings.rs:17337-17344 | crates/platform/src/bindings.rs:17356-17363 | crates/platform/src/bindings.rs:17375-17382 | crates/platform/src/bindings.rs:17394-17401 | crates/platform/src/bindings.rs:17413-17420 | crates/platform/src/bindings.rs:17432-17439 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:17299` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×1
  • Duplicated block (8 lines × 7) crates/platform/src/bindings.rs:8910 — crates/platform/src/bindings.rs:8910-8917 | crates/platform/src/bindings.rs:8923-8930 | crates/platform/src/bindings.rs:8968-8975 | crates/platform/src/bindings.rs:9694-9701 | crates/platform/src/bindings.rs:12271-12278 | crates/platform/src/bindings.rs:14129-14136 | crates/platform/src/bindings.rs:14161-14168 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:8910` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 6) · ×1
  • Duplicated block (7–8 lines × 6) crates/platform/src/bindings.rs:6716 — crates/platform/src/bindings.rs:6716-6722 | crates/platform/src/bindings.rs:12338-12345 | crates/platform/src/bindings.rs:13590-13596 | crates/platform/src/bindings.rs:15677-15684 | crates/render/src/gpu_bindings.rs:3097-3104 | crates/render/src/gpu_bindings.rs:5999-6006 — before extracting anything, compare `crates/platform/src/bindings.rs` and `crates/render/src/gpu_bindings.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:6716` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) crates/platform/src/bindings.rs:11921 — crates/platform/src/bindings.rs:11921-11928 | crates/platform/src/bindings.rs:13196-13203 | crates/platform/src/bindings.rs:13488-13495 | crates/platform/src/bindings.rs:17252-17259 | crates/platform/src/bindings.rs:17277-17284 | crates/platform/src/bindings.rs:17693-17700 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:11921` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×1
  • Duplicated block (8 lines × 5) crates/platform/src/bindings.rs:7176 — crates/platform/src/bindings.rs:7176-7183 | crates/platform/src/bindings.rs:8744-8751 | crates/platform/src/bindings.rs:10514-10521 | crates/platform/src/bindings.rs:15657-15664 | crates/render/src/comp.rs:11573-11580 — before extracting anything, compare `crates/platform/src/bindings.rs` and `crates/render/src/comp.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:7176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) crates/platform/src/bindings.rs:8730 — crates/platform/src/bindings.rs:8730-8737 | crates/platform/src/bindings.rs:9677-9684 | crates/platform/src/bindings.rs:10533-10540 | crates/render/src/gpu_bindings.rs:6263-6270 — before extracting anything, compare `crates/platform/src/bindings.rs` and `crates/render/src/gpu_bindings.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:8730` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) crates/platform/src/bindings.rs:8762 — crates/platform/src/bindings.rs:8762-8768 | crates/platform/src/bindings.rs:9649-9655 | crates/platform/src/bindings.rs:15486-15493 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:8762` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (7 lines × 23) · ×1
  • Duplicated block (7 lines × 23) crates/platform/src/bindings.rs:7295 — crates/platform/src/bindings.rs:7295-7301 | crates/platform/src/bindings.rs:8855-8861 | crates/platform/src/bindings.rs:9135-9141 | crates/platform/src/bindings.rs:9154-9160 | crates/platform/src/bindings.rs:10212-10218 | crates/platform/src/bindings.rs:12405-12411 | crates/platform/src/bindings.rs:15546-15552 | crates/platform/src/bindings.rs:15579-15585 | crates/platform/src/bindings.rs:15598-15604 | crates/platform/src/bindings.rs:15638-15644 | crates/platform/src/bindings.rs:15869-15875 | crates/platform/src/bindings.rs:15909-15915 | crates/platform/src/bindings.rs:17300-17306 | crates/platform/src/bindings.rs:17319-17325 | crates/platform/src/bindings.rs:17338-17344 | crates/platform/src/bindings.rs:17357-17363 | crates/platform/src/bindings.rs:17376-17382 | crates/platform/src/bindings.rs:17395-17401 | crates/platform/src/bindings.rs:17414-17420 | crates/platform/src/bindings.rs:17433-17439 | crates/render/src/comp.rs:11157-11163 | crates/render/src/comp.rs:11616-11622 | crates/render/src/gpu_bindings.rs:5849-5855 — before extracting anything, compare `crates/platform/src/bindings.rs` and `crates/render/src/comp.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:7295` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 12) · ×1
  • Duplicated block (7 lines × 12) crates/platform/src/bindings.rs:7282 — crates/platform/src/bindings.rs:7282-7288 | crates/platform/src/bindings.rs:8816-8822 | crates/platform/src/bindings.rs:9708-9714 | crates/platform/src/bindings.rs:9722-9728 | crates/platform/src/bindings.rs:9750-9756 | crates/platform/src/bindings.rs:9767-9773 | crates/platform/src/bindings.rs:9909-9915 | crates/platform/src/bindings.rs:10167-10173 | crates/platform/src/bindings.rs:10180-10186 | crates/platform/src/bindings.rs:12424-12430 | crates/platform/src/bindings.rs:15565-15571 | crates/platform/src/bindings.rs:16201-16207 — all 12 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:7282` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) crates/platform/src/bindings.rs:10546 — crates/platform/src/bindings.rs:10546-10552 | crates/platform/src/bindings.rs:12872-12878 | crates/platform/src/bindings.rs:12895-12901 | crates/platform/src/bindings.rs:17229-17235 | crates/platform/src/bindings.rs:17719-17725 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:10546` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (6 lines × 40) · ×1
  • Duplicated block (6 lines × 40) crates/platform/src/bindings.rs:6768 — crates/platform/src/bindings.rs:6768-6773 | crates/platform/src/bindings.rs:7297-7302 | crates/platform/src/bindings.rs:7992-7997 | crates/platform/src/bindings.rs:8133-8138 | crates/platform/src/bindings.rs:8289-8294 | crates/platform/src/bindings.rs:8838-8843 | crates/platform/src/bindings.rs:8857-8862 | crates/platform/src/bindings.rs:8935-8940 | crates/platform/src/bindings.rs:9137-9142 | crates/platform/src/bindings.rs:9156-9161 | crates/platform/src/bindings.rs:10214-10219 | crates/platform/src/bindings.rs:12407-12412 | crates/platform/src/bindings.rs:13215-13220 | crates/platform/src/bindings.rs:13607-13612 | crates/platform/src/bindings.rs:15548-15553 | crates/platform/src/bindings.rs:15581-15586 | crates/platform/src/bindings.rs:15600-15605 | crates/platform/src/bindings.rs:15640-15645 | crates/platform/src/bindings.rs:15871-15876 | crates/platform/src/bindings.rs:15911-15916 | crates/platform/src/bindings.rs:17302-17307 | crates/platform/src/bindings.rs:17321-17326 | crates/platform/src/bindings.rs:17340-17345 | crates/platform/src/bindings.rs:17359-17364 | crates/platform/src/bindings.rs:17378-17383 | crates/platform/src/bindings.rs:17397-17402 | crates/platform/src/bindings.rs:17416-17421 | crates/platform/src/bindings.rs:17435-17440 | crates/platform/src/bindings.rs:17648-17653 | crates/platform/src/bindings.rs:17671-17676 | crates/render/src/comp.rs:11159-11164 | crates/render/src/comp.rs:11618-11623 | crates/render/src/gpu_bindings.rs:5683-5688 | crates/render/src/gpu_bindings.rs:5706-5711 | crates/render/src/gpu_bindings.rs:5734-5739 | crates/render/src/gpu_bindings.rs:5762-5767 | crates/render/src/gpu_bindings.rs:5785-5790 | crates/render/src/gpu_bindings.rs:5808-5813 | crates/render/src/gpu_bindings.rs:5831-5836 | crates/render/src/gpu_bindings.rs:5851-5856 — before extracting anything, compare `crates/platform/src/bindings.rs` and `crates/render/src/comp.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:6768` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (6 lines × 14) · ×1
  • Duplicated block (6 lines × 14) crates/platform/src/bindings.rs:7283 — crates/platform/src/bindings.rs:7283-7289 | crates/platform/src/bindings.rs:8817-8823 | crates/platform/src/bindings.rs:8828-8833 | crates/platform/src/bindings.rs:9016-9021 | crates/platform/src/bindings.rs:9709-9715 | crates/platform/src/bindings.rs:9723-9729 | crates/platform/src/bindings.rs:9751-9757 | crates/platform/src/bindings.rs:9768-9774 | crates/platform/src/bindings.rs:9910-9916 | crates/platform/src/bindings.rs:10168-10174 | crates/platform/src/bindings.rs:10181-10187 | crates/platform/src/bindings.rs:12425-12431 | crates/platform/src/bindings.rs:15566-15572 | crates/platform/src/bindings.rs:16202-16208 — all 14 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:7283` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 8) · ×1
  • Duplicated block (6 lines × 8) crates/platform/src/bindings.rs:9710 — crates/platform/src/bindings.rs:9710-9715 | crates/platform/src/bindings.rs:9724-9729 | crates/platform/src/bindings.rs:9752-9757 | crates/platform/src/bindings.rs:9769-9774 | crates/platform/src/bindings.rs:9841-9846 | crates/platform/src/bindings.rs:9877-9882 | crates/platform/src/bindings.rs:9893-9898 | crates/platform/src/bindings.rs:9911-9916 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:9710` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) crates/platform/src/bindings.rs:17230 — crates/platform/src/bindings.rs:17230-17235 | crates/platform/src/bindings.rs:17254-17259 | crates/platform/src/bindings.rs:17279-17284 | crates/platform/src/bindings.rs:17695-17700 | crates/platform/src/bindings.rs:17720-17725 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:17230` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) crates/platform/src/bindings.rs:8873 — crates/platform/src/bindings.rs:8873-8878 | crates/platform/src/bindings.rs:8899-8904 | crates/platform/src/bindings.rs:14189-14194 | crates/platform/src/bindings.rs:14326-14331 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/platform/src/bindings.rs:8873` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×1
  • Duplicated block (5–6 lines × 2) crates/app/src/state.rs:943 — crates/app/src/state.rs:943-947 | crates/app/src/state.rs:959-964 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/state.rs:943` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) crates/render/src/theme.rs:358 — crates/render/src/theme.rs:358-384 | crates/render/src/theme.rs:400-426 — 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 · Edited copy of a member (1 corresponding lines) · ×1
  • Edited copy of a member (1 corresponding lines) scripts/wintest/assets/foreground-steal.cs:25 — scripts/wintest/assets/foreground-steal.cs:25-25 | scripts/wintest/assets/live-wallpaper-standin.cs:74-74 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×1
  • Duplicated block (12 lines × 2 locations) extras/pecofence-promo/scripts/prepare-autosort-media.mjs:29 — extras/pecofence-promo/scripts/prepare-autosort-media.mjs:29 · extras/pecofence-promo/scripts/prepare-motion-media.mjs:9 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×1
  • Duplicated block (9 lines × 2 locations) scripts/test-settings-ui.mjs:71 — scripts/test-settings-ui.mjs:71 · scripts/test-settings-ui.mjs:240 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×1
  • Duplicated block (8 lines × 2 locations) scripts/test-settings-ui.mjs:674 — scripts/test-settings-ui.mjs:674 · scripts/test-settings-ui.mjs:1373 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (7 lines × 3 locations) · ×1
  • Duplicated block (7 lines × 3 locations) extras/pecofence-promo/src/launch/Beauty.tsx:2 — extras/pecofence-promo/src/launch/Beauty.tsx:2 · extras/pecofence-promo/src/launch/Closing.tsx:3 · extras/pecofence-promo/src/launch/Opening.tsx:2 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 4 locations) · ×1
  • Duplicated block (6 lines × 4 locations) extras/pecofence-promo/src/motion/Closing.tsx:2 — extras/pecofence-promo/src/motion/Closing.tsx:2 · extras/pecofence-promo/src/motion/Groups.tsx:4 · extras/pecofence-promo/src/motion/Hero.tsx:2 · extras/pecofence-promo/src/motion/Tabs.tsx:2 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 3 locations) · ×1
  • Duplicated block (6 lines × 3 locations) extras/pecofence-promo/src/reviewed/EndCard.tsx:1 — extras/pecofence-promo/src/reviewed/EndCard.tsx:1 · extras/pecofence-promo/src/reviewed/FileAccess.tsx:2 · extras/pecofence-promo/src/reviewed/ProjectTabs.tsx:2 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (5 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (5 matched lines × 2 locations) extras/pecofence-promo/scripts/prepare-autosort-media.mjs:5 — extras/pecofence-promo/scripts/prepare-autosort-media.mjs:5 · extras/pecofence-promo/scripts/prepare-reviewed-media.mjs:4 — the two spans are one implementation copied and then locally edited — 61 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (5 lines × 2 locations) · ×1
  • Duplicated block (5 lines × 2 locations) scripts/test-settings-ui.mjs:1509 — scripts/test-settings-ui.mjs:1509 · scripts/test-settings-ui.mjs:1549 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function postMessage (cyclomatic 69, cognitive 99) · ×1
  • Complex function postMessage (cyclomatic 69, cognitive 99) scripts/test-settings-ui.mjs:78 — postMessage has cyclomatic complexity 69 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validate (cyclomatic 26, cognitive 28) · ×1
  • Complex function validate (cyclomatic 26, cognitive 28) services/usage/src/usage.mjs:18 — validate has cyclomatic complexity 26 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validate (cyclomatic 23, cognitive 24) · ×1
  • Complex function validate (cyclomatic 23, cognitive 24) services/feedback/src/index.js:31 — validate has cyclomatic complexity 23 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 18, cognitive 12) · ×1
  • Complex function (anonymous) (cyclomatic 18, cognitive 12) scripts/test-settings-ui.mjs:565 — (anonymous) has cyclomatic complexity 18 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 18, cognitive 11) · ×1
  • Complex function (anonymous) (cyclomatic 18, cognitive 11) scripts/test-settings-ui.mjs:2140 — (anonymous) has cyclomatic complexity 18 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function fetch (cyclomatic 16, cognitive 16) · ×1
  • Complex function fetch (cyclomatic 16, cognitive 16) services/feedback/src/index.js:93 — fetch has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 16, cognitive 9) · ×1
  • Complex function (anonymous) (cyclomatic 16, cognitive 9) scripts/test-settings-ui.mjs:2347 — (anonymous) has cyclomatic complexity 16 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 15, cognitive 21) · ×1
  • Complex function (anonymous) (cyclomatic 15, cognitive 21) scripts/test-settings-ui.mjs:3640 — (anonymous) has cyclomatic complexity 15 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 14, cognitive 11) · ×1
  • Complex function (anonymous) (cyclomatic 14, cognitive 11) scripts/test-settings-ui.mjs:1510 — (anonymous) has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function note (cyclomatic 13, cognitive 24) · ×1
  • Complex function note (cyclomatic 13, cognitive 24) extras/pecofence-promo/scripts/make-assets.mjs:47 — note has cyclomatic complexity 13 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function DesktopIcon (cyclomatic 13, cognitive 11) · ×1
  • Complex function DesktopIcon (cyclomatic 13, cognitive 11) extras/pecofence-promo/src/trailer/scenes/Opening.tsx:115 — DesktopIcon has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 13, cognitive 11) · ×1
  • Complex function (anonymous) (cyclomatic 13, cognitive 11) scripts/test-settings-ui.mjs:520 — (anonymous) has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 13, cognitive 10) · ×1
  • Complex function (anonymous) (cyclomatic 13, cognitive 10) scripts/test-settings-ui.mjs:1271 — (anonymous) has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 13, cognitive 9) · ×1
  • Complex function (anonymous) (cyclomatic 13, cognitive 9) scripts/test-settings-ui.mjs:2378 — (anonymous) has cyclomatic complexity 13 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 12, cognitive 18) · ×1
  • Complex function (anonymous) (cyclomatic 12, cognitive 18) scripts/test-settings-ui.mjs:3569 — (anonymous) has cyclomatic complexity 12 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R6 · Tooling · This package's lint script runs in no CI job · ×1
  • This package's lint script runs in no CI job extras/pecofence-promo/package.json:32 — The package in `extras/pecofence-promo` declares the lint script `lint` (`eslint src && tsc`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `extras/pecofence-promo` (or the workspace's task runner).
R7 · Dead Code · Dead file (~101 LoC) · ×1
  • Dead file (~101 LoC) extras/pecofence-promo/scripts/prepare-isolated-build.mjs — no import path from any entry point (17 application, 3 tooling, 3 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~38 LoC) · ×1
  • Dead file (~38 LoC) extras/pecofence-promo/src/reviewed/FileAccess.tsx — no import path from any entry point (17 application, 3 tooling, 3 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~31 LoC) · ×1
  • Dead file (~31 LoC) extras/pecofence-promo/src/reviewed/EndCard.tsx — no import path from any entry point (17 application, 3 tooling, 3 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~30 LoC) · ×1
  • Dead file (~30 LoC) extras/pecofence-promo/src/reviewed/ProjectTabs.tsx — no import path from any entry point (17 application, 3 tooling, 3 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~19 LoC) · ×1
  • Dead file (~19 LoC) extras/pecofence-promo/src/reviewed/Grouping.tsx — no import path from any entry point (17 application, 3 tooling, 3 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~17 LoC) · ×1
  • Dead file (~17 LoC) extras/pecofence-promo/src/reviewed/Introduction.tsx — no import path from any entry point (17 application, 3 tooling, 3 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency '@remotion/tailwind-v4' · ×1
  • Unused dependency '@remotion/tailwind-v4' extras/pecofence-promo/package.json:13 — Declared in extras/pecofence-promo/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Minor — 28 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×9
  • Duplicated predicate REDACTED:88 — `!front.0.is_null() && desktop::window_pid(front) != pecofence_platform::process::current_pid()` appears character-identically in 2 files — REDACTED, crates/app/src/fence_window/handler/timers.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/app/src/fence_window/desktop_layout.rs:380 — `(o.x - c.x).abs() > 0.5 || (o.y - c.y).abs() > 0.5` appears character-identically in 2 files — crates/app/src/fence_window/desktop_layout.rs, crates/app/src/fence_window/items.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/app/src/layout.rs:2627 — `a.x < b.x + b.w && b.x < a.x + a.w && a.y < b.y + b.h && b.y < a.y + a.h` appears character-identically in 2 files — crates/app/src/layout.rs, crates/cli/src/run.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/platform/src/desktop.rs:200 — `progman.0.is_null() || class_name(progman) != "Progman"` appears character-identically in 2 files — crates/platform/src/desktop.rs, crates/platform/src/live_wallpaper.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/app/src/anchor.rs:1840 — `rect.right - rect.left >= MARQUEE_MIN_PX && rect.bottom - rect.top >= MARQUEE_MIN_PX` appears character-identically in 2 files — crates/app/src/anchor.rs, crates/app/src/app/group.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/app/src/fence_window/frame.rs:56 — `self.rolled_up && self.roll_anim.is_none()` appears character-identically in 3 files — crates/app/src/fence_window/frame.rs, crates/app/src/fence_window/render.rs, crates/app/src/fence_window/scroll.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/app/src/app/mod.rs:2582 — `self.state.config.settings.hide_real_icons && !self.no_hide_icons` appears character-identically in 2 files — crates/app/src/app/mod.rs, crates/app/src/app/sync.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/app/src/app/fences.rs:970 — `self.window_for(fence) && w.active_fence() == fence` appears character-identically in 4 files — crates/app/src/app/fences.rs, REDACTED, crates/app/src/app/portals.rs, REDACTED. 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/app/src/fence_window/hit.rs:227 — `x >= r.left && x < r.right && y >= r.top && y < r.bottom` appears character-identically in 2 files — crates/app/src/fence_window/hit.rs, crates/app/src/settings_host.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.
X7 · Silent fallback defaults · Silent fallback default on Err · ×4
  • Silent fallback default on Err crates/app/src/fence_window/handler/misc.rs:20 — `on_getdragimage` turns every `Err` into `Some(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/cli/src/output.rs:77 — `render` turns every `Err` into `"null".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/platform/src/clipboard.rs:62 — `describe` turns every `Err` into `"unreadable".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/render/src/text.rs:152 — `fit_lines_counted` turns every `Err` into `Some(1)` — 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.
D31 · IaC & Container Security · Low IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found crates/watchdog/Cargo.toml:9 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `crates/watchdog/Cargo.toml` makes this repository a deployable product (line 9).
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low vulnerability · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P10 · Library API & versioning · Implementation type on the public API · ×1
  • Implementation type on the public API crates/render/src/comp.rs:9742 — 4 public types in `pecofence_render.comp` are marked as implementation by their own namespace, folder or name: `ICompositionAnimationBase_Impl` (crates/render/src/comp.rs:9742, name ends in `Impl`), `ICompositionSurface_Impl` (crates/render/src/comp.rs:10524, name ends in `Impl`), `IIterable_Impl` (crates/render/src/comp.rs:11146, name ends in `Impl`), `IMap_Impl` (crates/render/src/comp.rs:11525, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 3/5 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/cli`, `crates/watchdog`.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation extras/pecofence-promo/package.json:8 — `extras/pecofence-promo/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
R7 · Dead Code · Unused export 'f' · ×1
  • Unused export 'f' extras/pecofence-promo/src/trailer/timing.ts:10 — Nothing imports this binding — it is safe to review for removal.
X5 · Nullable reference types · Nullable reference types not enabled everywhere · ×1
  • Nullable reference types not enabled everywhere — 0/3 C# file(s) are in a nullable-enabled context. This repository commits no project file, so nothing sets <Nullable>enable</Nullable> for it: a file is enabled only by its own `#nullable enable`, by a Unity `csc.rsp` with `-nullable:enable` for its assembly, or as a file-based app (`#:` directives) whose `#:property Nullable` does not turn it off. NRTs catch a whole class of null-deref bugs at compile time.
Minor — 3 finding(s)
D12 · Dependency Hygiene · Outdated · ×3
  • 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/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p schemars` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/app/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.26.0 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/app/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` 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 --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-0e41b581d0c94e82bd777fac2ccfc828/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-0e41b581d0c94e82bd777fac2ccfc828/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=1061" --report-format json --report-path /tmp/watchdog-gitleaks-0e41b581d0c94e82bd777fac2ccfc828/history-2.json --exit-code 0 --source .1artifacts/raw/gitleaks-history-2.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-0e41b581d0c94e82bd777fac2ccfc828/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 .43artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .8artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .9artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 1 file(s) — `extras/pecofence-promo/scripts/make-energy-audio.mjs` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e534-ec30-76d6-94fe-721ed22a2058 · 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