Public report of MoFeng2223/BrimDeck, published 17 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, 17 November 2026, 22:46 UTC · Survey ID cd_47a27605a37d4e84a084c80b77efaad9

MoFeng2223/BrimDeck

Measured 17 November 2026, 22:45 UTC, at code version f1510d0

Code coverage is not measured: Suite not runnable in-image.

Test reliability is not measured: No test run produced results.

Boundary Type-Coupling is not measured: Bounded contexts not declared.

CAI score 53.0out 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 medium codebase: 79,241 lines of product code in 9 projects, tests not counted · Estimated rebuild effort: about 3.0 person-years · Weakest lens: Production Readiness, 46.3

Findings by how serious they are

192 critical 1049 serious 128 minor

4 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
17 November 2026, 22:45 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 ▸

66of 66 dimensions measured by tools.
1347of 1369 findings point to an exact file and line, so you can open each one in the code. The other 22 concern the repository as a whole, such as missing documentation.
66dimensions across 6 lenses, read from 79,241 lines of product code in 9 projects.
Chapters

Executive summary

MoFeng2223/BrimDeck falls short of our standard for production, in part because we found no automated security scanning of the code, its secrets or its dependencies. It scores 53.0 out of 100 and is rated Adequate, and nine of its 192 critical findings are security problems.

Production Readiness, at 46.3, is the weakest lens and counts most in the score. The best first step is adding automated security scanning, worth about 5.8 points. Protecting outgoing calls with timeouts comes next, worth about 5.0 points. Raising Production Readiness to 70 would lift the score to about 59.0.

Six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Three passwords or keys are open to anyone who can read the repository, and 181 errors are caught and ignored, so failures can go unnoticed. Pinning each tool to an exact version, replacing each exposed password or key and handling or logging the ignored errors would close these risks. The data field that is written but never read needs removing.

The product code is 79,241 lines, about €440,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 46.3 · counts for 46%Code Health 57.5 · counts for 25%Maturity 58.5 · counts for 14%Security and Compliance 58.7 · counts for 8%Performance 60.0 · counts for 4%Architecture 71.4 · counts for 2%

If Production Readiness rose from 46.3 to 70, the lowest score rated Strong, the score would rise from 53.0 to about 59.0.

Code composition: what the lines of code are
Business logic 51%Supporting code 25%Tests 24%
Rebuild cost: about €440,000 · Estimate
Cost to rebuild€140,000 to €740,000, for 2,363 to 7,759 hours of work, about 3.0 person-years for 1 to 6 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.7 at a score of 53. 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.
SizeMedium: 79,241 lines of product code
Comment linesThe estimate prices 66,869 lines. Comment lines count towards the size of 79,241 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 a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Raises the score by about 5.8 points · Medium effort · Security & performance tooling
2
Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging.
Raises the score by about 5.0 points · Medium effort · Outbound HTTP resilience
3
Resolve the 1 WriteOnlyPrivateField finding(s) in Explicit Debt — start with QuotaBar.cs.
Raises the score by about 1.0 point · Low effort · Explicit Debt

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 €440,000 to build again, about 3.0 person-years of work. Its weakest lens is Production Readiness, at 46.3 (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 a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing. Of all the actions in this report, it raises the score most for the work it takes: about 5.8 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 10% on every change. The history of the code shows how much it changes: about 166,834 lines over the last 90 days, which is about 676,605 lines a year. At that pace, the extra work comes to an estimated 77.5 to 465 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 BrimDeck BrimDeck BrimDeck.Core Core BrimDeck->BrimDeck.Core BrimDeck.Sensors Sensors Icon Icon InnoSetup InnoSetup ReadmeMedia ReadmeMedia ReadmeMedia->BrimDeck

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.

9 modules, with 8 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.

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 (global)2 BrimDeck.Core3 BrimDeck.Core.ClipboardSync4 scripts.readme-media5 BrimDeck.Native6 BrimDeck.Sensors7 BrimDeck.Updates8 BrimDeck9 ReadmeMedia
1 (global)
2 BrimDeck.Core
3 BrimDeck.Core.ClipboardSync
4 scripts.readme-media
5 BrimDeck.Native1762
6 BrimDeck.Sensors3
7 BrimDeck.Updates4
8 BrimDeck3011223
9 ReadmeMedia2
Uses a module listed above itPart of a loopThe module itself
1 (global)2 BrimDeck.Core3 BrimDeck.Core.ClipboardSync4 scripts.readme-media5 BrimDeck.Native6 BrimDeck.Sensors7 BrimDeck.Updates8 BrimDeck9 ReadmeMedia(global)1BrimDeck.Core2BrimDeck.Core.ClipboardSync3scripts.readme-media4BrimDeck.Native5BrimDeck.Sensors6BrimDeck.Updates7BrimDeck8ReadmeMedia917623430112232

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

At a glance — Architecture · 71.4 · Adequate · gated by AX2 ·

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

At a glance — Readiness · 46.3 · Weak · gated by P3, P7 ·

At a glance — Security · 58.7 · Adequate · gated by D36, C1 ·

At a glance — Performance · 60.0 · Adequate ·

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 — Injection7High / Critical
A03:2025 — Software Supply Chain Failures5Medium
A07:2025 — Authentication Failures4High / Critical

Roadmap

Top priorities: Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing; Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging; Extend structured logging across the projects you operate, and give the library ones a diagnostics seam instead — an `EventSource`/`ActivitySource` the host can subscribe to, or an optional logger on your options object — rather than taking a logging dependency on your consumers' behalf.

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

Do thisHelpsEffortDimension
Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+5.8 ptsMediumSecurity & performance tooling
Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging.+5.0 ptsMediumOutbound HTTP resilience
Resolve the 1 WriteOnlyPrivateField finding(s) in Explicit Debt — start with QuotaBar.cs.+1.0 ptsLowExplicit Debt
Extend structured logging across the projects you operate, and give the library ones a diagnostics seam instead — an `EventSource`/`ActivitySource` the host can subscribe to, or an optional logger on your options object — rather than taking a logging dependency on your consumers' behalf.+1.9 ptsMediumObservability
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Icon.csproj.+0.9 ptsLowADR Quality
Resolve the 181 EmptyCatchBlock finding(s) in Explicit Debt — start with HidBatteries.cs (13), ShelfService.cs (10), UsageService.cs (7).+1.5 ptsHighExplicit Debt
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().+1.1 ptsMediumAsync & latency hygiene
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+1.0 ptsMediumArchitecture documentation

File quality

Per-file score 0–10 — a quality signature. Of 241 files carrying findings, judged against the Production bar: 12% slop · 64% mixed · 24% near-clean.

FileScoreBandWorst signal
src/BrimDeck/Native/HidBatteries.cs1.0SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/Native/BluetoothBatteries.cs1.5SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck.Core/UsageService.cs2.2SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/Native/KugouCdpConnection.cs2.4SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/Native/KugouInstall.cs2.6SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/App.xaml.cs2.7SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/Native/HidppEvents.cs2.7SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/MainWindow.Shelf.cs2.8SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/Native/NeteaseSource.cs2.9SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/ShelfService.cs3.0SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/ClipboardSyncService.cs3.0SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs3.1SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/Native/GamingBatteries.cs3.1SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/SettingsClipboardSync.cs3.2SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs3.2SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/Native/DesktopSources.cs3.3SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/Native/MediaSessions.cs3.4SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck.Core/Pricing.cs3.4SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/SettingsSyncDialogs.cs3.4SlopExplicit Debt: EmptyCatchBlock
src/BrimDeck/Native/CorsairReader.cs3.5SlopExplicit Debt: EmptyCatchBlock

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

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

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

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

Could not be resolved — 4

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 66 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 — 66 dimensions across the health lenses
D1D2D3D4D5D6D12D13D14D15D16D17D18D19D20D21D24D26D27D28D29D34D35D36D43D44AX10AX2AX3AX4AX5AX6C1C4GD1IC1M1M2M3M4P1P2P3P4P6P7PF3S1X1X12X13X14X16X18X2X21X22X24X25X26X27X28X29X3X30X5

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1ebaf-de5a-7649-be5d-403d42bd3ce7.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the test suite could not be built/run in-image (commonly external-service dependencies — a database, a broker — we won't provision). To have it measured, make the suite runnable without them. For context only, test code is ≈ 27% of production LoC (21,465 test / 79,006 production) — a rough proxy, NOT a coverage measurement, so it is excluded from the score. You can widen what we reach: optional: make the suite runnable without a database, broker or other service we do not provision, and real coverage is measured on the next scan.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the test run produced no results for any test tier, so no test ever ran and flakiness could not be exercised. The cause could not be attributed, so it is excluded from the score rather than read as an absence of tests.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — 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. 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 — 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. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
  • D23 Boundary Type-Coupling — 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. Large codebase (79,006 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — 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.
  • 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. `scripts/readme-media/Program.cs`, `src/BrimDeck.Core/AntigravityUsage.cs`, `src/BrimDeck.Core/AppUpdates.cs`, `src/BrimDeck.Core/BackgroundPrices.cs`, `src/BrimDeck.Core/BrandFamilies.cs`, … (+107 more) 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.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: a native UI project (src/BrimDeck/App.xaml). The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • X2 Cancellation propagation — 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. 56 further occurrence(s) are not listed individually; the score already reflects all 96.
  • X3 Exception handling — 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. 174 further occurrence(s) are not listed individually; the score already reflects all 214.
  • X7 Silent fallback defaults — 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. 31 further occurrence(s) are not listed individually; the score already reflects all 71.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
  • 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.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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").
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

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

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

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

259 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was MainWindow.RenderMusic at 164. A further 20 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 SettingsWindow.HotkeyDisplay at 37 — they are counted neither in the figure above nor in this dimension's score. 7 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/BrimDeck.Core/ProviderCatalog.cs (ProviderCatalog.Name at 24), src/BrimDeck.Core/Brands/WobRainy.cs (WobRainy.Battery at 20), src/BrimDeck/SettingsThemeEditor.cs (SettingsWindow.AppColorName at 18), src/BrimDeck.Core/CpuSensors.cs (CpuSensorMath.ZenCcds at 17), src/BrimDeck.Core/PanelThemes.cs (PanelThemes.AppKey at 16), and 2 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

MainWindow.RenderMusic (cyclomatic 164)src/BrimDeck/MainWindow.Music.cs:448
MainWindow.SetExpanded (cyclomatic 154)src/BrimDeck/MainWindow.xaml.cs:829
ExpandedLayout.For (cyclomatic 126)src/BrimDeck.Core/ExpandedLayout.cs:123
HidBatteries.Scan (cyclomatic 119)src/BrimDeck/Native/HidBatteries.cs:344
Dongles.Find (cyclomatic 112)src/BrimDeck.Core/DeviceProtocols.cs:1306

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

What to do

  1. Bring the 3 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with MainWindow.RenderMusic (cyclomatic 164), MainWindow.SetExpanded (cyclomatic 154), ExpandedLayout.For (cyclomatic 126). — 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 3 together lifts Cyclomatic Complexity from 3.8 to about 4.3/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 Complexity2.2 / 10Critical✓ Tool-verified

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

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

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

304 method(s) exceeded the cognitive complexity threshold of 15; the worst was MainWindow.RenderMusic at 246.

MainWindow.RenderMusic (cognitive 246)src/BrimDeck/MainWindow.Music.cs:448
MainWindow.SetExpanded (cognitive 170)src/BrimDeck/MainWindow.xaml.cs:829
HidBatteries.Scan (cognitive 165)src/BrimDeck/Native/HidBatteries.cs:344
MediaSessions.RefreshAsync (cognitive 150)src/BrimDeck/Native/MediaSessions.cs:322
ExpandedLayout.For (cognitive 133)src/BrimDeck.Core/ExpandedLayout.cs:123

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

What to do

  1. Bring the 5 bodies over 120 down to 120 or less in Cognitive Complexity — start with MainWindow.RenderMusic (cognitive 246), MainWindow.SetExpanded (cognitive 170), HidBatteries.Scan (cognitive 165). — 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 5 together lifts Cognitive Complexity from 2.2 to about 3.7/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D3 · God Classes7.8 / 10Strong✓ Tool-verified

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

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

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

56 god class(es) detected.

TooManyMethods: MainWindow · ×24src/BrimDeck/MainWindow.Shelf.cs
MethodTooLong: MainWindow.RenderMusic · ×17src/BrimDeck/MainWindow.Music.cs:448
FileTooLong: BrimDeck.Core/UsageService.cs · ×14src/BrimDeck.Core/UsageService.cs
ClassTooLong: DeckSettingssrc/BrimDeck.Core/Settings.cs

What to do

  1. Resolve the 24 TooManyMethods finding(s) in God Classes — start with PanelTheme.cs (2), MainWindow.Shelf.cs, SettingsWindow.cs. — One of this dimension's main actionable groups (24 warning-level).
  2. Resolve the 17 MethodTooLong finding(s) in God Classes — start with Program.cs (3), MainWindow.Music.cs (2), SettingsProviders.cs (2). — One of this dimension's main actionable groups (17 warning-level).
  3. Resolve the 14 FileTooLong finding(s) in God Classes — start with UsageService.cs, Program.cs, DeviceProtocols.cs. — One of this dimension's main actionable groups (14 warning-level).

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

D4 · Code Duplication8.8 / 10Strong✓ Tool-verified

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

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

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

54 duplicated block group(s) detected. 3.0 % of the production lines (2,352 of 79,006) are in a reported copy. A further 110 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 7 of the 164 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 (5 lines × 2) · ×15src/BrimDeck/Native/Hid.cs:325
Edited copy of a member (1 corresponding lines) · ×13src/BrimDeck/MainWindow.ShelfArrange.cs:257
Duplicated block (6 lines × 2) · ×13src/BrimDeck/SettingsReleaseNotes.cs:31
Edited copy of a member (7 corresponding lines) · ×11src/BrimDeck.Core/ColorMath.cs:7
Edited copy of a member (6 corresponding lines) · ×10src/BrimDeck.Core/DeviceProtocols.cs:881

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

What to do

  1. Resolve the 15 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with MainWindow.Shelf.cs (3), MediaAppWindows.cs (2), Hid.cs. — One of this dimension's main actionable groups (15 warning-level).
  2. Resolve the 13 Edited copy of a member (1 corresponding lines) finding(s) in Code Duplication — start with AtkOfficial.cs (2), MainWindow.ShelfArrange.cs, HyperX.cs. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 13 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with SettingsAppLists.cs (2), SettingsReleaseNotes.cs, DevicesView.cs. — 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 · Coupling10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

9 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

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

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

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

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

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

2 of 172 classes have LCOM4 above 3.

Low cohesion: DeckSettings (LCOM4 7) · ×2src/BrimDeck.Core/Settings.cs:328

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with Settings.cs, DesktopSources.cs. — One of this dimension's main actionable groups (2 warning-level).

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

D12 · Dependency Hygiene9.8 / 10Exemplary✓ Tool-verified

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

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

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

5 outdated, 0 vulnerable, 0 deprecated packages.

Outdated: Jint · ×5

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 58 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 8 direct `PackageReference`(s), and 46 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots7.4 / 10Strong✓ 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 7.4 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/BrimDeck/MainWindow.xaml.cs (121×154=18634); src/BrimDeck/MainWindow.Music.cs (111×164=18204); src/BrimDeck.Core/Settings.cs (136×90=12240)

Hotspot: src/BrimDeck/MainWindow.xaml.cs · ×75src/BrimDeck/MainWindow.xaml.cs:829

What to do

  1. Resolve the 75 Hotspot finding(s) in Churn × Complexity Hotspots — start with MainWindow.xaml.cs, MainWindow.Music.cs, Settings.cs. — One of this dimension's main actionable groups (75 warning-level).

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

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

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

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

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

28 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is scripts/readme-media/Program.cs. Counted over 352 of the 434 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1

✓ On the Gold path — maintain.

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

D17 · Explicit Debt5.3 / 10Adequate✓ Tool-verified

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

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

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

186 deducted debt markers + 10 dead symbols across 79006 LoC in the .NET projects (2.3/KLoC) → score 5.3.

EmptyCatchBlock · ×181scripts/readme-media/Program.cs:1566
WriteOnlyPrivateFieldsrc/BrimDeck/QuotaBar.cs:16
Dead code: VendorPage · ×10src/BrimDeck.Core/Brands/MouseShapes.cs:13

What to do

  1. Resolve the 181 EmptyCatchBlock finding(s) in Explicit Debt — start with HidBatteries.cs (13), ShelfService.cs (10), UsageService.cs (7). — One of this dimension's main actionable groups (181 issue-level).
  2. Resolve the 1 WriteOnlyPrivateField finding(s) in Explicit Debt — start with QuotaBar.cs. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 10 Dead code finding(s) in Explicit Debt — start with MusicVisuals.cs (3), MouseShapes.cs, MainWindow.xaml.cs. — One of this dimension's main actionable groups (10 warning-level).

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

D18 · Solution Shape10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the solution is laid out in a sensible, conventional structure.

Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.

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

6 projects, 638 source files, 98547 hand-written lines of code (77140 production / 21407 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), 4 inter-project edges.

✓ On the Gold path — maintain.

Detailed fixes: d18_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. 20 document(s) read across 7 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 foundscripts/icon/Icon.csproj:3

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Icon.csproj. — 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.

D21 · Naming Consistency7.4 / 10Strong✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

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

2 naming inconsistencies among 77 declarations measured against a convention their peers follow.

`Follow` returns an awaitable but lacks the `Async` suffix its 75 peers carrysrc/BrimDeck/Native/BluetoothBatteries.cs:359
`Read` returns an awaitable but lacks the `Async` suffix its 75 peers carrysrc/BrimDeck/Native/BluetoothBatteries.cs:405

What to do

  1. Resolve the 1 `Follow` returns an awaitable but lacks the `Async` suffix its 75 peers… finding(s) in Naming Consistency — start with BluetoothBatteries.cs. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `Read` returns an awaitable but lacks the `Async` suffix its 75 peers… finding(s) in Naming Consistency — start with BluetoothBatteries.cs. — One of this dimension's main actionable groups (1 recommendation-level).

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

D24 · Comment Value9.7 9.6 / 10Exemplary✓ Tool-verified

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.6 / 10 · rule-coverage 99% · ceiling Documented

23 of 7059 judged comments only repeat the code they sit on (0.3 %). 66 comment(s) in another language or script were not judged.

redundant comment · ×23src/BrimDeck.Core/ClipboardExclusions.cs:8

✓ On the Gold path — maintain.

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

D26 · Project Cohesion7.8 / 10Strong✓ Tool-verified

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

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

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

1 of 9 projects flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesionsrc/BrimDeck.Core/BrimDeck.Core.csproj:1

What to do

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

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

D27 · Navigability9.8 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

58 % of calls cross a namespace and 1 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: large — vertical-slice locality expected.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)7.0 / 10Adequategated by 3 critical findings✓ Tool-verified

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

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

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

3 finding(s): 0 critical, 3 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 3 High secret finding(s) in Secrets (history) — start with REDACTED (3). — One of this dimension's main actionable groups (3 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)9.5 / 10Adequategated by 6 critical findings✓ Tool-verified

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

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

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

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

7 finding(s): 0 critical, 6 high, 1 medium, 0 low. 6 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 112 file(s) — `scripts/readme-media/Program.cs` (line 64, line 80), `src/BrimDeck.Core/AntigravityUsage.cs` (lines 14–205), `src/BrimDeck.Core/AppUpdates.cs` (lines 4–26, line 27, line 28), `src/BrimDeck.Core/BackgroundPrices.cs` (line 6), `src/BrimDeck.Core/BrandFamilies.cs` (line 130), … (+107 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. In 61 of those file(s) — `scripts/readme-media/Program.cs`, `src/BrimDeck.Core/AppUpdates.cs`, `src/BrimDeck.Core/BackgroundPrices.cs`, `src/BrimDeck.Core/ClaudeDesktopCache.cs`, `src/BrimDeck.Core/ClipboardSync/DoubaoSyncClient.cs`, … (+56 more) — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them. In 6 of those file(s) — `src/BrimDeck.Core/AntigravityUsage.cs`, `src/BrimDeck.Core/ClipboardSync/LanNetwork.cs`, `src/BrimDeck.Core/ScriptProvider.cs`, `src/BrimDeck/Native/MiMoAccount.cs`, `src/BrimDeck/Native/SensorGuard.cs`, … (+1 more) — the break is at a TYPE DECLARATION (a C# primary constructor semgrep's grammar cannot parse), so the loss is wider than the named lines: rules scoped to that type see no type to scope to and are blind over its whole body, while rules matching statements keep working there. Absence of a type-scoped finding in those types is not evidence of anything. 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

What to do

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

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

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 352 of the 434 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.9 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: DataLocations.cs↔Settings.cs 73%; MonitorGauges.cs↔SettingsMonitor.cs 53%

Change coupling: DataLocations.cs ↔ Settings.cs · ×2src/BrimDeck.Core/DataLocations.cs:1

What to do

  1. Resolve the 2 Change coupling finding(s) in Change Coupling — start with DataLocations.cs, MonitorGauges.cs. — One of this dimension's main actionable groups (2 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

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

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

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.

AX2 · Stateful singletons1.0 / 10Critical✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

  • `PanelLook` is not registered, but `PanelTheme` creates it and keeps it in the static `Main`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Generation, Translucent, _chosen, KeptLastGood, ShownTheme, Look; e.g. `Generation` at line 165). — src/BrimDeck/PanelTheme.cs:128
  • `DisplayWatch` is not registered, but `DisplayPower` creates it and keeps it in the static `Watch`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Off; e.g. `Off` at line 23). — src/BrimDeck.Core/DisplayWatch.cs:9
  • `Loc` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (IsEnglish; e.g. `IsEnglish` at line 17). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck.Core/Loc.cs:10
  • `PanelThemes` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (ResolvedBuiltIns, _builtInIndex, ParsedBuiltIns, _builtIns, _template; e.g. `ResolvedBuiltIns` at line 22). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck.Core/PanelThemes.Build.cs:7
  • `CapDot` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Centers; e.g. `Centers` at line 81). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/CapDot.cs:14
  • `ClockFace` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (DigitCells; e.g. `DigitCells` at line 231). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/ClockFace.cs:11
  • `CompactStylePreview` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_fixed; e.g. `_fixed` at line 18). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/CompactStylePreview.cs:12
  • `MainWindow` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (SegmentFills; e.g. `SegmentFills` at line 256). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/DevicesPanel.cs:10
  • `DeviceInks` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (TextColors; e.g. `TextColors` at line 495). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/DevicesView.cs:455
  • `DeviceGlyphs` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Pens, Places; e.g. `Pens` at line 527). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/DevicesView.cs:502
  • `InkCentredText` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Spans; e.g. `Spans` at line 126). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/InkCentredText.cs:23
  • `IslandDecor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (CausticTiles; e.g. `CausticTiles` at line 126). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/IslandDecor.cs:14
  • `MonitorDraw` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_fontSeen, Texts, Drawn, Letters, Tracks, Places; e.g. `_fontSeen` at line 48). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/MonitorDraw.cs:20
  • `Motion` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Steps, Moving, _hooked, _last; e.g. `Steps` at line 282). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/MonitorDraw.cs:268
  • `PowerBlock` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_view; e.g. `_view` at line 194). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/MonitorPower.cs:29
  • `MoveLook` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Pens, Fades; e.g. `Pens` at line 458). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/MoveOverlay.cs:382
  • `PanelTheme` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_generations, Looks, UserThemes, Loaded, _draftPalettes, _drafts; e.g. `_generations` at line 20). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/PanelTheme.cs:14
  • `PowerStyle` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_last; e.g. `_last` at line 43). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/PowerGlyphs.cs:9
  • `PowerGlyphs` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Outlines, Plugs, Cuts; e.g. `Outlines` at line 79). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/PowerGlyphs.cs:66
  • `PowerMarks` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Pens; e.g. `Pens` at line 303). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/PowerGlyphs.cs:289
  • `PowerIcons` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Angles, Pens; e.g. `Angles` at line 41). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/PowerIcons.cs:15
  • `ResizeGripLayer` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_rim, Fades; e.g. `_rim` at line 210). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/ResizeGripLayer.cs:18
  • `RingLetter` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Made; e.g. `Made` at line 45). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/RingLetter.cs:17
  • `SettingsWindow` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (AppDescriptions, _workBuddyLogins; e.g. `AppDescriptions` at line 293). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/SettingsApplications.cs:12
  • `DisplayPower` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_dispatcher, _window, _recheck, _notification; e.g. `_dispatcher` at line 28). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/Native/DisplayPower.cs:14
  • `GamingBatteries` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (HidNames; e.g. `HidNames` at line 107). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/Native/GamingBatteries.cs:14
  • `MonitorBridgeReader` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_http; e.g. `_http` at line 25). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/Native/MonitorBridgeReader.cs:18
  • `ProcessWindows` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_desktops; e.g. `_desktops` at line 45). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/Native/ProcessWindows.cs:12
  • `TaskbarMirror` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Lenses, _registered; e.g. `Lenses` at line 214). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — src/BrimDeck/Native/TaskbarMirror.cs:30

What to do

  • Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
  • A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
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.

  • The namespaces BrimDeck ↔ BrimDeck.Native depend on each other. The lightest dependency in the cycle is BrimDeck.Native → BrimDeck (BrimDeck.Native.DoubaoBrowserLogin → BrimDeck.ClipboardSyncService, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/BrimDeck/Native/DoubaoBrowserLogin.cs:16

What to do

  • Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
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.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

C1 · Data Protection3.5 / 10Weak✓ Tool-verified

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

What to do

  • Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.
  • Enforce HTTPS (UseHttpsRedirection / RequireHttpsMetadata) so data in transit is always encrypted.
C4 · Data Retention7.5 / 10Strong✓ Tool-verified

Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).

Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.

  • A retention mechanism is present, but the data-lifecycle is not yet complete — missing: a scheduled purge / cleanup job (PurgeOlderThan / CleanupJob).

What to do

  • Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
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.

IC1 · Incompleteness & stubs8.2 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • Both arms of `code ? … : …` are `first`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. — src/BrimDeck/MainWindow.Shelf.cs:781
  • `RefreshAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/BrimDeck/Native/MediaSessions.cs:322
  • Both arms of `vertical ? … : …` are `new Point(0, 0)`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. — src/BrimDeck/ResizeGripLayer.cs:273
  • A placeholder e-mail address ("name@example.com") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration. — src/BrimDeck.Core/ShelfRules.cs:233

What to do

  • Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

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

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

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

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

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

What to do

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

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

P2 · Observability6.2 / 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/4 service-like projects use logging (pure contract/DTO projects are excluded — they have nothing to log). Of those 4, 3 ship a process this repository operates; the rest are libraries their consumer hosts, where the logging decision belongs to the host.
  • `src/BrimDeck.Sensors/Program.cs` reports through `Console.Write…` at line 26 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — src/BrimDeck.Sensors/Program.cs:26

What to do

  • Extend structured logging across the projects you operate, and give the library ones a diagnostics seam instead — an `EventSource`/`ActivitySource` the host can subscribe to, or an optional logger on your options object — rather than taking a logging dependency on your consumers' behalf.
  • Replace `Console.Write…` in service code with the project's injected `ILogger<T>` (message templates with named properties), so delivery outcomes and failures reach the log pipeline with a level and a category.
  • Add a health-check endpoint (AddHealthChecks/MapHealthChecks) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling0.0 / 10Critical✓ 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.

  • No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:7
  • `src/BrimDeck.Core/BrimDeck.Core.csproj` 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`. — src/BrimDeck.Core/BrimDeck.Core.csproj:23

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

P6 · Release Hygiene8.0 / 10Strong✓ 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.

  • The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.

What to do

  • Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `new HttpClient(new Offline())` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — scripts/readme-media/Program.cs:102
  • `new HttpClient(new HttpClientHandler { AllowAutoRedirect = false }) { Timeout...` builds an outbound HTTP client, and what is applied to it does not bound it. Its `Timeout` is set to `Timeout.InfiniteTimeSpan`, which removes HttpClient's own bound rather than setting one. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — src/BrimDeck.Core/ScriptProvider.cs:365
  • `new HttpClient(new HttpClientHandler { UseProxy = false, AllowAutoRedirect = ...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. (×3) — src/BrimDeck/Native/KugouCdpConnection.cs:112, src/BrimDeck/Native/KugouCdpConnection.cs:123, src/BrimDeck/Native/NeteaseCdpConnection.cs:71
  • `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — src/BrimDeck/Updates/GitHubUpdates.cs:49

What to do

  • Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ 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.

  • 10 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×7) — src/BrimDeck/Native/MonitorBridgeReader.cs:119, src/BrimDeck/Native/MonitorBridgeReader.cs:121, src/BrimDeck/Native/PowerSensors.cs:302, …
  • `ready.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — src/BrimDeck/Native/PointerPressObserver.cs:43
  • `_ready.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — src/BrimDeck/Native/RightFileDrag.cs:30
  • `_writing.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — src/BrimDeck/ShelfService.cs:388

What to do

  • Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
S1 · Cryptographic Hygiene8.0 / 10Strong✓ Tool-verified

Other · Security — Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored.

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

  • This type encrypts through `SymmetricAlgorithm`, whose every cipher mode (CBC/ECB/OFB/CFB/CTS) is unauthenticated, and no keyed MAC or AEAD cipher appears anywhere in it — so nothing establishes that the ciphertext it produced is the ciphertext it later reads back. Encryption alone provides confidentiality, not integrity: unauthenticated CBC is MALLEABLE, and an attacker who can modify stored or transmitted ciphertext can flip chosen plaintext bits in the following block by flipping ciphertext bits in the preceding one, without ever knowing the key. Where the decrypt path reports failure differently for a padding error than for a downstream one — a broad `catch` that returns null is the usual spelling — the same construction also answers the attacker's questions, which is the padding-oracle shape that recovers plaintext outright. Prefer an AEAD cipher: `AesGcm` or `ChaCha20Poly1305` authenticate the ciphertext as part of encrypting it, and give you an associated-data slot for the surrounding context. Where the format cannot change, MAC it with encrypt-then-MAC — HMAC-SHA256 over the IV and the ciphertext together, with a key derived separately from the encryption key — and verify that tag with `CryptographicOperations.FixedTimeEquals` BEFORE decrypting anything. (×2) — src/BrimDeck.Core/ClipboardSync/WeTypeObjects.cs:37, src/BrimDeck.Core/ClipboardSync/WeTypeSyncClient.cs:62

What to do

  • Authenticate ciphertext, do not just encrypt it: move to an AEAD cipher (`AesGcm`, `ChaCha20Poly1305`), or where the wire format is fixed, add encrypt-then-MAC with HMAC-SHA256 over IV+ciphertext under a separately derived key and verify the tag with `CryptographicOperations.FixedTimeEquals` before decrypting. Unauthenticated CBC is malleable, and a decrypt path that distinguishes padding failures from other failures is a padding oracle. This repository constructs symmetric encryption whose ciphertext nothing authenticates at 2 sites, not one: `src/BrimDeck.Core/ClipboardSync/WeTypeObjects.cs:37` (ECB), `src/BrimDeck.Core/ClipboardSync/WeTypeSyncClient.cs:62` (ECB). Each is a separate decision — fixing only the line this row cites leaves the others in place.
X1 · Async correctness5.4 / 10Adequate✓ Tool-verified

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

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

  • `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin. (×6) — src/BrimDeck.Core/InstallerUpdates.cs:194, scripts/readme-media/Program.cs:616, scripts/readme-media/Program.cs:649, …
  • `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead. — src/BrimDeck/App.xaml.cs:615
  • `ClipboardSyncService.AcceptImage` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). (×2) — src/BrimDeck/ClipboardSyncService.cs:459, src/BrimDeck/ClipboardSyncService.Lan.cs:201
  • `ClipboardSyncService.AcceptText` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). (×2) — src/BrimDeck/ClipboardSyncService.cs:465, src/BrimDeck/ClipboardSyncService.Lan.cs:187
  • `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained. (×6) — src/BrimDeck/MainWindow.Music.cs:308, src/BrimDeck/Native/BluetoothBatteries.cs:99, src/BrimDeck/Native/BluetoothBatteries.cs:125, …
  • `File.ReadAllLines` blocks the thread on I/O while `File.ReadAllLinesAsync` exists to wait without one — inside a method that is already `async`, await the twin. — src/BrimDeck/Native/MiMoAccount.cs:137
  • Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process. (×8) — src/BrimDeck/Native/MonitorBridgeReader.cs:119, src/BrimDeck/Native/MonitorBridgeReader.cs:121, src/BrimDeck/Native/PowerSensors.cs:302, …
  • `.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters). — src/BrimDeck.Sensors/Program.cs:71
  • `File.WriteAllBytes` blocks the thread on I/O while `File.WriteAllBytesAsync` exists to wait without one — inside a method that is already `async`, await the twin. (×2) — scripts/readme-media/Program.cs:1107, scripts/readme-media/Program.cs:1111

What to do

  • Blocking `File.WriteAllText` inside an `async` method
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

X18 · Disposal-pattern correctness5.1 / 10Adequate✓ Tool-verified

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

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

  • `stream` is a `SslStream` that `ConnectedPeer` never creates — every assignment to it takes a constructor parameter — and this type disposes it here (line 224). The caller that hands it over at `new ConnectedPeer(socket, stream)` (LanClipboardLink.cs line 200) releases the same value itself, so it kept ownership: this release is a second one, on a value that is still the caller's, and it ends the caller's instance while the caller may still be using it. Drop the call and leave the release to the caller that created the value — or, if this type is meant to own it, stop releasing it at the construction site so ownership is stated once. — src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:224
  • `socket` is a `TcpClient` that `ConnectedPeer` never creates — every assignment to it takes a constructor parameter — and this type disposes it here (line 225). The caller that hands it over at `new ConnectedPeer(socket, stream)` (LanClipboardLink.cs line 200) releases the same value itself, so it kept ownership: this release is a second one, on a value that is still the caller's, and it ends the caller's instance while the caller may still be using it. Drop the call and leave the release to the caller that created the value — or, if this type is meant to own it, stop releasing it at the construction site so ownership is stated once. — src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:225
  • `LyricsService` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_gate` itself (line 148), which makes that instance its own. But `_gate` is named in none of the methods the disposal search covered: `Dispose` (line 317) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_gate?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck.Core/Lyrics.cs:148
  • `Pricing` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_gate` itself (line 43), which makes that instance its own. But `_gate` is named in none of the methods the disposal search covered: `Dispose` (line 616) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_gate?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck.Core/Pricing.cs:43
  • `_requests` (line 23) holds a `SemaphoreSlim` that `ScriptSession` creates itself with `new`, and nothing in `ScriptSession` ever releases it: the type is not `IDisposable`, declares no `Dispose`, and every other mention of `_requests` only reads through it. And `ScriptSession` is not a process-lifetime owner: `new ScriptSession(_http, entry, secret, now, deadline.Token, _memory.GetValue...` (ScriptProvider.cs line 407) creates one per call and drops it when the call returns, so each call strands one unreleased `SemaphoreSlim` (a timer that keeps firing, a handle, a socket) until finalization. Implement `IDisposable`, release `_requests` there and dispose the owner at that call site — or keep one owner for the process instead of one per call. — src/BrimDeck.Core/ScriptProvider.cs:23
  • `ConfiguredProviders` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_parallel` itself (line 357), which makes that instance its own. But `_parallel` is named in none of the methods the disposal search covered: `Dispose` (line 465) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_parallel?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck.Core/ScriptProvider.cs:357
  • `ClipboardSyncService` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_wake` itself (line 40), which makes that instance its own. But `_wake` is named in none of the methods the disposal search covered: `Dispose` (line 474) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_wake?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck/ClipboardSyncService.cs:40
  • `DeviceBatteries` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_apple` itself (line 35), which makes that instance its own. But `_apple` is named in none of the methods the disposal search covered: `Dispose` (line 164) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_apple?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck/Native/DeviceBatteries.cs:35
  • `Channel` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_long` itself (line 1704), which makes that instance its own. But `_long` is named in none of the methods the disposal search covered: `Dispose` (line 1711) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_long?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck/Native/HidBatteries.cs:1704
  • `KugouCdpConnection` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_exchange` itself (line 21), which makes that instance its own. But `_exchange` is named in none of the methods the disposal search covered: `Dispose` (line 282) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_exchange?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck/Native/KugouCdpConnection.cs:21
  • `KugouCdpConnection` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_wake` itself (line 22), which makes that instance its own. But `_wake` is named in none of the methods the disposal search covered: `Dispose` (line 282) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_wake?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck/Native/KugouCdpConnection.cs:22
  • `NeteaseCdpConnection` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_send` itself (line 17), which makes that instance its own. But `_send` is named in none of the methods the disposal search covered: `Dispose` (line 244) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_send?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck/Native/NeteaseCdpConnection.cs:17
  • `NeteaseSource` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_wake` itself (line 108), which makes that instance its own. But `_wake` is named in none of the methods the disposal search covered: `Dispose` (line 399), `CleanupAsync` (line 407) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_wake?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck/Native/NeteaseSource.cs:108
  • `_client` is a `AudioClient` that `ProcessLoopbackCapture` never creates — every assignment to it takes a constructor parameter — and this type disposes it here (line 109). The caller that hands it over at `new ProcessLoopbackCapture(processId, client)` (ProcessLoopbackCapture.cs line 57) releases the same value itself, so it kept ownership: this release is a second one, on a value that is still the caller's, and it ends the caller's instance while the caller may still be using it. Drop the call and leave the release to the caller that created the value — or, if this type is meant to own it, stop releasing it at the construction site so ownership is stated once. — src/BrimDeck/Native/ProcessLoopbackCapture.cs:109
  • `QqMediaConnection` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_send` itself (line 19), which makes that instance its own. But `_send` is named in none of the methods the disposal search covered: `Dispose` (line 333) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_send?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck/Native/QqMediaConnection.cs:19
  • `RightFileDrag` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_ready` itself (line 18), which makes that instance its own. But `_ready` is named in none of the methods the disposal search covered: `Dispose` (line 126), `ReleaseLeft` (line 117), `Unhook` (line 142) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_ready?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/BrimDeck/Native/RightFileDrag.cs:18
  • `_enumerator` is a `MMDeviceEnumerator` that `SystemVolume` never creates — every assignment to it takes a constructor parameter — and this type disposes it here (line 28). The caller that hands it over at `new SystemVolume(enumerator, enumerator.GetDefaultAudioEndpoint(DataFlow.Rend...` (SystemVolume.cs line 17) releases the same value itself, so it kept ownership: this release is a second one, on a value that is still the caller's, and it ends the caller's instance while the caller may still be using it. Drop the call and leave the release to the caller that created the value — or, if this type is meant to own it, stop releasing it at the construction site so ownership is stated once. — src/BrimDeck/Native/SystemVolume.cs:28
  • `_handle` is a `SafeFileHandle` that `PawnIo` never creates — every assignment to it takes a constructor parameter — and this type disposes it here (line 58). The caller that hands it over at `new PawnIo(handle)` (PawnIo.cs line 29) releases the same value itself, so it kept ownership: this release is a second one, on a value that is still the caller's, and it ends the caller's instance while the caller may still be using it. Drop the call and leave the release to the caller that created the value — or, if this type is meant to own it, stop releasing it at the construction site so ownership is stated once. — src/BrimDeck.Sensors/PawnIo.cs:58

What to do

  • Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
X2 · Cancellation propagation7.8 / 10Strong✓ Tool-verified

Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 160/252 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
  • Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one. — src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:133
  • No CancellationToken parameter — this work can't be stopped early once started. (×26) — src/BrimDeck.Core/CommandCodeUsage.cs:95, src/BrimDeck.Core/ScriptProvider.cs:164, src/BrimDeck.Core/ScriptProvider.cs:200, …
  • No CancellationToken parameter — the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. (×11) — src/BrimDeck.Core/ScriptProvider.cs:36, src/BrimDeck.Core/ScriptProvider.cs:96, src/BrimDeck.Core/UsageService.cs:1638, …
  • Queues or hands on an async lambda whose work calls something that takes a CancellationToken, while neither this method nor the delegate supplies one — that work can't be stopped early once started. Take a CancellationToken here and let the lambda capture it, or use a delegate that is handed one (`Func<CancellationToken, Task>`). — src/BrimDeck/Native/AppleMusicControls.cs:35

What to do

  • Thread a CancellationToken through async methods so work stops promptly on cancellation.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`. In Rust, where a guard or permit releases when it is dropped, whether a release written BY HAND — `add_permits` after a forgotten permit, `force_unlock` after a leaked guard, a raw lock's `unlock` — matches the state the function's own acquisitions put the primitive in: not after a try or timed acquire whose failure does not leave, not from a cleanup set up before an acquire that can fail, not skipped by a `?`, `return`, `break` or `continue`, and not on top of a guard that still releases itself.

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

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

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

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

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

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

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

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

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

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

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

Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.

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

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

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

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

X29 · Per-element action decided by a fixed element7.8 / 10Strong✓ Tool-verified

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

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

  • This loop runs once per element of `lefts`, and the statement it guards acts on the element it is on — `lefts[i]`. The test deciding whether that statement runs does not: `right <= edge + 1e-6` reads `lefts[j]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts — the fixed one at line 246, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out. — src/BrimDeck.Core/CompactSpacing.cs:251

What to do

  • Each finding names the test and the statement it guards, which index the same collection at two different subscripts — one fixed, one the loop variable. Confirm from the two, then decide which subscript the test meant. If it was meant to be per-element, give it the loop variable so each element is judged on itself. If it really is one answer for the whole collection, hoist the test OUT of the loop, where a reader can see it is asked once and where it is not re-evaluated on every pass — leaving it inside, reading a fixed element, is the one arrangement that cannot be right under either reading.
X3 · Exception handling4.2 / 10Weak✓ Tool-verified

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

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

  • `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×2) — src/BrimDeck.Core/AntigravityUsage.cs:38, src/BrimDeck.Core/CommandCodeUsage.cs:55
  • `catch (ArgumentOutOfRangeException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×2) — src/BrimDeck.Core/AntigravityUsage.cs:115, src/BrimDeck.Core/KimiSessions.cs:113
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×30) — src/BrimDeck.Core/AppleMusicLyrics.cs:91, src/BrimDeck.Core/AppleMusicLyrics.cs:108, src/BrimDeck.Core/AppUpdates.cs:296, …
  • `catch (IOException) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:123
  • `catch (SocketException) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×2) — src/BrimDeck.Core/ClipboardSync/LanDiscovery.cs:60, src/BrimDeck.Core/ClipboardSync/LanDiscovery.cs:126
  • `catch (JsonException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×3) — src/BrimDeck.Core/DshSessions.cs:244, src/BrimDeck.Core/KimiSessions.cs:123, src/BrimDeck.Core/LogReader.cs:302

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

X5 · Nullable reference types8.3 / 10Strong✓ 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.

  • This method contradicts itself about `entry`: line 43 writes `entry?.GetValue`, which says `entry` can be null, but line 44 then dereferences it directly as `entry.GetValue` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `entry` truly cannot be null here, the `?.` is misleading. Settle it one way — test `entry` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — src/BrimDeck/Native/KugouInstall.cs:44
  • This method contradicts itself about `entry`: line 88 writes `entry?.GetValue`, which says `entry` can be null, but line 89 then dereferences it directly as `entry.GetValue` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `entry` truly cannot be null here, the `?.` is misleading. Settle it one way — test `entry` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — src/BrimDeck/Native/NeteaseSource.cs:89
  • 5/6 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
  • ~0.5 `!` suppressions per 1k syntax nodes — 436 suppression(s) across the 796650 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

  • Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
  • Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.

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 Health57.5Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture71.4Adequate — gated by AX2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity58.5Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness46.3Weak — gated by P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security58.7Adequate — gated by D36, C1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateStrongest area.
Unscored — 5 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.

  • P12 CI test-gate honesty — 2 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • SC1 Supply-chain hygiene — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 36 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Repo shows no audit-logging mechanism (IAuditable, an immutable audit log, an EF SaveChanges interceptor) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
  • C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 42 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations detected
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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.
  • D10 Test Quality — ~21465 lines of test code exist on disk but weren't loaded from the analyzed solution (excluded from the .sln, or co-located/using a test attribute not loaded here), so test quality couldn't be assessed. Include the tests in the analyzed solution to enable this check.
  • D11 Test Reliability — Test reliability not measured — no test run produced results
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
  • D25 ADR Conformance — no ADRs to check
  • D30 Dependency Vulnerabilities — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 112 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 dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (57 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found by the two searches this check runs — a BenchmarkDotNet package reference in any project file (loaded, or on disk), and a script whose name contains `benchmark` that this repository's CI runs. Neither can see a suite in another ecosystem's idiom, so this is not a verdict that the repository has none. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted, and nothing is asked of a repository that has none.
  • 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.
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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.

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 — 192 finding(s)
D17 · Explicit Debt · EmptyCatchBlock · ×181
  • EmptyCatchBlock scripts/readme-media/Program.cs:1566 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/AppUpdates.cs:296 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/AppleMusicLyrics.cs:91 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/AppleMusicLyrics.cs:108 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClaudeQuotaCache.cs:106 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClaudeQuotaCache.cs:136 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClaudeUsageHistory.cs:39 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:76 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:97 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:107 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:157 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:244 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:86 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:173 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:176 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/LanDiscovery.cs:71 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/LanDiscovery.cs:136 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/ClipboardSync/WeTypeSyncClient.cs:139 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/CommandCodeUsage.cs:88 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/CursorPrices.cs:74 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/CursorPrices.cs:197 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/DataLocations.cs:98 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/DeviceReads.cs:60 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/GrokBotUsage.cs:76 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/BrimDeck.Core/GrokBotUsage.cs:79 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • + 156 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · High secret · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AX3 · Project dependency cycles · Namespace dependency cycle · ×1
  • Namespace dependency cycle src/BrimDeck/Native/DoubaoBrowserLogin.cs:16 — The namespaces BrimDeck ↔ BrimDeck.Native depend on each other. The lightest dependency in the cycle is BrimDeck.Native → BrimDeck (BrimDeck.Native.DoubaoBrowserLogin → BrimDeck.ClipboardSyncService, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
D17 · Explicit Debt · WriteOnlyPrivateField · ×1
  • WriteOnlyPrivateField src/BrimDeck/QuotaBar.cs:16 — private string _key — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
Serious — 1049 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×75
  • Hotspot: src/BrimDeck/MainWindow.xaml.cs src/BrimDeck/MainWindow.xaml.cs:829 — src/BrimDeck/MainWindow.xaml.cs changed 121 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 154 in MainWindow.SetExpanded at line 829. 9 of those changes were fix/bug commits, and the other 112 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/MainWindow.xaml.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/MainWindow.Music.cs src/BrimDeck/MainWindow.Music.cs:448 — src/BrimDeck/MainWindow.Music.cs changed 111 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 164 in MainWindow.RenderMusic at line 448. 3 of those changes were fix/bug commits, and the other 108 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/MainWindow.Music.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck.Core/Settings.cs src/BrimDeck.Core/Settings.cs:874 — src/BrimDeck.Core/Settings.cs changed 136 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in DeckSettings.Normalize at line 874. 3 of those changes were fix/bug commits, and the other 133 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck.Core/Settings.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/SettingsWindow.cs src/BrimDeck/SettingsWindow.cs:313 — src/BrimDeck/SettingsWindow.cs changed 130 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in SettingsWindow.ShowPageCore at line 313. 1 of those changes was a fix/bug commit, and the other 129 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/SettingsWindow.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/Native/HidBatteries.cs src/BrimDeck/Native/HidBatteries.cs:344 — src/BrimDeck/Native/HidBatteries.cs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 119 in HidBatteries.Scan at line 344. 3 of those changes were fix/bug commits, and the other 27 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/Native/HidBatteries.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/Native/SystemSampler.cs src/BrimDeck/Native/SystemSampler.cs:370 — src/BrimDeck/Native/SystemSampler.cs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in SystemSampler.Collect at line 370. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/Native/SystemSampler.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/UsagePanel.cs src/BrimDeck/UsagePanel.cs:599 — src/BrimDeck/UsagePanel.cs changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in MainWindow.QuotaBlock at line 599. 1 of those changes was a fix/bug commit, and the other 47 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/UsagePanel.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck.Core/DeviceProtocols.cs src/BrimDeck.Core/DeviceProtocols.cs:1306 — src/BrimDeck.Core/DeviceProtocols.cs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 112 in Dongles.Find at line 1306. 4 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck.Core/DeviceProtocols.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/MonitorView.cs src/BrimDeck/MonitorView.cs:84 — src/BrimDeck/MonitorView.cs changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in MonitorView.MonitorView.ctor at line 84. 1 of those changes was a fix/bug commit, and the other 35 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/MonitorView.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/SettingsProviders.cs src/BrimDeck/SettingsProviders.cs:236 — src/BrimDeck/SettingsProviders.cs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in SettingsWindow.SourceDetails at line 236. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/SettingsProviders.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck.Core/UsageService.cs src/BrimDeck.Core/UsageService.cs:313 — src/BrimDeck.Core/UsageService.cs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in UsageService.FetchCoreAsync at line 313. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck.Core/UsageService.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/ModelDetails.cs src/BrimDeck/ModelDetails.cs:328 — src/BrimDeck/ModelDetails.cs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 76 in MainWindow.RenderModels at line 328. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/ModelDetails.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/SettingsMonitor.cs src/BrimDeck/SettingsMonitor.cs:496 — src/BrimDeck/SettingsMonitor.cs changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in SettingsWindow.FiguresMenu at line 496. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/SettingsMonitor.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/Native/MediaSessions.cs src/BrimDeck/Native/MediaSessions.cs:322 — src/BrimDeck/Native/MediaSessions.cs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in MediaSessions.RefreshAsync at line 322. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/Native/MediaSessions.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/App.xaml.cs src/BrimDeck/App.xaml.cs:243 — src/BrimDeck/App.xaml.cs changed 76 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in App.UpdateSettings at line 243. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/App.xaml.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/SettingsMusic.cs src/BrimDeck/SettingsMusic.cs:491 — src/BrimDeck/SettingsMusic.cs changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in SettingsWindow.NeteaseSwitch at line 491. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/SettingsMusic.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/MonitorStrip.cs src/BrimDeck/MonitorStrip.cs:311 — src/BrimDeck/MonitorStrip.cs changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in MonitorStrip.Draw at line 311. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/MonitorStrip.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/Native/WindowsHost.cs src/BrimDeck/Native/WindowsHost.cs:148 — src/BrimDeck/Native/WindowsHost.cs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in WindowsHost.WatchOrderOnce at line 148. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/Native/WindowsHost.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/MonitorPanel.cs src/BrimDeck/MonitorPanel.cs:37 — src/BrimDeck/MonitorPanel.cs changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in MainWindow.UpdateMonitorDemand at line 37. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/MonitorPanel.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck.Core/Music.cs src/BrimDeck.Core/Music.cs:248 — src/BrimDeck.Core/Music.cs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in CompactMusicLayout.Calculate at line 248. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck.Core/Music.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/MainWindow.Shelf.cs src/BrimDeck/MainWindow.Shelf.cs:385 — src/BrimDeck/MainWindow.Shelf.cs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in MainWindow.ColumnHeader at line 385. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/MainWindow.Shelf.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/MainWindow.CompactColumn.cs src/BrimDeck/MainWindow.CompactColumn.cs:28 — src/BrimDeck/MainWindow.CompactColumn.cs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in MainWindow.RenderCompactColumn at line 28. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/MainWindow.CompactColumn.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/MusicVisuals.cs src/BrimDeck/MusicVisuals.cs:50 — src/BrimDeck/MusicVisuals.cs changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in MusicVisuals.Accent at line 50. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/MusicVisuals.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck.Core/LogReader.cs src/BrimDeck.Core/LogReader.cs:217 — src/BrimDeck.Core/LogReader.cs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in LogReader.ParseLine at line 217. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck.Core/LogReader.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/BrimDeck/MonitorGauges.cs src/BrimDeck/MonitorGauges.cs:197 — src/BrimDeck/MonitorGauges.cs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in FigureGauge.OnRender at line 197. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 00:09:27 +08:00' --until='2026-11-17 00:09:27 +08:00' --full-history --no-merges -- src/BrimDeck/MonitorGauges.cs`: 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.
  • + 50 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×30
  • Swallowed exception (empty catch) src/BrimDeck.Core/AppleMusicLyrics.cs:91 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/AppleMusicLyrics.cs:108 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/AppUpdates.cs:296 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClaudeQuotaCache.cs:106 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClaudeQuotaCache.cs:136 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClaudeUsageHistory.cs:39 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:76 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:97 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:107 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:157 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:244 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:86 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:173 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:176 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/LanDiscovery.cs:71 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/LanDiscovery.cs:136 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/ClipboardSync/WeTypeSyncClient.cs:139 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/CommandCodeUsage.cs:88 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/CursorPrices.cs:74 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/CursorPrices.cs:197 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/DataLocations.cs:98 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/DeviceReads.cs:60 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/GrokBotUsage.cs:76 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/GrokBotUsage.cs:79 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/BrimDeck.Core/InstallerUpdates.cs:140 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 5 more in this group — see findings.md.
AX2 · Stateful singletons · Process-global static state · ×27
  • Process-global static state: Loc src/BrimDeck.Core/Loc.cs:10 — `Loc` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (IsEnglish; e.g. `IsEnglish` at line 17). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: PanelThemes src/BrimDeck.Core/PanelThemes.Build.cs:7 — `PanelThemes` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (ResolvedBuiltIns, _builtInIndex, ParsedBuiltIns, _builtIns, _template; e.g. `ResolvedBuiltIns` at line 22). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: CapDot src/BrimDeck/CapDot.cs:14 — `CapDot` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Centers; e.g. `Centers` at line 81). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: ClockFace src/BrimDeck/ClockFace.cs:11 — `ClockFace` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (DigitCells; e.g. `DigitCells` at line 231). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: CompactStylePreview src/BrimDeck/CompactStylePreview.cs:12 — `CompactStylePreview` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_fixed; e.g. `_fixed` at line 18). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: MainWindow src/BrimDeck/DevicesPanel.cs:10 — `MainWindow` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (SegmentFills; e.g. `SegmentFills` at line 256). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: DeviceInks src/BrimDeck/DevicesView.cs:455 — `DeviceInks` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (TextColors; e.g. `TextColors` at line 495). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: DeviceGlyphs src/BrimDeck/DevicesView.cs:502 — `DeviceGlyphs` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Pens, Places; e.g. `Pens` at line 527). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: InkCentredText src/BrimDeck/InkCentredText.cs:23 — `InkCentredText` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Spans; e.g. `Spans` at line 126). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: IslandDecor src/BrimDeck/IslandDecor.cs:14 — `IslandDecor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (CausticTiles; e.g. `CausticTiles` at line 126). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: MonitorDraw src/BrimDeck/MonitorDraw.cs:20 — `MonitorDraw` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_fontSeen, Texts, Drawn, Letters, Tracks, Places; e.g. `_fontSeen` at line 48). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: Motion src/BrimDeck/MonitorDraw.cs:268 — `Motion` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Steps, Moving, _hooked, _last; e.g. `Steps` at line 282). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: PowerBlock src/BrimDeck/MonitorPower.cs:29 — `PowerBlock` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_view; e.g. `_view` at line 194). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: MoveLook src/BrimDeck/MoveOverlay.cs:382 — `MoveLook` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Pens, Fades; e.g. `Pens` at line 458). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: PanelTheme src/BrimDeck/PanelTheme.cs:14 — `PanelTheme` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_generations, Looks, UserThemes, Loaded, _draftPalettes, _drafts; e.g. `_generations` at line 20). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: PowerStyle src/BrimDeck/PowerGlyphs.cs:9 — `PowerStyle` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_last; e.g. `_last` at line 43). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: PowerGlyphs src/BrimDeck/PowerGlyphs.cs:66 — `PowerGlyphs` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Outlines, Plugs, Cuts; e.g. `Outlines` at line 79). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: PowerMarks src/BrimDeck/PowerGlyphs.cs:289 — `PowerMarks` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Pens; e.g. `Pens` at line 303). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: PowerIcons src/BrimDeck/PowerIcons.cs:15 — `PowerIcons` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Angles, Pens; e.g. `Angles` at line 41). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: ResizeGripLayer src/BrimDeck/ResizeGripLayer.cs:18 — `ResizeGripLayer` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_rim, Fades; e.g. `_rim` at line 210). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: RingLetter src/BrimDeck/RingLetter.cs:17 — `RingLetter` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Made; e.g. `Made` at line 45). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: SettingsWindow src/BrimDeck/SettingsApplications.cs:12 — `SettingsWindow` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (AppDescriptions, _workBuddyLogins; e.g. `AppDescriptions` at line 293). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: DisplayPower src/BrimDeck/Native/DisplayPower.cs:14 — `DisplayPower` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_dispatcher, _window, _recheck, _notification; e.g. `_dispatcher` at line 28). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: GamingBatteries src/BrimDeck/Native/GamingBatteries.cs:14 — `GamingBatteries` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (HidNames; e.g. `HidNames` at line 107). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: MonitorBridgeReader src/BrimDeck/Native/MonitorBridgeReader.cs:18 — `MonitorBridgeReader` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_http; e.g. `_http` at line 25). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • + 2 more in this group — see findings.md.
X2 · Cancellation propagation · Async method without CancellationToken · ×26
  • Async method without CancellationToken: ReadAsync src/BrimDeck.Core/CommandCodeUsage.cs:95 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunKimiAsync src/BrimDeck.Core/ScriptProvider.cs:164 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunKimiPlatformAsync src/BrimDeck.Core/ScriptProvider.cs:200 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunCommandCodeAsync src/BrimDeck.Core/ScriptProvider.cs:256 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunMiMoAsync src/BrimDeck.Core/ScriptProvider.cs:277 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: UnpairLanAsync src/BrimDeck/ClipboardSyncService.Lan.cs:29 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: StartNeteaseFullControl src/BrimDeck/MainWindow.Music.cs:368 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CyclePlaybackMode src/BrimDeck/MainWindow.Music.cs:968 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: EnableKugouControl src/BrimDeck/MainWindow.Music.cs:990 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: EnableNeteaseControl src/BrimDeck/MainWindow.Music.cs:1005 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunMediaCommand src/BrimDeck/MainWindow.Music.cs:1019 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CommitSeek src/BrimDeck/MainWindow.Music.cs:1033 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RefreshAsync src/BrimDeck/MainWindow.xaml.cs:1228 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunAsync src/BrimDeck/Native/AppleMusicControls.cs:56 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CleanupAsync src/BrimDeck/Native/DoubaoBrowserLogin.cs:96 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: EnableFullControlAsync src/BrimDeck/Native/MediaSessions.cs:90 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: EnableNeteaseFileControlAsync src/BrimDeck/Native/MediaSessions.cs:110 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: DisableNeteaseFileControlAsync src/BrimDeck/Native/MediaSessions.cs:117 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: EnableKugouFullControlAsync src/BrimDeck/Native/MediaSessions.cs:174 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: StartAsync src/BrimDeck/Native/MediaSessions.cs:234 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RefreshAsync src/BrimDeck/Native/MediaSessions.cs:322 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RetryMetadataAsync src/BrimDeck/Native/MediaSessions.cs:463 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: ReadSystemAsync src/BrimDeck/Native/MediaSessions.cs:572 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: ReadSystemCoreAsync src/BrimDeck/Native/MediaSessions.cs:585 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CommandAsync src/BrimDeck/Native/MediaSessions.cs:701 — No CancellationToken parameter — this work can't be stopped early once started.
  • + 1 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×24
  • TooManyMethods: MainWindow src/BrimDeck/MainWindow.Shelf.cs — TooManyMethods — 6574 significant lines (blank, comment-only and punctuation-only lines excluded), 554 methods, declared across 33 files: BrimDeck/MainWindow.Shelf.cs (74), BrimDeck/MainWindow.Music.cs (67), BrimDeck/MainWindow.xaml.cs (67), BrimDeck/MainWindow.ShelfDetail.cs (48), +29 more file(s). The bar is 30 methods; this is 524 over it, 18.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: SettingsWindow src/BrimDeck/SettingsWindow.cs — TooManyMethods — 6333 significant lines (blank, comment-only and punctuation-only lines excluded), 400 methods, declared across 27 files: BrimDeck/SettingsWindow.cs (73), BrimDeck/SettingsMonitor.cs (24), BrimDeck/SettingsMusic.cs (24), BrimDeck/SettingsShelf.cs (22), +23 more file(s). The bar is 30 methods; this is 370 over it, 13.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.
  • TooManyMethods: App src/BrimDeck/App.xaml.cs — TooManyMethods — 735 significant lines (blank, comment-only and punctuation-only lines excluded), 104 methods, declared across 5 files: BrimDeck/App.xaml.cs (45), BrimDeck/App.Profiles.cs (22), BrimDeck/App.Hotkeys.cs (20), BrimDeck/App.Memory.cs (11), +1 more file(s). The bar is 30 methods; this is 74 over it, 3.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: Dongles src/BrimDeck.Core/DeviceProtocols.cs — TooManyMethods — 586 significant lines (blank, comment-only and punctuation-only lines excluded), 87 methods. The bar is 30 methods; this is 57 over it, 2.90× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: PanelThemes src/BrimDeck.Core/PanelThemes.Build.cs — TooManyMethods — 705 significant lines (blank, comment-only and punctuation-only lines excluded), 81 methods, declared across 11 files: BrimDeck.Core/PanelThemes.Build.cs (21), BrimDeck.Core/PanelThemes.Daylight.cs (14), BrimDeck.Core/PanelThemes.cs (9), BrimDeck.Core/PanelThemes.Draft.cs (8), +7 more file(s). The bar is 30 methods; this is 51 over it, 2.70× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: HidBatteries src/BrimDeck/Native/HidBatteries.cs — TooManyMethods — 900 significant lines (blank, comment-only and punctuation-only lines excluded), 80 methods. The bar is 30 methods; this is 50 over it, 2.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: WindowsHost src/BrimDeck/Native/WindowsHost.cs — TooManyMethods — 419 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UsageService src/BrimDeck.Core/UsageService.cs — TooManyMethods — 1198 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 30 methods; this is 35 over it, 2.17× 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: TaskbarMirror src/BrimDeck/Native/TaskbarMirror.cs — TooManyMethods — 240 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: MediaSessions src/BrimDeck/Native/MediaSessions.cs — TooManyMethods — 535 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: LyricsService src/BrimDeck.Core/AppleMusicLyrics.cs — TooManyMethods — 485 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods, declared across 5 files: BrimDeck.Core/AppleMusicLyrics.cs (15), BrimDeck.Core/Lyrics.cs (13), BrimDeck.Core/QueMusicLyrics.cs (12), BrimDeck.Core/QqLyrics.cs (4), +1 more file(s). 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: Renderer scripts/readme-media/Program.cs — TooManyMethods — 1161 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 30 methods; this is 15 over it, 1.50× 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: ShelfService src/BrimDeck/ShelfService.cs — TooManyMethods — 308 significant lines (blank, comment-only and punctuation-only lines excluded), 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: FrameRates src/BrimDeck/Native/FrameRates.cs — TooManyMethods — 321 significant lines (blank, comment-only and punctuation-only lines excluded), 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: MonitorStrip src/BrimDeck/MonitorStrip.cs — TooManyMethods — 354 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 30 methods; this is 11 over it, 1.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: Hid src/BrimDeck/Native/Hid.cs — TooManyMethods — 145 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ClipboardSyncService src/BrimDeck/ClipboardSyncService.cs — TooManyMethods — 445 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods, declared across 2 files: BrimDeck/ClipboardSyncService.cs (32), BrimDeck/ClipboardSyncService.Lan.cs (6). The bar is 30 methods; this is 8 over it, 1.27× 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: PanelLook src/BrimDeck/PanelTheme.cs — TooManyMethods — 204 significant lines (blank, comment-only and punctuation-only lines excluded), 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: Shelf src/BrimDeck.Core/Shelf.cs — TooManyMethods — 198 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: KimiUsage src/BrimDeck.Core/KimiUsage.cs — TooManyMethods — 191 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: PanelTheme src/BrimDeck/PanelTheme.cs — TooManyMethods — 70 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ShelfRules src/BrimDeck.Core/ShelfRules.cs — TooManyMethods — 150 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: Pricing src/BrimDeck.Core/Pricing.cs — TooManyMethods — 383 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UI src/BrimDeck/UI.cs — TooManyMethods — 132 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
D3 · God Classes · MethodTooLong · ×17
  • MethodTooLong: MainWindow.RenderMusic src/BrimDeck/MainWindow.Music.cs:448 — MethodTooLong — RenderMusic runs 255 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 155 over it, 2.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SettingsWindow.SourceDetails src/BrimDeck/SettingsProviders.cs:236 — MethodTooLong — SourceDetails runs 192 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ExpandedLayout.For src/BrimDeck.Core/ExpandedLayout.cs:123 — MethodTooLong — For runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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: DeckSettings.Normalize src/BrimDeck.Core/Settings.cs:874 — MethodTooLong — Normalize runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SettingsWindow.HotkeyRow src/BrimDeck/SettingsHotkeys.cs:78 — MethodTooLong — HotkeyRow runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× 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: Renderer.ShelfViews scripts/readme-media/Program.cs:1088 — MethodTooLong — ShelfViews runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MainWindow.SetExpanded src/BrimDeck/MainWindow.xaml.cs:829 — MethodTooLong — SetExpanded runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SettingsWindow.RingDetails src/BrimDeck/SettingsProviders.cs:497 — MethodTooLong — RingDetails runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HidBatteries.Scan src/BrimDeck/Native/HidBatteries.cs:344 — MethodTooLong — Scan runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Renderer.ClipboardSyncScene scripts/readme-media/Program.cs:1397 — MethodTooLong — ClipboardSyncScene runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MonitorView.MonitorView(…) src/BrimDeck/MonitorView.cs:84 — MethodTooLong — MonitorView(…) runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Renderer.ShelfMeasures scripts/readme-media/Program.cs:1243 — MethodTooLong — ShelfMeasures runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MainWindow.RenderCompactMusic src/BrimDeck/MainWindow.Music.cs:1168 — MethodTooLong — RenderCompactMusic runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MainWindow.Column src/BrimDeck/UsagePanel.cs:363 — MethodTooLong — Column runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SettingsWindow.ShowWeTypePairingAsync src/BrimDeck/SettingsSyncDialogs.cs:157 — MethodTooLong — ShowWeTypePairingAsync runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SettingsWindow.FiguresMenu src/BrimDeck/SettingsMonitor.cs:496 — MethodTooLong — FiguresMenu runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UsageService.FetchCoreAsync src/BrimDeck.Core/UsageService.cs:313 — MethodTooLong — FetchCoreAsync runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× 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 (5 lines × 2) · ×15
  • Duplicated block (5 lines × 2) src/BrimDeck/Native/Hid.cs:325 — src/BrimDeck/Native/Hid.cs:325-329 | src/BrimDeck/Native/Hid.cs:379-383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/Native/Hid.cs:325` 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 (5 lines × 2) src/BrimDeck/MainWindow.Shelf.cs:837 — src/BrimDeck/MainWindow.Shelf.cs:837-841 | src/BrimDeck/MainWindow.ShelfViews.cs:338-342 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/MainWindow.Shelf.cs:837` 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) src/BrimDeck.Core/DeviceProtocols.cs:1948 — src/BrimDeck.Core/DeviceProtocols.cs:1948-1952 | src/BrimDeck.Core/DeviceProtocols.cs:1959-1963 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck.Core/DeviceProtocols.cs:1948` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) src/BrimDeck.Core/DshSessions.cs:70 — src/BrimDeck.Core/DshSessions.cs:70-74 | src/BrimDeck.Core/KimiSessions.cs:63-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck.Core/DshSessions.cs:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/BrimDeck/MainWindow.Shelf.cs:720 — src/BrimDeck/MainWindow.Shelf.cs:720-724 | src/BrimDeck/MainWindow.ShelfViews.cs:574-578 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/MainWindow.Shelf.cs:720` 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.
  • Duplicated block (5 lines × 2) src/BrimDeck/MainWindow.ShelfDetail.cs:214 — src/BrimDeck/MainWindow.ShelfDetail.cs:214-219 | src/BrimDeck/MainWindow.ShelfDetail.cs:299-303 — both copies are in the same file, so extract the 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) src/BrimDeck/Native/MediaAppWindows.cs:76 — src/BrimDeck/Native/MediaAppWindows.cs:76-80 | src/BrimDeck/Native/ProcessWindows.cs:86-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) src/BrimDeck/Native/KugouInstall.cs:166 — src/BrimDeck/Native/KugouInstall.cs:166-170 | src/BrimDeck/Native/NeteaseInstall.cs:82-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/BrimDeck/Native/MediaAppWindows.cs:35 — src/BrimDeck/Native/MediaAppWindows.cs:35-39 | src/BrimDeck/Native/ProcessWindows.cs:53-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) src/BrimDeck/SettingsReleaseNotes.cs:53 — src/BrimDeck/SettingsReleaseNotes.cs:53-57 | src/BrimDeck/SettingsUpdates.cs:70-74 — 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, `src/BrimDeck/SettingsUpdates.cs:69` calls `Refresh`, `InvokeAsync` and `src/BrimDeck/SettingsReleaseNotes.cs:52` 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) src/BrimDeck.Core/UsageService.cs:1254 — src/BrimDeck.Core/UsageService.cs:1254-1258 | src/BrimDeck.Core/UsageService.cs:1319-1323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck.Core/UsageService.cs:1254` 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 (5 lines × 2) src/BrimDeck/DevicesView.cs:294 — src/BrimDeck/DevicesView.cs:294-298 | src/BrimDeck/DevicesView.cs:314-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) src/BrimDeck/MainWindow.Shelf.cs:918 — src/BrimDeck/MainWindow.Shelf.cs:918-922 | src/BrimDeck/MainWindow.ShelfViews.cs:159-163 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) src/BrimDeck/SettingsSyncDialogs.cs:102 — src/BrimDeck/SettingsSyncDialogs.cs:102-106 | src/BrimDeck/SettingsSyncDialogs.cs:312-316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) scripts/readme-media/compose.py:194 — scripts/readme-media/compose.py:194-198 | scripts/readme-media/compose.py:218-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · FileTooLong · ×14
  • FileTooLong: BrimDeck.Core/UsageService.cs src/BrimDeck.Core/UsageService.cs — FileTooLong — 1229 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 729 over it, 2.46× 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: readme-media/Program.cs scripts/readme-media/Program.cs — FileTooLong — 1208 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 708 over it, 2.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: BrimDeck.Core/DeviceProtocols.cs src/BrimDeck.Core/DeviceProtocols.cs — FileTooLong — 1103 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 603 over it, 2.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Native/HidBatteries.cs src/BrimDeck/Native/HidBatteries.cs — FileTooLong — 1055 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 555 over it, 2.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: BrimDeck/MainWindow.Music.cs src/BrimDeck/MainWindow.Music.cs — FileTooLong — 1018 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 518 over it, 2.04× 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: BrimDeck/SettingsWindow.cs src/BrimDeck/SettingsWindow.cs — FileTooLong — 928 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 428 over it, 1.86× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: BrimDeck/MainWindow.Shelf.cs src/BrimDeck/MainWindow.Shelf.cs — FileTooLong — 903 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 403 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.
  • FileTooLong: BrimDeck/MainWindow.xaml.cs src/BrimDeck/MainWindow.xaml.cs — FileTooLong — 768 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 268 over it, 1.54× 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: BrimDeck.Core/Settings.cs src/BrimDeck.Core/Settings.cs — FileTooLong — 741 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 241 over it, 1.48× 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: BrimDeck/MonitorGauges.cs src/BrimDeck/MonitorGauges.cs — FileTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 75 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Native/MediaSessions.cs src/BrimDeck/Native/MediaSessions.cs — FileTooLong — 568 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 68 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: BrimDeck/SettingsProviders.cs src/BrimDeck/SettingsProviders.cs — FileTooLong — 554 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 54 over it, 1.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: BrimDeck/MusicVisuals.cs src/BrimDeck/MusicVisuals.cs — FileTooLong — 539 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 39 over it, 1.08× 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: BrimDeck/MainWindow.ShelfDetail.cs src/BrimDeck/MainWindow.ShelfDetail.cs — FileTooLong — 521 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 21 over it, 1.04× 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.
D4 · Code Duplication · Edited copy of a member (1 corresponding lines) · ×13
  • Edited copy of a member (1 corresponding lines) src/BrimDeck/MainWindow.ShelfArrange.cs:257 — src/BrimDeck/MainWindow.ShelfArrange.cs:257-258 | src/BrimDeck/MainWindow.ShelfViews.cs:710-710 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck.Core/Brands/AtkOfficial.cs:67 — src/BrimDeck.Core/Brands/AtkOfficial.cs:67-68 | src/BrimDeck.Core/Brands/Betop.cs:20-20 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck.Core/Brands/AtkOfficial.cs:58 — src/BrimDeck.Core/Brands/AtkOfficial.cs:58-58 | src/BrimDeck.Core/Brands/Aula.cs:42-42 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck.Core/Brands/HyperX.cs:34 — src/BrimDeck.Core/Brands/HyperX.cs:34-34 | src/BrimDeck.Core/DeviceProtocols.cs:1015-1015 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck/Native/FrameRates.cs:264 — src/BrimDeck/Native/FrameRates.cs:264-264 | src/BrimDeck/Native/WindowsHost.cs:371-371 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck.Core/Brands/Redragon.cs:33 — src/BrimDeck.Core/Brands/Redragon.cs:33-33 | src/BrimDeck.Core/DeviceProtocols.cs:392-392 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck.Core/Brands/VgnV108.cs:26 — src/BrimDeck.Core/Brands/VgnV108.cs:26-26 | src/BrimDeck.Core/DeviceProtocols.cs:967-967 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck.Core/MiMoUsage.cs:32 — src/BrimDeck.Core/MiMoUsage.cs:32-32 | src/BrimDeck.Core/OpenCodeUsage.cs:32-32 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck/SettingsProviders.cs:520 — src/BrimDeck/SettingsProviders.cs:520-520 | src/BrimDeck/UsagePanel.cs:730-730 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck/SettingsMonitor.cs:318 — src/BrimDeck/SettingsMonitor.cs:318-318 | src/BrimDeck/SettingsMonitorExpanded.cs:63-63 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck/SettingsShelfLayout.cs:158 — src/BrimDeck/SettingsShelfLayout.cs:158-158 | src/BrimDeck/SettingsShelfRules.cs:156-156 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck.Core/CodeAgentUsage.cs:102 — src/BrimDeck.Core/CodeAgentUsage.cs:102-103 | src/BrimDeck.Core/WorkBuddyUsage.cs:217-217 — 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.
  • Edited copy of a member (1 corresponding lines) src/BrimDeck.Core/Lyrics.cs:271 — src/BrimDeck.Core/Lyrics.cs:271-271 | src/BrimDeck/Native/NeteaseCdpConnection.cs:241-241 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×13
  • Duplicated block (6 lines × 2) src/BrimDeck/SettingsReleaseNotes.cs:31 — src/BrimDeck/SettingsReleaseNotes.cs:31-36 | src/BrimDeck/SettingsUpdates.cs:59-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/SettingsReleaseNotes.cs:31` 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) src/BrimDeck/DevicesView.cs:524 — src/BrimDeck/DevicesView.cs:524-529 | src/BrimDeck/PowerGlyphs.cs:300-305 — 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. 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 (6 lines × 2) src/BrimDeck/MainWindow.Shelf.cs:711 — src/BrimDeck/MainWindow.Shelf.cs:711-716 | src/BrimDeck/MainWindow.ShelfViews.cs:653-658 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/MainWindow.Shelf.cs:711` 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 (6 lines × 2) src/BrimDeck/MonitorDraw.cs:209 — src/BrimDeck/MonitorDraw.cs:209-214 | src/BrimDeck/PowerGlyphs.cs:251-256 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) src/BrimDeck/SettingsAppLists.cs:38 — src/BrimDeck/SettingsAppLists.cs:38-43 | src/BrimDeck/SettingsFullscreen.cs:122-127 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/SettingsAppLists.cs:38` 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) src/BrimDeck/SettingsMusic.cs:427 — src/BrimDeck/SettingsMusic.cs:427-432 | src/BrimDeck/SettingsMusic.cs:498-503 — both copies are in the same file, so extract the 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) src/BrimDeck/Native/DoubaoBrowserLogin.cs:100 — src/BrimDeck/Native/DoubaoBrowserLogin.cs:100-105 | src/BrimDeck/Native/MiMoAccount.cs:119-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/Native/DoubaoBrowserLogin.cs:100` 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 (6 lines × 2) src/BrimDeck/SettingsApplications.cs:44 — src/BrimDeck/SettingsApplications.cs:44-49 | src/BrimDeck/SettingsProviders.cs:605-610 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/SettingsApplications.cs:44` 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.
  • Duplicated block (6 lines × 2) src/BrimDeck/SettingsAppLists.cs:24 — src/BrimDeck/SettingsAppLists.cs:24-37 | src/BrimDeck/SettingsFullscreen.cs:86-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/SettingsAppLists.cs:24` 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.
  • Duplicated block (6 lines × 2) src/BrimDeck/SettingsThemeEditor.cs:102 — src/BrimDeck/SettingsThemeEditor.cs:102-108 | src/BrimDeck/SettingsThemeEditor.cs:166-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/SettingsThemeEditor.cs:102` 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) src/BrimDeck.Core/UsageService.cs:737 — src/BrimDeck.Core/UsageService.cs:737-742 | src/BrimDeck.Core/UsageService.cs:825-830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck.Core/UsageService.cs:737` 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.
  • Duplicated block (6 lines × 2) src/BrimDeck/SettingsMonitor.cs:371 — src/BrimDeck/SettingsMonitor.cs:371-378 | src/BrimDeck/SettingsShelf.cs:210-215 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) scripts/icon/Program.cs:206 — scripts/icon/Program.cs:206-211 | scripts/readme-media/Program.cs:394-399 — 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. 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.
X18 · Disposal-pattern correctness · Owned disposable field is never released · ×12
  • Owned disposable field is never released src/BrimDeck.Core/Lyrics.cs:148 — `LyricsService` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_gate` itself (line 148), which makes that instance its own. But `_gate` is named in none of the methods the disposal search covered: `Dispose` (line 317) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_gate?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck.Core/Pricing.cs:43 — `Pricing` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_gate` itself (line 43), which makes that instance its own. But `_gate` is named in none of the methods the disposal search covered: `Dispose` (line 616) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_gate?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck.Core/ScriptProvider.cs:357 — `ConfiguredProviders` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_parallel` itself (line 357), which makes that instance its own. But `_parallel` is named in none of the methods the disposal search covered: `Dispose` (line 465) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_parallel?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck/ClipboardSyncService.cs:40 — `ClipboardSyncService` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_wake` itself (line 40), which makes that instance its own. But `_wake` is named in none of the methods the disposal search covered: `Dispose` (line 474) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_wake?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck/Native/DeviceBatteries.cs:35 — `DeviceBatteries` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_apple` itself (line 35), which makes that instance its own. But `_apple` is named in none of the methods the disposal search covered: `Dispose` (line 164) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_apple?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck/Native/HidBatteries.cs:1704 — `Channel` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_long` itself (line 1704), which makes that instance its own. But `_long` is named in none of the methods the disposal search covered: `Dispose` (line 1711) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_long?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck/Native/KugouCdpConnection.cs:21 — `KugouCdpConnection` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_exchange` itself (line 21), which makes that instance its own. But `_exchange` is named in none of the methods the disposal search covered: `Dispose` (line 282) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_exchange?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck/Native/KugouCdpConnection.cs:22 — `KugouCdpConnection` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_wake` itself (line 22), which makes that instance its own. But `_wake` is named in none of the methods the disposal search covered: `Dispose` (line 282) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_wake?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck/Native/NeteaseCdpConnection.cs:17 — `NeteaseCdpConnection` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_send` itself (line 17), which makes that instance its own. But `_send` is named in none of the methods the disposal search covered: `Dispose` (line 244) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_send?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck/Native/NeteaseSource.cs:108 — `NeteaseSource` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_wake` itself (line 108), which makes that instance its own. But `_wake` is named in none of the methods the disposal search covered: `Dispose` (line 399), `CleanupAsync` (line 407) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_wake?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck/Native/QqMediaConnection.cs:19 — `QqMediaConnection` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_send` itself (line 19), which makes that instance its own. But `_send` is named in none of the methods the disposal search covered: `Dispose` (line 333) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_send?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
  • Owned disposable field is never released src/BrimDeck/Native/RightFileDrag.cs:18 — `RightFileDrag` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_ready` itself (line 18), which makes that instance its own. But `_ready` is named in none of the methods the disposal search covered: `Dispose` (line 126), `ReleaseLeft` (line 117), `Unhook` (line 142) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_ready?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×11
  • Edited copy of a member (7 corresponding lines) src/BrimDeck.Core/ColorMath.cs:7 — src/BrimDeck.Core/ColorMath.cs:7-16 | src/BrimDeck.Core/ThemeColor.cs:133-139 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/BrimDeck.Core/Brands/SonyPulse.cs:28 — src/BrimDeck.Core/Brands/SonyPulse.cs:28-34 | src/BrimDeck.Core/Brands/SonyPulse.cs:37-43 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/BrimDeck/SettingsProviders.cs:200 — src/BrimDeck/SettingsProviders.cs:200-206 | src/BrimDeck/SettingsWorkBuddy.cs:46-53 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/BrimDeck.Core/EdgeFrame.cs:47 — src/BrimDeck.Core/EdgeFrame.cs:47-53 | src/BrimDeck.Core/EdgeFrame.cs:56-62 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/BrimDeck.Core/DeviceProtocols.cs:569 — src/BrimDeck.Core/DeviceProtocols.cs:569-575 | src/BrimDeck.Core/DeviceProtocols.cs:597-603 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/BrimDeck.Core/Devices.cs:373 — src/BrimDeck.Core/Devices.cs:373-380 | src/BrimDeck.Core/MediaRouting.cs:39-45 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/BrimDeck/PageHandover.cs:250 — src/BrimDeck/PageHandover.cs:250-256 | src/BrimDeck/Soft.cs:116-122 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/BrimDeck/Native/KugouInstall.cs:88 — src/BrimDeck/Native/KugouInstall.cs:88-94 | src/BrimDeck/Native/NeteaseInstall.cs:41-47 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:196 — src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:196-202 | src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:205-211 — 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) scripts/icon/Program.cs:53 — scripts/icon/Program.cs:53-59 | scripts/icon/Program.cs:60-66 — 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) scripts/icon/Program.cs:205 — scripts/icon/Program.cs:205-211 | scripts/readme-media/Program.cs:393-399 — 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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×11
  • Sync-over-async blocking — 10 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking src/BrimDeck/Native/MonitorBridgeReader.cs:119 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking src/BrimDeck/Native/MonitorBridgeReader.cs:121 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking src/BrimDeck/Native/PointerPressObserver.cs:43 — `ready.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking src/BrimDeck/Native/PowerSensors.cs:302 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking src/BrimDeck/Native/PowerSensors.cs:305 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking src/BrimDeck/Native/RightFileDrag.cs:30 — `_ready.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking src/BrimDeck/Native/SensorClient.cs:76 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking src/BrimDeck/Native/TrafficRecord.cs:49 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking src/BrimDeck/ShelfService.cs:388 — `_writing.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking src/BrimDeck.Sensors/Program.cs:76 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
D17 · Explicit Debt · Dead code · ×10
  • Dead code: VendorPage src/BrimDeck.Core/Brands/MouseShapes.cs:13 — Method VendorPage — Roslyn's SymbolFinder walked every project the solution loads, including BrimDeck.Core, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: DisplayLabel src/BrimDeck/MainWindow.xaml.cs:44 — Method DisplayLabel — Roslyn's SymbolFinder walked every project the solution loads, including BrimDeck, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: Look src/BrimDeck/ModelDatePicker.cs:24 — Property Look — Roslyn's SymbolFinder walked every project the solution loads, including BrimDeck, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: MoveLiveContent src/BrimDeck/MoveLiveContent.cs:9 — NamedType MoveLiveContent — Roslyn's SymbolFinder walked every project the solution loads, including BrimDeck, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: Look src/BrimDeck/MoveOverlay.cs:29 — Property Look — Roslyn's SymbolFinder walked every project the solution loads, including BrimDeck, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: Look src/BrimDeck/MusicControls.cs:14 — Property Look — Roslyn's SymbolFinder walked every project the solution loads, including BrimDeck, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: Look src/BrimDeck/MusicVisuals.cs:538 — Property Look — Roslyn's SymbolFinder walked every project the solution loads, including BrimDeck, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: Look src/BrimDeck/MusicVisuals.cs:787 — Property Look — Roslyn's SymbolFinder walked every project the solution loads, including BrimDeck, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: Look src/BrimDeck/MusicVisuals.cs:822 — Property Look — Roslyn's SymbolFinder walked every project the solution loads, including BrimDeck, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
  • Dead code: GroupKey src/BrimDeck/Native/HidBatteries.cs:670 — Method GroupKey — Roslyn's SymbolFinder walked every project the solution loads, including BrimDeck, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×10
  • Edited copy of a member (6 corresponding lines) src/BrimDeck.Core/DeviceProtocols.cs:881 — src/BrimDeck.Core/DeviceProtocols.cs:881-890 | src/BrimDeck.Core/DeviceProtocols.cs:994-999 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/BrimDeck.Core/MediaAppTarget.cs:45 — src/BrimDeck.Core/MediaAppTarget.cs:45-50 | src/BrimDeck.Core/MediaAppTarget.cs:79-84 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/BrimDeck/MainWindow.Shelf.cs:822 — src/BrimDeck/MainWindow.Shelf.cs:822-827 | src/BrimDeck/MainWindow.ShelfViews.cs:325-331 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/BrimDeck/Native/BluetoothBatteries.cs:100 — src/BrimDeck/Native/BluetoothBatteries.cs:100-105 | src/BrimDeck/Native/BluetoothBatteries.cs:126-131 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/BrimDeck.Core/MonitorFormat.cs:30 — src/BrimDeck.Core/MonitorFormat.cs:30-35 | src/BrimDeck.Core/MonitorFormat.cs:56-63 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/BrimDeck.Core/DeviceProtocols.cs:112 — src/BrimDeck.Core/DeviceProtocols.cs:112-117 | src/BrimDeck.Core/DeviceProtocols.cs:1150-1155 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/BrimDeck/Native/KugouInstall.cs:159 — src/BrimDeck/Native/KugouInstall.cs:159-164 | src/BrimDeck/Native/NeteaseInstall.cs:74-80 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/BrimDeck/MainWindow.Music.cs:969 — src/BrimDeck/MainWindow.Music.cs:969-979 | src/BrimDeck/MainWindow.Music.cs:1020-1025 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/BrimDeck.Core/KimiQuotaCache.cs:65 — src/BrimDeck.Core/KimiQuotaCache.cs:65-74 | src/BrimDeck.Core/ClaudeQuotaCache.cs:116-121 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/BrimDeck/ModelDetails.cs:25 — src/BrimDeck/ModelDetails.cs:25-30 | src/BrimDeck/SettingsProviders.cs:78-83 — 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×10
  • Swallowed exception (caught, then discarded) src/BrimDeck.Core/AntigravityUsage.cs:38 — `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/BrimDeck.Core/AntigravityUsage.cs:115 — `catch (ArgumentOutOfRangeException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:123 — `catch (IOException) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/BrimDeck.Core/ClipboardSync/LanDiscovery.cs:60 — `catch (SocketException) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/BrimDeck.Core/ClipboardSync/LanDiscovery.cs:126 — `catch (SocketException) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/BrimDeck.Core/CommandCodeUsage.cs:55 — `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/BrimDeck.Core/DshSessions.cs:244 — `catch (JsonException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/BrimDeck.Core/KimiSessions.cs:113 — `catch (ArgumentOutOfRangeException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/BrimDeck.Core/KimiSessions.cs:123 — `catch (JsonException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/BrimDeck.Core/LogReader.cs:302 — `catch (JsonException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×9
  • Edited copy of a member (8 corresponding lines) src/BrimDeck.Core/Brands/AtkHeadsets.cs:36 — src/BrimDeck.Core/Brands/AtkHeadsets.cs:36-43 | src/BrimDeck.Core/Brands/Eweadn.cs:34-41 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/BrimDeck.Core/KimiUsage.cs:127 — src/BrimDeck.Core/KimiUsage.cs:127-138 | src/BrimDeck.Core/UsageService.cs:1114-1121 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/BrimDeck/PowerGlyphs.cs:74 — src/BrimDeck/PowerGlyphs.cs:74-81 | src/BrimDeck/PowerIcons.cs:48-60 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/BrimDeck/SettingsUpdates.cs:17 — src/BrimDeck/SettingsUpdates.cs:17-24 | src/BrimDeck/SettingsUpdates.cs:28-37 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/BrimDeck/Native/SensorSetup.cs:231 — src/BrimDeck/Native/SensorSetup.cs:231-238 | src/BrimDeck.Sensors/PawnIo.cs:34-41 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/BrimDeck/MainWindow.MusicGestures.cs:120 — src/BrimDeck/MainWindow.MusicGestures.cs:120-127 | src/BrimDeck/SettingsPalette.cs:65-73 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/BrimDeck/SettingsGestures.cs:40 — src/BrimDeck/SettingsGestures.cs:40-47 | src/BrimDeck/SettingsShelfRules.cs:335-342 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/BrimDeck.Core/AppleMusicLyrics.cs:172 — src/BrimDeck.Core/AppleMusicLyrics.cs:172-180 | src/BrimDeck.Core/AudioTags.cs:14-21 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/BrimDeck/SettingsDevices.cs:113 — src/BrimDeck/SettingsDevices.cs:113-120 | src/BrimDeck/SettingsWindow.cs:846-853 — 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 (5 corresponding lines) · ×8
  • Edited copy of a member (5 corresponding lines) src/BrimDeck.Core/Brands/WobRainy.cs:34 — src/BrimDeck.Core/Brands/WobRainy.cs:34-38 | src/BrimDeck.Core/Brands/WobRainy.cs:60-64 — 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) src/BrimDeck/SettingsApplications.cs:120 — src/BrimDeck/SettingsApplications.cs:120-124 | src/BrimDeck/SettingsMusic.cs:118-122 — 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) src/BrimDeck.Core/KimiSessions.cs:90 — src/BrimDeck.Core/KimiSessions.cs:90-94 | src/BrimDeck.Core/LogReader.cs:105-109 — 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) src/BrimDeck/Native/DeviceReadStore.cs:93 — src/BrimDeck/Native/DeviceReadStore.cs:93-97 | src/BrimDeck/Native/SensorGuard.cs:197-201 — 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) src/BrimDeck/MainWindow.Music.cs:1115 — src/BrimDeck/MainWindow.Music.cs:1115-1119 | src/BrimDeck/MainWindow.Music.cs:1147-1151 — 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) src/BrimDeck.Core/Devices.cs:382 — src/BrimDeck.Core/Devices.cs:382-387 | src/BrimDeck/Native/PhoneLinkBatteries.cs:160-164 — 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) src/BrimDeck/SettingsCollapsedSize.cs:316 — src/BrimDeck/SettingsCollapsedSize.cs:316-320 | src/BrimDeck/SettingsControls.cs:152-156 — 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) src/BrimDeck/MainWindow.MusicGestures.cs:53 — src/BrimDeck/MainWindow.MusicGestures.cs:53-57 | src/BrimDeck/MainWindow.ShelfArrange.cs:439-443 — 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.
X1 · Async correctness · Sync-over-async (deadlock risk) · ×8
  • Sync-over-async (deadlock risk) src/BrimDeck/Native/MonitorBridgeReader.cs:119 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) src/BrimDeck/Native/MonitorBridgeReader.cs:121 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) src/BrimDeck/Native/PowerSensors.cs:302 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) src/BrimDeck/Native/PowerSensors.cs:305 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) src/BrimDeck/Native/SensorClient.cs:76 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) src/BrimDeck/Native/TrafficRecord.cs:49 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) src/BrimDeck/ShelfService.cs:388 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) src/BrimDeck.Sensors/Program.cs:76 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×6
  • Edited copy of a member (4 corresponding lines) src/BrimDeck.Core/ClaudeQuotaCache.cs:87 — src/BrimDeck.Core/ClaudeQuotaCache.cs:87-91 | src/BrimDeck.Core/KimiQuotaCache.cs:58-61 — 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.
  • Edited copy of a member (4 corresponding lines) src/BrimDeck.Core/ScriptProvider.cs:386 — src/BrimDeck.Core/ScriptProvider.cs:386-390 | src/BrimDeck.Core/UsageService.cs:1473-1476 — 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.
  • Edited copy of a member (4 corresponding lines) src/BrimDeck/Native/DesktopSources.cs:184 — src/BrimDeck/Native/DesktopSources.cs:184-187 | src/BrimDeck/Native/FrameRates.cs:419-422 — 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.
  • Edited copy of a member (4 corresponding lines) src/BrimDeck/Native/HidppEvents.cs:107 — src/BrimDeck/Native/HidppEvents.cs:107-110 | src/BrimDeck/Native/PushEvents.cs:92-95 — 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.
  • Edited copy of a member (4 corresponding lines) src/BrimDeck/SettingsMusic.cs:411 — src/BrimDeck/SettingsMusic.cs:411-414 | src/BrimDeck/SettingsSyncDialogs.cs:150-155 — 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.
  • Edited copy of a member (4 corresponding lines) src/BrimDeck/Native/CorsairReader.cs:131 — src/BrimDeck/Native/CorsairReader.cs:131-134 | src/BrimDeck/SettingsWorkBuddy.cs:54-58 — 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×6
  • Outbound HTTP without resilience scripts/readme-media/Program.cs:102 — `new HttpClient(new Offline())` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience src/BrimDeck.Core/ScriptProvider.cs:365 — `new HttpClient(new HttpClientHandler { AllowAutoRedirect = false }) { Timeout...` builds an outbound HTTP client, and what is applied to it does not bound it. Its `Timeout` is set to `Timeout.InfiniteTimeSpan`, which removes HttpClient's own bound rather than setting one. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience src/BrimDeck/Native/KugouCdpConnection.cs:112 — `new HttpClient(new HttpClientHandler { UseProxy = false, AllowAutoRedirect = ...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience src/BrimDeck/Native/KugouCdpConnection.cs:123 — `new HttpClient(new HttpClientHandler { UseProxy = false, AllowAutoRedirect = ...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience src/BrimDeck/Native/NeteaseCdpConnection.cs:71 — `new HttpClient(new HttpClientHandler { UseProxy = false, AllowAutoRedirect = ...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience src/BrimDeck/Updates/GitHubUpdates.cs:49 — `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
X1 · Async correctness · Blocking `File.WriteAllText` inside an `async` method · ×6
  • Blocking `File.WriteAllText` inside an `async` method src/BrimDeck.Core/InstallerUpdates.cs:194 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method scripts/readme-media/Program.cs:616 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method scripts/readme-media/Program.cs:649 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method scripts/readme-media/Program.cs:674 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method scripts/readme-media/Program.cs:700 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllText` inside an `async` method scripts/readme-media/Program.cs:1388 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
X1 · Async correctness · async void method · ×6
  • async void method: UpdateLyrics src/BrimDeck/MainWindow.Music.cs:308 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: RereadEndpoint src/BrimDeck/Native/BluetoothBatteries.cs:99 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: Reread src/BrimDeck/Native/BluetoothBatteries.cs:125 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: Open src/BrimDeck/Native/BluetoothBatteries.cs:272 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: PollAsync src/BrimDeck/Native/BluetoothBatteries.cs:380 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
  • async void method: Sync_Click src/BrimDeck/UsageSynchronization.cs:51 — `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×5
  • Edited copy of a member (2 corresponding lines) src/BrimDeck/Native/QqMediaConnection.cs:326 — src/BrimDeck/Native/QqMediaConnection.cs:326-329 | src/BrimDeck.Core/NeteaseLog.cs:133-134 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) src/BrimDeck.Core/Brands/Alienware.cs:22 — src/BrimDeck.Core/Brands/Alienware.cs:22-23 | src/BrimDeck.Core/Brands/Urx.cs:21-23 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) src/BrimDeck.Core/Brands/AtkHeadsets.cs:49 — src/BrimDeck.Core/Brands/AtkHeadsets.cs:49-50 | src/BrimDeck.Core/Brands/Edifier.cs:25-26 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) src/BrimDeck.Core/Brands/NuPhy.cs:93 — src/BrimDeck.Core/Brands/NuPhy.cs:93-94 | src/BrimDeck.Core/Brands/RkKeyboard.cs:39-40 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) src/BrimDeck.Core/Brands/Aula.cs:46 — src/BrimDeck.Core/Brands/Aula.cs:46-47 | src/BrimDeck.Core/Brands/Darmoshark.cs:59-60 — These two members are one piece of code written twice and then edited apart: 2 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 (8 lines × 2) · ×5
  • Duplicated block (8 lines × 2) src/BrimDeck.Core/DshSessions.cs:59 — src/BrimDeck.Core/DshSessions.cs:59-66 | src/BrimDeck.Core/KimiSessions.cs:52-59 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck.Core/DshSessions.cs:59` 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.
  • Duplicated block (8 lines × 2) src/BrimDeck/ClockFace.cs:258 — src/BrimDeck/ClockFace.cs:258-265 | src/BrimDeck/ClockFace.cs:284-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/ClockFace.cs:258` 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) src/BrimDeck/CapDot.cs:63 — src/BrimDeck/CapDot.cs:63-70 | src/BrimDeck/InkCentredText.cs:103-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) src/BrimDeck/MusicLyricsPreview.cs:53 — src/BrimDeck/MusicLyricsPreview.cs:53-60 | src/BrimDeck/MusicLyricsPreview.cs:69-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/MusicLyricsPreview.cs:53` 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. 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 (8 lines × 2) src/BrimDeck/MonitorProcesses.cs:500 — src/BrimDeck/MonitorProcesses.cs:500-507 | src/BrimDeck/ShelfFiles.cs:256-263 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/MonitorProcesses.cs:500` 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.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×5
  • NuGet dependencies are not locked src/BrimDeck.Core/BrimDeck.Core.csproj:23 — src/BrimDeck.Core/BrimDeck.Core.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
  • NuGet dependencies are not locked src/BrimDeck.Sensors/BrimDeck.Sensors.csproj:20 — src/BrimDeck.Sensors/BrimDeck.Sensors.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
  • NuGet dependencies are not locked src/BrimDeck/BrimDeck.csproj:8 — src/BrimDeck/BrimDeck.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
  • NuGet dependencies are not locked tests/BrimDeck.MediaTests/BrimDeck.MediaTests.csproj:11 — tests/BrimDeck.MediaTests/BrimDeck.MediaTests.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
  • NuGet dependencies are not locked tests/BrimDeck.WindowsTests/BrimDeck.WindowsTests.csproj:12 — tests/BrimDeck.WindowsTests/BrimDeck.WindowsTests.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
X18 · Disposal-pattern correctness · Disposes a dependency it does not own · ×5
  • Disposes a dependency it does not own src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:224 — `stream` is a `SslStream` that `ConnectedPeer` never creates — every assignment to it takes a constructor parameter — and this type disposes it here (line 224). The caller that hands it over at `new ConnectedPeer(socket, stream)` (LanClipboardLink.cs line 200) releases the same value itself, so it kept ownership: this release is a second one, on a value that is still the caller's, and it ends the caller's instance while the caller may still be using it. Drop the call and leave the release to the caller that created the value — or, if this type is meant to own it, stop releasing it at the construction site so ownership is stated once.
  • Disposes a dependency it does not own src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:225 — `socket` is a `TcpClient` that `ConnectedPeer` never creates — every assignment to it takes a constructor parameter — and this type disposes it here (line 225). The caller that hands it over at `new ConnectedPeer(socket, stream)` (LanClipboardLink.cs line 200) releases the same value itself, so it kept ownership: this release is a second one, on a value that is still the caller's, and it ends the caller's instance while the caller may still be using it. Drop the call and leave the release to the caller that created the value — or, if this type is meant to own it, stop releasing it at the construction site so ownership is stated once.
  • Disposes a dependency it does not own src/BrimDeck/Native/ProcessLoopbackCapture.cs:109 — `_client` is a `AudioClient` that `ProcessLoopbackCapture` never creates — every assignment to it takes a constructor parameter — and this type disposes it here (line 109). The caller that hands it over at `new ProcessLoopbackCapture(processId, client)` (ProcessLoopbackCapture.cs line 57) releases the same value itself, so it kept ownership: this release is a second one, on a value that is still the caller's, and it ends the caller's instance while the caller may still be using it. Drop the call and leave the release to the caller that created the value — or, if this type is meant to own it, stop releasing it at the construction site so ownership is stated once.
  • Disposes a dependency it does not own src/BrimDeck/Native/SystemVolume.cs:28 — `_enumerator` is a `MMDeviceEnumerator` that `SystemVolume` never creates — every assignment to it takes a constructor parameter — and this type disposes it here (line 28). The caller that hands it over at `new SystemVolume(enumerator, enumerator.GetDefaultAudioEndpoint(DataFlow.Rend...` (SystemVolume.cs line 17) releases the same value itself, so it kept ownership: this release is a second one, on a value that is still the caller's, and it ends the caller's instance while the caller may still be using it. Drop the call and leave the release to the caller that created the value — or, if this type is meant to own it, stop releasing it at the construction site so ownership is stated once.
  • Disposes a dependency it does not own src/BrimDeck.Sensors/PawnIo.cs:58 — `_handle` is a `SafeFileHandle` that `PawnIo` never creates — every assignment to it takes a constructor parameter — and this type disposes it here (line 58). The caller that hands it over at `new PawnIo(handle)` (PawnIo.cs line 29) releases the same value itself, so it kept ownership: this release is a second one, on a value that is still the caller's, and it ends the caller's instance while the caller may still be using it. Drop the call and leave the release to the caller that created the value — or, if this type is meant to own it, stop releasing it at the construction site so ownership is stated once.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×4
  • Edited copy of a member (9 corresponding lines) src/BrimDeck/MusicLyricsPreview.cs:32 — src/BrimDeck/MusicLyricsPreview.cs:32-43 | src/BrimDeck/MusicLyricsPreview.cs:106-114 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/BrimDeck/UI.cs:139 — src/BrimDeck/UI.cs:139-147 | src/BrimDeck/UsageSynchronization.cs:114-129 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/BrimDeck/MoveOverlay.cs:464 — src/BrimDeck/MoveOverlay.cs:464-472 | src/BrimDeck/ResizeGripLayer.cs:266-277 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/BrimDeck/Native/SensorSetup.cs:46 — src/BrimDeck/Native/SensorSetup.cs:46-54 | src/BrimDeck/Native/SensorSetup.cs:60-68 — 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, 2+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 2+ corresponding lines) src/BrimDeck.Core/Brands/RazerHeadsets.cs:86 — src/BrimDeck.Core/Brands/RazerHeadsets.cs:86-87 | src/BrimDeck.Core/Brands/RazerHeadsets.cs:98-99 | src/BrimDeck.Core/Brands/Scyrox.cs:45-46 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 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, 2+ corresponding lines) src/BrimDeck.Core/Brands/AstroA50Gen4.cs:24 — src/BrimDeck.Core/Brands/AstroA50Gen4.cs:24-25 | src/BrimDeck.Core/Brands/Darkrim.cs:44-45 | src/BrimDeck.Core/Brands/LenovoHeadsets.cs:21-22 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 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, 2+ corresponding lines) src/BrimDeck.Core/ClaudeQuotaCache.cs:38 — src/BrimDeck.Core/ClaudeQuotaCache.cs:38-39 | src/BrimDeck.Core/CursorPrices.cs:52-53 | src/BrimDeck.Core/KimiQuotaCache.cs:29-30 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 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, 2+ corresponding lines) src/BrimDeck.Core/Brands/AtkOfficial.cs:85 — src/BrimDeck.Core/Brands/AtkOfficial.cs:85-86 | src/BrimDeck.Core/Brands/Incott.cs:27-28 | src/BrimDeck.Core/Brands/Keychron.cs:30-31 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 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 (7 lines × 2) · ×4
  • Duplicated block (7 lines × 2) src/BrimDeck.Core/MiMoUsage.cs:272 — src/BrimDeck.Core/MiMoUsage.cs:272-278 | src/BrimDeck.Core/OpenCodeUsage.cs:132-138 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck.Core/MiMoUsage.cs:272` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/BrimDeck/MainWindow.Shelf.cs:1137 — src/BrimDeck/MainWindow.Shelf.cs:1137-1143 | src/BrimDeck/MainWindow.ShelfSelect.cs:60-66 — 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) src/BrimDeck/MusicLyricsPreview.cs:32 — src/BrimDeck/MusicLyricsPreview.cs:32-38 | src/BrimDeck/MusicLyricsPreview.cs:106-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/MusicLyricsPreview.cs:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/BrimDeck/MusicLyricsPreview.cs:39` calls `Bar` and `src/BrimDeck/MusicLyricsPreview.cs:113` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) src/BrimDeck/SettingsDevices.cs:114 — src/BrimDeck/SettingsDevices.cs:114-120 | src/BrimDeck/SettingsWindow.cs:847-853 — 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. 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 · Edited copy of a member (12 corresponding lines) · ×3
  • Edited copy of a member (12 corresponding lines) src/BrimDeck/MainWindow.Shelf.cs:566 — src/BrimDeck/MainWindow.Shelf.cs:566-577 | src/BrimDeck/MainWindow.Shelf.cs:583-596 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/BrimDeck.Core/MiMoUsage.cs:271 — src/BrimDeck.Core/MiMoUsage.cs:271-282 | src/BrimDeck.Core/OpenCodeUsage.cs:131-143 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/BrimDeck/SettingsSyncDialogs.cs:96 — src/BrimDeck/SettingsSyncDialogs.cs:96-107 | src/BrimDeck/SettingsSyncDialogs.cs:306-317 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×3
  • Edited copy of a member (11 corresponding lines) src/BrimDeck.Core/DeviceProtocols.cs:932 — src/BrimDeck.Core/DeviceProtocols.cs:932-942 | src/BrimDeck.Core/DeviceProtocols.cs:1182-1195 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/BrimDeck/Native/WindowsHost.cs:318 — src/BrimDeck/Native/WindowsHost.cs:318-329 | src/BrimDeck/Native/WindowsHost.cs:541-551 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/BrimDeck.Core/ClipboardSync/SyncTransport.cs:47 — src/BrimDeck.Core/ClipboardSync/SyncTransport.cs:47-60 | src/BrimDeck.Core/Lyrics.cs:259-269 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×3
  • Edited copy of a member (10 corresponding lines) src/BrimDeck/MainWindow.Shelf.cs:914 — src/BrimDeck/MainWindow.Shelf.cs:914-924 | src/BrimDeck/MainWindow.ShelfViews.cs:157-166 — 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) src/BrimDeck/Native/DesktopSources.cs:54 — src/BrimDeck/Native/DesktopSources.cs:54-63 | src/BrimDeck/Native/MiMoAccount.cs:29-42 — 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) src/BrimDeck.Core/AntigravityUsage.cs:195 — src/BrimDeck.Core/AntigravityUsage.cs:195-204 | src/BrimDeck.Core/ClipboardSync/WeTypeWire.cs:27-38 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 7+ corresponding lines) src/BrimDeck.Core/ScriptProvider.cs:167 — src/BrimDeck.Core/ScriptProvider.cs:167-173 | src/BrimDeck.Core/ScriptProvider.cs:203-209 | src/BrimDeck.Core/ScriptProvider.cs:258-264 — 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.
  • Edited copies of one member (3 members, 7+ corresponding lines) src/BrimDeck/DevicesView.cs:523 — src/BrimDeck/DevicesView.cs:523-529 | src/BrimDeck/MoveOverlay.cs:453-460 | src/BrimDeck/PowerGlyphs.cs:299-305 — 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.
  • Edited copies of one member (3 members, 7+ corresponding lines) src/BrimDeck.Core/DeviceProtocols.cs:307 — src/BrimDeck.Core/DeviceProtocols.cs:307-313 | src/BrimDeck.Core/DeviceProtocols.cs:359-365 | src/BrimDeck.Core/DeviceProtocols.cs:1166-1172 — 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 · Duplicated block (9 lines × 2) · ×3
  • Duplicated block (9 lines × 2) src/BrimDeck/MonitorGauges.cs:386 — src/BrimDeck/MonitorGauges.cs:386-394 | src/BrimDeck/MonitorStrip.cs:400-408 — 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. 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 × 2) src/BrimDeck/Native/HidppEvents.cs:66 — src/BrimDeck/Native/HidppEvents.cs:66-74 | src/BrimDeck/Native/PushEvents.cs:70-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/Native/HidppEvents.cs:66` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) src/BrimDeck/Native/LibcefFile.cs:94 — src/BrimDeck/Native/LibcefFile.cs:94-102 | src/BrimDeck/Native/SensorSetup.cs:138-146 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/Native/LibcefFile.cs:94` 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 (7–8 lines × 2) · ×3
  • Duplicated block (7–8 lines × 2) src/BrimDeck/DevicesPanel.cs:133 — src/BrimDeck/DevicesPanel.cs:133-139 | src/BrimDeck/MonitorPanel.cs:204-211 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7–8 lines × 2) src/BrimDeck/Native/KugouCdpConnection.cs:198 — src/BrimDeck/Native/KugouCdpConnection.cs:198-204 | src/BrimDeck/Native/NeteaseCdpConnection.cs:129-136 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) src/BrimDeck/SettingsProviders.cs:152 — src/BrimDeck/SettingsProviders.cs:152-159 | src/BrimDeck/SettingsWorkBuddy.cs:28-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
AX2 · Stateful singletons · Stateful shared instance · ×2
  • Stateful shared instance: PanelLook src/BrimDeck/PanelTheme.cs:128 — `PanelLook` is not registered, but `PanelTheme` creates it and keeps it in the static `Main`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Generation, Translucent, _chosen, KeptLastGood, ShownTheme, Look; e.g. `Generation` at line 165).
  • Stateful shared instance: DisplayWatch src/BrimDeck.Core/DisplayWatch.cs:9 — `DisplayWatch` is not registered, but `DisplayPower` creates it and keeps it in the static `Watch`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (Off; e.g. `Off` at line 23).
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: DataLocations.cs ↔ Settings.cs src/BrimDeck.Core/DataLocations.cs:1 — `src/BrimDeck.Core/DataLocations.cs` and `src/BrimDeck.Core/Settings.cs` change together 73% of the time (8 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; 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 `999f344c` WorkBuddy AI:新增 WorkBuddy 国际版的配额来源与统计应用; `84041392` CodeAgent:新增配额来源与统计应用; `8121542f` Merge pull request #110 from kongzhuww/feat/pi-support — run `git show` on any of them.
  • Change coupling: MonitorGauges.cs ↔ SettingsMonitor.cs src/BrimDeck/MonitorGauges.cs:1 — `src/BrimDeck/MonitorGauges.cs` and `src/BrimDeck/SettingsMonitor.cs` change together 53% of the time (16 of the 30 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `21986b7e` 流量统计(#286 后续):累计流量改为读取 Windows 的记录,可选统计时长;收起行新增“累计下载”“累计上传”两项读数; `4b8093f4` 监控:Download/Upload 可选显示累计流量,展开页网络块显示累计; `401b0990` 显存读数:设置菜单勾选有效排列;GPU 小块的显存刻度线不再穿过百分比文字 — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) src/BrimDeck.Core/UsageService.cs:825 — src/BrimDeck.Core/UsageService.cs:825-843 | src/BrimDeck.Core/UsageService.cs:1759-1784 — 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) scripts/readme-media/Program.cs:1407 — scripts/readme-media/Program.cs:1407-1425 | scripts/readme-media/Program.cs:1547-1567 — 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 · Edited copy of a member (18 corresponding lines) · ×2
  • Edited copy of a member (18 corresponding lines) src/BrimDeck/SettingsMusic.cs:460 — src/BrimDeck/SettingsMusic.cs:460-477 | src/BrimDeck/SettingsMusic.cs:531-551 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/BrimDeck/MusicVisuals.cs:796 — src/BrimDeck/MusicVisuals.cs:796-813 | src/BrimDeck/MusicVisuals.cs:824-841 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) src/BrimDeck/SettingsMusic.cs:433 — src/BrimDeck/SettingsMusic.cs:433-455 | src/BrimDeck/SettingsMusic.cs:504-527 — 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.
  • Edited copy of a member (23 corresponding lines) src/BrimDeck/Native/Hid.cs:311 — src/BrimDeck/Native/Hid.cs:311-333 | src/BrimDeck/Native/Hid.cs:363-389 — 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 copies of one member (3 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 12+ corresponding lines) src/BrimDeck/SettingsFullscreen.cs:223 — src/BrimDeck/SettingsFullscreen.cs:223-237 | src/BrimDeck/SettingsProfiles.cs:412-423 | src/BrimDeck/SettingsShelf.cs:96-108 — 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) src/BrimDeck/MusicLyricsPreview.cs:47 — src/BrimDeck/MusicLyricsPreview.cs:47-60 | src/BrimDeck/MusicLyricsPreview.cs:64-76 | src/BrimDeck/MusicLyricsPreview.cs:80-91 — 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 (14 corresponding lines) · ×2
  • Edited copy of a member (14 corresponding lines) src/BrimDeck/MainWindow.Lifecycle.cs:150 — src/BrimDeck/MainWindow.Lifecycle.cs:150-163 | src/BrimDeck/MainWindow.Lifecycle.cs:167-180 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/BrimDeck/Native/HidppEvents.cs:25 — src/BrimDeck/Native/HidppEvents.cs:25-38 | src/BrimDeck/Native/PushEvents.cs:27-41 — 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 (4 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 5+ corresponding lines) src/BrimDeck.Core/Brands/AtkOfficial.cs:75 — src/BrimDeck.Core/Brands/AtkOfficial.cs:75-80 | src/BrimDeck.Core/Brands/Aula.cs:34-38 | src/BrimDeck.Core/Brands/MouseShapes.cs:24-28 | src/BrimDeck.Core/Brands/Ryunix.cs:22-26 — 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.
  • Edited copies of one member (4 members, 5+ corresponding lines) src/BrimDeck.Core/Brands/AtkHeadsets.cs:28 — src/BrimDeck.Core/Brands/AtkHeadsets.cs:28-32 | src/BrimDeck.Core/Brands/EightBitDo.cs:25-29 | src/BrimDeck.Core/Brands/Keychron.cs:24-28 | src/BrimDeck.Core/DeviceProtocols.cs:1022-1026 — 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 · Duplicated block (6–7 lines × 2) · ×2
  • Duplicated block (6–7 lines × 2) src/BrimDeck/MainWindow.Lifecycle.cs:153 — src/BrimDeck/MainWindow.Lifecycle.cs:153-159 | src/BrimDeck/MainWindow.Lifecycle.cs:169-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6–7 lines × 2) src/BrimDeck/SettingsAppLists.cs:46 — src/BrimDeck/SettingsAppLists.cs:46-51 | src/BrimDeck/SettingsFullscreen.cs:129-135 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) src/BrimDeck/SettingsReleaseNotes.cs:31 — src/BrimDeck/SettingsReleaseNotes.cs:31-35 | src/BrimDeck/SettingsSyncDialogs.cs:30-34 | src/BrimDeck/SettingsUpdates.cs:59-63 — 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 `src/BrimDeck/SettingsReleaseNotes.cs:31` 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 × 3) src/BrimDeck/SettingsFullscreen.cs:226 — src/BrimDeck/SettingsFullscreen.cs:226-231 | src/BrimDeck/SettingsProfiles.cs:415-419 | src/BrimDeck/SettingsShelf.cs:99-104 — 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 `src/BrimDeck/SettingsFullscreen.cs:226` 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: DeckSettings (LCOM4 7) src/BrimDeck.Core/Settings.cs:328 — DeckSettings's methods fall into 7 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 7 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: DesktopSources (LCOM4 5) src/BrimDeck/Native/DesktopSources.cs:10 — DesktopSources's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
IC1 · Incompleteness & stubs · Both branches are identical · ×2
  • Both branches are identical — the condition decides nothing src/BrimDeck/MainWindow.Shelf.cs:781 — Both arms of `code ? … : …` are `first`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
  • Both branches are identical — the condition decides nothing src/BrimDeck/ResizeGripLayer.cs:273 — Both arms of `vertical ? … : …` are `new Point(0, 0)`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
S1 · Cryptographic Hygiene · Ciphertext is encrypted but not authenticated · ×2
  • Ciphertext is encrypted but not authenticated src/BrimDeck.Core/ClipboardSync/WeTypeObjects.cs:37 — This type encrypts through `SymmetricAlgorithm`, whose every cipher mode (CBC/ECB/OFB/CFB/CTS) is unauthenticated, and no keyed MAC or AEAD cipher appears anywhere in it — so nothing establishes that the ciphertext it produced is the ciphertext it later reads back. Encryption alone provides confidentiality, not integrity: unauthenticated CBC is MALLEABLE, and an attacker who can modify stored or transmitted ciphertext can flip chosen plaintext bits in the following block by flipping ciphertext bits in the preceding one, without ever knowing the key. Where the decrypt path reports failure differently for a padding error than for a downstream one — a broad `catch` that returns null is the usual spelling — the same construction also answers the attacker's questions, which is the padding-oracle shape that recovers plaintext outright. Prefer an AEAD cipher: `AesGcm` or `ChaCha20Poly1305` authenticate the ciphertext as part of encrypting it, and give you an associated-data slot for the surrounding context. Where the format cannot change, MAC it with encrypt-then-MAC — HMAC-SHA256 over the IV and the ciphertext together, with a key derived separately from the encryption key — and verify that tag with `CryptographicOperations.FixedTimeEquals` BEFORE decrypting anything.
  • Ciphertext is encrypted but not authenticated src/BrimDeck.Core/ClipboardSync/WeTypeSyncClient.cs:62 — This type encrypts through `SymmetricAlgorithm`, whose every cipher mode (CBC/ECB/OFB/CFB/CTS) is unauthenticated, and no keyed MAC or AEAD cipher appears anywhere in it — so nothing establishes that the ciphertext it produced is the ciphertext it later reads back. Encryption alone provides confidentiality, not integrity: unauthenticated CBC is MALLEABLE, and an attacker who can modify stored or transmitted ciphertext can flip chosen plaintext bits in the following block by flipping ciphertext bits in the preceding one, without ever knowing the key. Where the decrypt path reports failure differently for a padding error than for a downstream one — a broad `catch` that returns null is the usual spelling — the same construction also answers the attacker's questions, which is the padding-oracle shape that recovers plaintext outright. Prefer an AEAD cipher: `AesGcm` or `ChaCha20Poly1305` authenticate the ciphertext as part of encrypting it, and give you an associated-data slot for the surrounding context. Where the format cannot change, MAC it with encrypt-then-MAC — HMAC-SHA256 over the IV and the ciphertext together, with a key derived separately from the encryption key — and verify that tag with `CryptographicOperations.FixedTimeEquals` BEFORE decrypting anything.
X1 · Async correctness · Blocking `ClipboardSyncService.AcceptImage` inside an `async` method · ×2
  • Blocking `ClipboardSyncService.AcceptImage` inside an `async` method src/BrimDeck/ClipboardSyncService.cs:459 — `ClipboardSyncService.AcceptImage` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
  • Blocking `ClipboardSyncService.AcceptImage` inside an `async` method src/BrimDeck/ClipboardSyncService.Lan.cs:201 — `ClipboardSyncService.AcceptImage` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
X1 · Async correctness · Blocking `ClipboardSyncService.AcceptText` inside an `async` method · ×2
  • Blocking `ClipboardSyncService.AcceptText` inside an `async` method src/BrimDeck/ClipboardSyncService.cs:465 — `ClipboardSyncService.AcceptText` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
  • Blocking `ClipboardSyncService.AcceptText` inside an `async` method src/BrimDeck/ClipboardSyncService.Lan.cs:187 — `ClipboardSyncService.AcceptText` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
X1 · Async correctness · Blocking `File.WriteAllBytes` inside an `async` method · ×2
  • Blocking `File.WriteAllBytes` inside an `async` method scripts/readme-media/Program.cs:1107 — `File.WriteAllBytes` blocks the thread on I/O while `File.WriteAllBytesAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.WriteAllBytes` inside an `async` method scripts/readme-media/Program.cs:1111 — `File.WriteAllBytes` blocks the thread on I/O while `File.WriteAllBytesAsync` exists to wait without one — inside a method that is already `async`, await the twin.
X5 · Nullable reference types · Symbol treated as nullable, then dereferenced unguarded · ×2
  • Symbol treated as nullable, then dereferenced unguarded src/BrimDeck/Native/KugouInstall.cs:44 — This method contradicts itself about `entry`: line 43 writes `entry?.GetValue`, which says `entry` can be null, but line 44 then dereferences it directly as `entry.GetValue` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `entry` truly cannot be null here, the `?.` is misleading. Settle it one way — test `entry` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded src/BrimDeck/Native/NeteaseSource.cs:89 — This method contradicts itself about `entry`: line 88 writes `entry?.GetValue`, which says `entry` can be null, but line 89 then dereferences it directly as `entry.GetValue` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `entry` truly cannot be null here, the `?.` is misleading. Settle it one way — test `entry` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
D1 · Cyclomatic Complexity · MainWindow.RenderMusic (cyclomatic 164) · ×1
  • MainWindow.RenderMusic (cyclomatic 164) src/BrimDeck/MainWindow.Music.cs:448 — MainWindow.RenderMusic has cyclomatic complexity 164 (threshold 15). Of this number, 150 points are the body's own statements and 14 belong to 7 function literals 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 · MainWindow.SetExpanded (cyclomatic 154) · ×1
  • MainWindow.SetExpanded (cyclomatic 154) src/BrimDeck/MainWindow.xaml.cs:829 — MainWindow.SetExpanded has cyclomatic complexity 154 (threshold 15). Of this number, 149 points are the body's own statements and 5 belong to 3 function literals 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 · ExpandedLayout.For (cyclomatic 126) · ×1
  • ExpandedLayout.For (cyclomatic 126) src/BrimDeck.Core/ExpandedLayout.cs:123 — ExpandedLayout.For has cyclomatic complexity 126 (threshold 15). To reduce it, separate the cases: extract each independent 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 · HidBatteries.Scan (cyclomatic 119) · ×1
  • HidBatteries.Scan (cyclomatic 119) src/BrimDeck/Native/HidBatteries.cs:344 — HidBatteries.Scan has cyclomatic complexity 119 (threshold 15). Of this number, 96 points are the body's own statements and 23 belong to 9 function literals 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 · Dongles.Find (cyclomatic 112) · ×1
  • Dongles.Find (cyclomatic 112) src/BrimDeck.Core/DeviceProtocols.cs:1306 — Dongles.Find has cyclomatic complexity 112 (threshold 15). To reduce it, separate the cases: extract each independent 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 · MainWindow.RenderCompactMusic (cyclomatic 92) · ×1
  • MainWindow.RenderCompactMusic (cyclomatic 92) src/BrimDeck/MainWindow.Music.cs:1168 — MainWindow.RenderCompactMusic has cyclomatic complexity 92 (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 · DeckSettings.Normalize (cyclomatic 90) · ×1
  • DeckSettings.Normalize (cyclomatic 90) src/BrimDeck.Core/Settings.cs:874 — DeckSettings.Normalize has cyclomatic complexity 90 (threshold 15). Of this number, 81 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SettingsWindow.SourceDetails (cyclomatic 78) · ×1
  • SettingsWindow.SourceDetails (cyclomatic 78) src/BrimDeck/SettingsProviders.cs:236 — SettingsWindow.SourceDetails has cyclomatic complexity 78 (threshold 15). Of this number, 60 points are the body's own statements and 18 belong to 6 function literals 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 · Pushes.Apply (cyclomatic 76) · ×1
  • Pushes.Apply (cyclomatic 76) src/BrimDeck.Core/DeviceProtocols.cs:1626 — Pushes.Apply has cyclomatic complexity 76 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MainWindow.RenderModels (cyclomatic 76) · ×1
  • MainWindow.RenderModels (cyclomatic 76) src/BrimDeck/ModelDetails.cs:328 — MainWindow.RenderModels has cyclomatic complexity 76 (threshold 15). Of this number, 73 points are the body's own statements and 3 belong to 2 function literals 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 · SystemSampler.Collect (cyclomatic 74) · ×1
  • SystemSampler.Collect (cyclomatic 74) src/BrimDeck/Native/SystemSampler.cs:370 — SystemSampler.Collect has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MonitorView.MonitorView.ctor (cyclomatic 68) · ×1
  • MonitorView.MonitorView.ctor (cyclomatic 68) src/BrimDeck/MonitorView.cs:84 — MonitorView.MonitorView.ctor has cyclomatic complexity 68 (threshold 15). Of this number, 63 points are the body's own statements and 5 belong to 3 function literals 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 · MediaSessions.RefreshAsync (cyclomatic 67) · ×1
  • MediaSessions.RefreshAsync (cyclomatic 67) src/BrimDeck/Native/MediaSessions.cs:322 — MediaSessions.RefreshAsync has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BatteryModel.Build (cyclomatic 61) · ×1
  • BatteryModel.Build (cyclomatic 61) src/BrimDeck.Core/BatteryModel.cs:51 — BatteryModel.Build has cyclomatic complexity 61 (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 · SettingsWindow.HotkeyRow (cyclomatic 59) · ×1
  • SettingsWindow.HotkeyRow (cyclomatic 59) src/BrimDeck/SettingsHotkeys.cs:78 — SettingsWindow.HotkeyRow has cyclomatic complexity 59 (threshold 15). Of this number, 26 points are the body's own statements and 33 belong to 8 function literals 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 · Headsets.Battery (cyclomatic 58) · ×1
  • Headsets.Battery (cyclomatic 58) src/BrimDeck.Core/DeviceProtocols.cs:1863 — Headsets.Battery has cyclomatic complexity 58 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MainWindow.QuotaBlock (cyclomatic 57) · ×1
  • MainWindow.QuotaBlock (cyclomatic 57) src/BrimDeck/UsagePanel.cs:599 — MainWindow.QuotaBlock has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent 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 · NeteaseLog.Parse (cyclomatic 55) · ×1
  • NeteaseLog.Parse (cyclomatic 55) src/BrimDeck.Core/NeteaseLog.cs:47 — NeteaseLog.Parse has cyclomatic complexity 55 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · LanPng.Validate (cyclomatic 54) · ×1
  • LanPng.Validate (cyclomatic 54) src/BrimDeck.Core/ClipboardSync/LanPng.cs:18 — LanPng.Validate has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UsageService.FetchCoreAsync (cyclomatic 54) · ×1
  • UsageService.FetchCoreAsync (cyclomatic 54) src/BrimDeck.Core/UsageService.cs:313 — UsageService.FetchCoreAsync has cyclomatic complexity 54 (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 · MonitorView.Update (cyclomatic 51) · ×1
  • MonitorView.Update (cyclomatic 51) src/BrimDeck/MonitorView.cs:322 — MonitorView.Update has cyclomatic complexity 51 (threshold 15). Of this number, 50 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 · SettingsWindow.ShowPageCore (cyclomatic 51) · ×1
  • SettingsWindow.ShowPageCore (cyclomatic 51) src/BrimDeck/SettingsWindow.cs:313 — SettingsWindow.ShowPageCore has cyclomatic complexity 51 (threshold 15). Of this number, 49 points are the body's own statements and 2 belong to 2 function literals 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 · QqMediaConnection.AcceptCore (cyclomatic 50) · ×1
  • QqMediaConnection.AcceptCore (cyclomatic 50) src/BrimDeck/Native/QqMediaConnection.cs:155 — QqMediaConnection.AcceptCore has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsWindow.RingDetails (cyclomatic 50) · ×1
  • SettingsWindow.RingDetails (cyclomatic 50) src/BrimDeck/SettingsProviders.cs:497 — SettingsWindow.RingDetails has cyclomatic complexity 50 (threshold 15). Of this number, 37 points are the body's own statements and 13 belong to 7 function literals 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 · UsageService.ReadZCodeAsync (cyclomatic 49) · ×1
  • UsageService.ReadZCodeAsync (cyclomatic 49) src/BrimDeck.Core/UsageService.cs:1209 — UsageService.ReadZCodeAsync has cyclomatic complexity 49 (threshold 15). Of this number, 48 points are the body's own statements and 1 belongs 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 · SettingsWindow.CreateUpdateView (cyclomatic 48) · ×1
  • SettingsWindow.CreateUpdateView (cyclomatic 48) src/BrimDeck/SettingsUpdates.cs:86 — SettingsWindow.CreateUpdateView has cyclomatic complexity 48 (threshold 15). Of this number, 45 points are the body's own statements and 3 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 · LyricsService.FindQq (cyclomatic 46) · ×1
  • LyricsService.FindQq (cyclomatic 46) src/BrimDeck.Core/QqLyrics.cs:13 — LyricsService.FindQq has cyclomatic complexity 46 (threshold 15). Of this number, 45 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 · MainWindow.RenderCompactColumn (cyclomatic 44) · ×1
  • MainWindow.RenderCompactColumn (cyclomatic 44) src/BrimDeck/MainWindow.CompactColumn.cs:28 — MainWindow.RenderCompactColumn has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MainWindow.MainWindow.ctor (cyclomatic 43) · ×1
  • MainWindow.MainWindow.ctor (cyclomatic 43) src/BrimDeck/MainWindow.xaml.cs:124 — MainWindow.MainWindow.ctor has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 16 function literals inside it that branch (lines 238, 173, 151, …). 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 · Dongles.MchoseReads (cyclomatic 42) · ×1
  • Dongles.MchoseReads (cyclomatic 42) src/BrimDeck.Core/DeviceProtocols.cs:822 — Dongles.MchoseReads has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 11 of the 42 points are its own statements and the rest belongs to one function literal inside it that branches (line 841). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · FrameRates.Sample (cyclomatic 41) · ×1
  • FrameRates.Sample (cyclomatic 41) src/BrimDeck/Native/FrameRates.cs:122 — FrameRates.Sample has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PowerGlyphs.Battery (cyclomatic 40) · ×1
  • PowerGlyphs.Battery (cyclomatic 40) src/BrimDeck/PowerGlyphs.cs:97 — PowerGlyphs.Battery has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MainWindow.ColumnHeader (cyclomatic 39) · ×1
  • MainWindow.ColumnHeader (cyclomatic 39) src/BrimDeck/MainWindow.Shelf.cs:385 — MainWindow.ColumnHeader has cyclomatic complexity 39 (threshold 15). Of this number, 36 points are the body's own statements and 3 belong to 2 function literals 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 · DeviceRoster.Merge (cyclomatic 38) · ×1
  • DeviceRoster.Merge (cyclomatic 38) src/BrimDeck.Core/Devices.cs:432 — DeviceRoster.Merge has cyclomatic complexity 38 (threshold 15). Of this number, 23 points are the body's own statements and 15 belong to 8 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 · NeteaseLogState.Apply (cyclomatic 37) · ×1
  • NeteaseLogState.Apply (cyclomatic 37) src/BrimDeck.Core/NeteaseLog.cs:170 — NeteaseLogState.Apply has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConfiguredProviders.FetchAsync (cyclomatic 37) · ×1
  • ConfiguredProviders.FetchAsync (cyclomatic 37) src/BrimDeck.Core/ScriptProvider.cs:396 — ConfiguredProviders.FetchAsync has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MainWindow.UpdateMusicPosition (cyclomatic 37) · ×1
  • MainWindow.UpdateMusicPosition (cyclomatic 37) src/BrimDeck/MainWindow.Music.cs:1070 — MainWindow.UpdateMusicPosition has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MainWindow.TrackPointer (cyclomatic 37) · ×1
  • MainWindow.TrackPointer (cyclomatic 37) src/BrimDeck/MainWindow.xaml.cs:1094 — MainWindow.TrackPointer has cyclomatic complexity 37 (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 · MainWindow.PriceBreakdown (cyclomatic 37) · ×1
  • MainWindow.PriceBreakdown (cyclomatic 37) src/BrimDeck/ModelDetails.cs:268 — MainWindow.PriceBreakdown has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function literals 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 · Renderer.ShelfMeasures (cyclomatic 37) · ×1
  • Renderer.ShelfMeasures (cyclomatic 37) scripts/readme-media/Program.cs:1243 — Renderer.ShelfMeasures has cyclomatic complexity 37 (threshold 15). Of this number, 25 points are the body's own statements and 12 belong to 5 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 · LogReader.ParseLine (cyclomatic 36) · ×1
  • LogReader.ParseLine (cyclomatic 36) src/BrimDeck.Core/LogReader.cs:217 — LogReader.ParseLine has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CpuProvider.Sample (cyclomatic 36) · ×1
  • CpuProvider.Sample (cyclomatic 36) src/BrimDeck/Native/CpuProvider.cs:61 — CpuProvider.Sample has cyclomatic complexity 36 (threshold 15). Of this number, 35 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 · AudioTags.ReadId3 (cyclomatic 35) · ×1
  • AudioTags.ReadId3 (cyclomatic 35) src/BrimDeck.Core/AudioTags.cs:95 — AudioTags.ReadId3 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.
D1 · Cyclomatic Complexity · DeviceLists.Adopt (cyclomatic 35) · ×1
  • DeviceLists.Adopt (cyclomatic 35) src/BrimDeck.Core/Devices.cs:95 — DeviceLists.Adopt has cyclomatic complexity 35 (threshold 15). Of this number, 27 points are the body's own statements and 8 belong to 4 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 · UsageService.ReadClaudeUnitAsync (cyclomatic 35) · ×1
  • UsageService.ReadClaudeUnitAsync (cyclomatic 35) src/BrimDeck.Core/UsageService.cs:561 — UsageService.ReadClaudeUnitAsync 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.
D1 · Cyclomatic Complexity · MainWindow.MusicColumns (cyclomatic 35) · ×1
  • MainWindow.MusicColumns (cyclomatic 35) src/BrimDeck/MainWindow.Music.cs:833 — MainWindow.MusicColumns 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.
D1 · Cyclomatic Complexity · SettingsWindow.FiguresMenu (cyclomatic 35) · ×1
  • SettingsWindow.FiguresMenu (cyclomatic 35) src/BrimDeck/SettingsMonitor.cs:496 — SettingsWindow.FiguresMenu has cyclomatic complexity 35 (threshold 15). Of this number, 26 points are the body's own statements and 9 belong to 6 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 · MainWindow.RenderSyncButton (cyclomatic 35) · ×1
  • MainWindow.RenderSyncButton (cyclomatic 35) src/BrimDeck/UsageSynchronization.cs:64 — MainWindow.RenderSyncButton has cyclomatic complexity 35 (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 · HidBatteries.Pass (cyclomatic 34) · ×1
  • HidBatteries.Pass (cyclomatic 34) src/BrimDeck/Native/HidBatteries.cs:243 — HidBatteries.Pass 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.
D1 · Cyclomatic Complexity · LogReader.Read (cyclomatic 33) · ×1
  • LogReader.Read (cyclomatic 33) src/BrimDeck.Core/LogReader.cs:37 — LogReader.Read has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MetricParser.ParseMetric (cyclomatic 33) · ×1
  • MetricParser.ParseMetric (cyclomatic 33) src/BrimDeck.Core/UsageMetric.cs:132 — MetricParser.ParseMetric has cyclomatic complexity 33 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SteelSeriesHeadsets.Battery (cyclomatic 32) · ×1
  • SteelSeriesHeadsets.Battery (cyclomatic 32) src/BrimDeck.Core/Brands/SteelSeriesHeadsets.cs:49 — SteelSeriesHeadsets.Battery has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 7 of the 32 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 58, 60, 51, …). 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 · Dongles.Shadowed (cyclomatic 32) · ×1
  • Dongles.Shadowed (cyclomatic 32) src/BrimDeck.Core/DeviceProtocols.cs:1125 — Dongles.Shadowed has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 8 of the 32 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 1133, 1138, 1128, …). 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 · UsageService.ReadCursorEvents (cyclomatic 32) · ×1
  • UsageService.ReadCursorEvents (cyclomatic 32) src/BrimDeck.Core/UsageService.cs:943 — UsageService.ReadCursorEvents has cyclomatic complexity 32 (threshold 15). Of this number, 27 points are the body's own statements and 5 belong to 3 function literals 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 · MainWindow.UpdateMusicTimer (cyclomatic 32) · ×1
  • MainWindow.UpdateMusicTimer (cyclomatic 32) src/BrimDeck/MainWindow.Music.cs:1413 — MainWindow.UpdateMusicTimer has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MediaSessions.ReadSystemCoreAsync (cyclomatic 32) · ×1
  • MediaSessions.ReadSystemCoreAsync (cyclomatic 32) src/BrimDeck/Native/MediaSessions.cs:585 — MediaSessions.ReadSystemCoreAsync has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowsHost.WatchOrderOnce (cyclomatic 32) · ×1
  • WindowsHost.WatchOrderOnce (cyclomatic 32) src/BrimDeck/Native/WindowsHost.cs:148 — WindowsHost.WatchOrderOnce has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsWindow.ConditionRow (cyclomatic 32) · ×1
  • SettingsWindow.ConditionRow (cyclomatic 32) src/BrimDeck/SettingsShelfRules.cs:206 — SettingsWindow.ConditionRow has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 belong to 6 function literals 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 · ClipboardSyncService.RunAsync (cyclomatic 31) · ×1
  • ClipboardSyncService.RunAsync (cyclomatic 31) src/BrimDeck/ClipboardSyncService.cs:312 — ClipboardSyncService.RunAsync has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ClipboardSyncService.ExchangeLanAsync (cyclomatic 31) · ×1
  • ClipboardSyncService.ExchangeLanAsync (cyclomatic 31) src/BrimDeck/ClipboardSyncService.Lan.cs:135 — ClipboardSyncService.ExchangeLanAsync has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 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 · SettingsWindow.NeteaseSwitch (cyclomatic 31) · ×1
  • SettingsWindow.NeteaseSwitch (cyclomatic 31) src/BrimDeck/SettingsMusic.cs:491 — SettingsWindow.NeteaseSwitch 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.
D1 · Cyclomatic Complexity · SettingsWindow.CreatePriceEditor (cyclomatic 31) · ×1
  • SettingsWindow.CreatePriceEditor (cyclomatic 31) src/BrimDeck/SettingsPricing.cs:116 — SettingsWindow.CreatePriceEditor has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 3 function literals 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 · UsageService.ReadCursorAsync (cyclomatic 30) · ×1
  • UsageService.ReadCursorAsync (cyclomatic 30) src/BrimDeck.Core/UsageService.cs:871 — UsageService.ReadCursorAsync has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MainWindow.LayoutCompactAlert (cyclomatic 30) · ×1
  • MainWindow.LayoutCompactAlert (cyclomatic 30) src/BrimDeck/MainWindow.CompactLayout.cs:71 — MainWindow.LayoutCompactAlert has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SettingsWindow.SketchBlock (cyclomatic 30) · ×1
  • SettingsWindow.SketchBlock (cyclomatic 30) src/BrimDeck/SettingsMonitorExpanded.cs:350 — SettingsWindow.SketchBlock has cyclomatic complexity 30 (threshold 15). Of this number, 19 points are the body's own statements and 11 belong to 5 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 · LyricsService.FindAsync (cyclomatic 29) · ×1
  • LyricsService.FindAsync (cyclomatic 29) src/BrimDeck.Core/Lyrics.cs:163 — LyricsService.FindAsync 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.
D1 · Cyclomatic Complexity · CompactMusicLayout.Calculate (cyclomatic 29) · ×1
  • CompactMusicLayout.Calculate (cyclomatic 29) src/BrimDeck.Core/Music.cs:248 — CompactMusicLayout.Calculate has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ScriptSession.SendAsync (cyclomatic 29) · ×1
  • ScriptSession.SendAsync (cyclomatic 29) src/BrimDeck.Core/ScriptProvider.cs:96 — ScriptSession.SendAsync 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.
D1 · Cyclomatic Complexity · MainWindow.Banded (cyclomatic 29) · ×1
  • MainWindow.Banded (cyclomatic 29) src/BrimDeck/MainWindow.ShelfSelect.cs:92 — MainWindow.Banded has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 120, 145, 106, …). 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 · SettingsWindow.RefreshSyncStatus (cyclomatic 29) · ×1
  • SettingsWindow.RefreshSyncStatus (cyclomatic 29) src/BrimDeck/SettingsClipboardSync.cs:279 — SettingsWindow.RefreshSyncStatus 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.
D1 · Cyclomatic Complexity · SettingsWindow.SketchPair (cyclomatic 29) · ×1
  • SettingsWindow.SketchPair (cyclomatic 29) src/BrimDeck/SettingsMonitorExpanded.cs:152 — SettingsWindow.SketchPair has cyclomatic complexity 29 (threshold 15). Of this number, 25 points are the body's own statements and 4 belong to 3 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 · Renderer.ClipboardSyncScene (cyclomatic 29) · ×1
  • Renderer.ClipboardSyncScene (cyclomatic 29) scripts/readme-media/Program.cs:1397 — Renderer.ClipboardSyncScene 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.
D1 · Cyclomatic Complexity · Headsets.Charging (cyclomatic 28) · ×1
  • Headsets.Charging (cyclomatic 28) src/BrimDeck.Core/DeviceProtocols.cs:1891 — Headsets.Charging has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ClockFace.Layout (cyclomatic 28) · ×1
  • ClockFace.Layout (cyclomatic 28) src/BrimDeck/ClockFace.cs:124 — ClockFace.Layout 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 · MainWindow.Column (cyclomatic 28) · ×1
  • MainWindow.Column (cyclomatic 28) src/BrimDeck/UsagePanel.cs:363 — MainWindow.Column has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to 2 function literals 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 · MainWindow.ClipRowThree (cyclomatic 27) · ×1
  • MainWindow.ClipRowThree (cyclomatic 27) src/BrimDeck/MainWindow.ShelfViews.cs:488 — MainWindow.ClipRowThree 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 · MainWindow.ApplySettings (cyclomatic 27) · ×1
  • MainWindow.ApplySettings (cyclomatic 27) src/BrimDeck/MainWindow.xaml.cs:377 — MainWindow.ApplySettings has cyclomatic complexity 27 (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 · WindowsHost.Detect (cyclomatic 27) · ×1
  • WindowsHost.Detect (cyclomatic 27) src/BrimDeck/Native/WindowsHost.cs:481 — WindowsHost.Detect 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 · PanelLook.Use (cyclomatic 27) · ×1
  • PanelLook.Use (cyclomatic 27) src/BrimDeck/PanelTheme.cs:182 — PanelLook.Use has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CompactSpacing.Share (cyclomatic 26) · ×1
  • CompactSpacing.Share (cyclomatic 26) src/BrimDeck.Core/CompactSpacing.cs:126 — CompactSpacing.Share has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlayStation.Battery (cyclomatic 26) · ×1
  • PlayStation.Battery (cyclomatic 26) src/BrimDeck.Core/DeviceProtocols.cs:1946 — PlayStation.Battery 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.
D1 · Cyclomatic Complexity · MonitorLayout.For (cyclomatic 26) · ×1
  • MonitorLayout.For (cyclomatic 26) src/BrimDeck.Core/MonitorLayout.cs:263 — MonitorLayout.For has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PanelThemes.Build (cyclomatic 26) · ×1
  • PanelThemes.Build (cyclomatic 26) src/BrimDeck.Core/PanelThemes.Build.cs:36 — PanelThemes.Build has cyclomatic complexity 26 (threshold 15). Of this number, 25 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 · PixelStairs.Build (cyclomatic 26) · ×1
  • PixelStairs.Build (cyclomatic 26) src/BrimDeck.Core/PixelStairs.cs:23 — PixelStairs.Build has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · Profiles.Normalize (cyclomatic 26) · ×1
  • Profiles.Normalize (cyclomatic 26) src/BrimDeck.Core/Profiles.cs:244 — Profiles.Normalize has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 belong to 4 function literals 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 · MainWindow.MirrorPointer (cyclomatic 26) · ×1
  • MainWindow.MirrorPointer (cyclomatic 26) src/BrimDeck/MainWindow.xaml.cs:301 — MainWindow.MirrorPointer 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.
D1 · Cyclomatic Complexity · GattBattery.Open (cyclomatic 26) · ×1
  • GattBattery.Open (cyclomatic 26) src/BrimDeck/Native/BluetoothBatteries.cs:272 — GattBattery.Open has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 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 · CorsairReader.Run (cyclomatic 26) · ×1
  • CorsairReader.Run (cyclomatic 26) src/BrimDeck/Native/CorsairReader.cs:48 — CorsairReader.Run has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 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 · DoubaoBrowserLogin.SignInAsync (cyclomatic 26) · ×1
  • DoubaoBrowserLogin.SignInAsync (cyclomatic 26) src/BrimDeck/Native/DoubaoBrowserLogin.cs:18 — DoubaoBrowserLogin.SignInAsync 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.
D1 · Cyclomatic Complexity · HidBatteries.RunNow (cyclomatic 26) · ×1
  • HidBatteries.RunNow (cyclomatic 26) src/BrimDeck/Native/HidBatteries.cs:1086 — HidBatteries.RunNow has cyclomatic complexity 26 (threshold 15). Of this number, 25 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. This is NOT this file's highest cyclomatic complexity: HidBatteries.Dongle (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MonitorBridgeReader.HwInfo (cyclomatic 26) · ×1
  • MonitorBridgeReader.HwInfo (cyclomatic 26) src/BrimDeck/Native/MonitorBridgeReader.cs:59 — MonitorBridgeReader.HwInfo has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SettingsWindow.SizeRow (cyclomatic 26) · ×1
  • SettingsWindow.SizeRow (cyclomatic 26) src/BrimDeck/SettingsCollapsedSize.cs:242 — SettingsWindow.SizeRow has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 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 · SettingsWindow.KugouSwitch (cyclomatic 26) · ×1
  • SettingsWindow.KugouSwitch (cyclomatic 26) src/BrimDeck/SettingsMusic.cs:418 — SettingsWindow.KugouSwitch 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.
D1 · Cyclomatic Complexity · QuotaRing.For (cyclomatic 25) · ×1
  • QuotaRing.For (cyclomatic 25) src/BrimDeck.Core/QuotaRing.cs:39 — QuotaRing.For has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to 5 function literals 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 · UsageService.ReadClaudeAsync (cyclomatic 25) · ×1
  • UsageService.ReadClaudeAsync (cyclomatic 25) src/BrimDeck.Core/UsageService.cs:484 — UsageService.ReadClaudeAsync has cyclomatic complexity 25 (threshold 15). 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: 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 · NeteaseCdpConnection.ReceiveAsync (cyclomatic 25) · ×1
  • NeteaseCdpConnection.ReceiveAsync (cyclomatic 25) src/BrimDeck/Native/NeteaseCdpConnection.cs:122 — NeteaseCdpConnection.ReceiveAsync has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsWindow.ShowWeTypePairingAsync (cyclomatic 25) · ×1
  • SettingsWindow.ShowWeTypePairingAsync (cyclomatic 25) src/BrimDeck/SettingsSyncDialogs.cs:157 — SettingsWindow.ShowWeTypePairingAsync has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · NuPhy.Battery (cyclomatic 24) · ×1
  • NuPhy.Battery (cyclomatic 24) src/BrimDeck.Core/Brands/NuPhy.cs:75 — NuPhy.Battery has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ShelfLayout.For (cyclomatic 24) · ×1
  • ShelfLayout.For (cyclomatic 24) src/BrimDeck.Core/Shelf.cs:530 — ShelfLayout.For 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 · MainWindow.RenderPageSwitch (cyclomatic 24) · ×1
  • MainWindow.RenderPageSwitch (cyclomatic 24) src/BrimDeck/MainWindow.Music.cs:226 — MainWindow.RenderPageSwitch 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 · MainWindow.AttachFileDrag (cyclomatic 24) · ×1
  • MainWindow.AttachFileDrag (cyclomatic 24) src/BrimDeck/MainWindow.Shelf.cs:990 — MainWindow.AttachFileDrag has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 999, 998, 994, …). 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 · MainWindow.ClipBlock (cyclomatic 24) · ×1
  • MainWindow.ClipBlock (cyclomatic 24) src/BrimDeck/MainWindow.ShelfViews.cs:587 — MainWindow.ClipBlock 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 · MonitorStrip.Draw (cyclomatic 24) · ×1
  • MonitorStrip.Draw (cyclomatic 24) src/BrimDeck/MonitorStrip.cs:311 — MonitorStrip.Draw has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MediaSessions.CommandAsync (cyclomatic 24) · ×1
  • MediaSessions.CommandAsync (cyclomatic 24) src/BrimDeck/Native/MediaSessions.cs:701 — MediaSessions.CommandAsync has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to 2 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.
D1 · Cyclomatic Complexity · SettingsWindow.SourceSelector (cyclomatic 24) · ×1
  • SettingsWindow.SourceSelector (cyclomatic 24) src/BrimDeck/SettingsWindow.cs:901 — SettingsWindow.SourceSelector has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to 3 function literals 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 · MainWindow.RenderUsage (cyclomatic 24) · ×1
  • MainWindow.RenderUsage (cyclomatic 24) src/BrimDeck/UsagePanel.cs:170 — MainWindow.RenderUsage 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 · WeTypeWire.Unsnappy (cyclomatic 23) · ×1
  • WeTypeWire.Unsnappy (cyclomatic 23) src/BrimDeck.Core/ClipboardSync/WeTypeWire.cs:68 — WeTypeWire.Unsnappy 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 · DshSessions.Read (cyclomatic 23) · ×1
  • DshSessions.Read (cyclomatic 23) src/BrimDeck.Core/DshSessions.cs:43 — DshSessions.Read has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · DshSessions.FrameLength (cyclomatic 23) · ×1
  • DshSessions.FrameLength (cyclomatic 23) src/BrimDeck.Core/DshSessions.cs:199 — DshSessions.FrameLength 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 · KimiSessions.Read (cyclomatic 23) · ×1
  • KimiSessions.Read (cyclomatic 23) src/BrimDeck.Core/KimiSessions.cs:39 — KimiSessions.Read has cyclomatic complexity 23 (threshold 15). Of this number, 22 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 · MediaRouting.PreferSystem (cyclomatic 23) · ×1
  • MediaRouting.PreferSystem (cyclomatic 23) src/BrimDeck.Core/MediaRouting.cs:61 — MediaRouting.PreferSystem has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PanelThemes.Renamed (cyclomatic 23) · ×1
  • PanelThemes.Renamed (cyclomatic 23) src/BrimDeck.Core/PanelThemes.Rename.cs:11 — PanelThemes.Renamed 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 · Pricing.Pricing.ctor (cyclomatic 23) · ×1
  • Pricing.Pricing.ctor (cyclomatic 23) src/BrimDeck.Core/Pricing.cs:65 — Pricing.Pricing.ctor has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 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 · MainWindow.UpdateMonitorDemand (cyclomatic 23) · ×1
  • MainWindow.UpdateMonitorDemand (cyclomatic 23) src/BrimDeck/MonitorPanel.cs:37 — MainWindow.UpdateMonitorDemand has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AudioLevelMeter.Run (cyclomatic 23) · ×1
  • AudioLevelMeter.Run (cyclomatic 23) src/BrimDeck/Native/AudioLevelMeter.cs:75 — AudioLevelMeter.Run 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 · HidBatteries.F83 (cyclomatic 23) · ×1
  • HidBatteries.F83 (cyclomatic 23) src/BrimDeck/Native/HidBatteries.cs:1269 — HidBatteries.F83 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. This is NOT this file's highest cyclomatic complexity: HidBatteries.Dongle (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · NeteaseSource.RefreshAsync (cyclomatic 23) · ×1
  • NeteaseSource.RefreshAsync (cyclomatic 23) src/BrimDeck/Native/NeteaseSource.cs:179 — NeteaseSource.RefreshAsync 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 · SettingsWindow.ThemeDetails (cyclomatic 23) · ×1
  • SettingsWindow.ThemeDetails (cyclomatic 23) src/BrimDeck/SettingsThemes.cs:124 — SettingsWindow.ThemeDetails has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 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 · LanClipboardLink.RunOnCurrentNetworkAsync (cyclomatic 22) · ×1
  • LanClipboardLink.RunOnCurrentNetworkAsync (cyclomatic 22) src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:60 — LanClipboardLink.RunOnCurrentNetworkAsync has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · Asus.Reply (cyclomatic 22) · ×1
  • Asus.Reply (cyclomatic 22) src/BrimDeck.Core/DeviceProtocols.cs:1433 — Asus.Reply has cyclomatic complexity 22 (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 · LyricsService.Get (cyclomatic 22) · ×1
  • LyricsService.Get (cyclomatic 22) src/BrimDeck.Core/Lyrics.cs:211 — LyricsService.Get 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 · MainWindow.ShowModelPopup (cyclomatic 22) · ×1
  • MainWindow.ShowModelPopup (cyclomatic 22) src/BrimDeck/ModelDetails.cs:200 — MainWindow.ShowModelPopup has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 223, 237, 236, …). 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 · NeteaseCdpConnection.ConnectAsync (cyclomatic 22) · ×1
  • NeteaseCdpConnection.ConnectAsync (cyclomatic 22) src/BrimDeck/Native/NeteaseCdpConnection.cs:67 — NeteaseCdpConnection.ConnectAsync 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 · SystemSampler.Run (cyclomatic 22) · ×1
  • SystemSampler.Run (cyclomatic 22) src/BrimDeck/Native/SystemSampler.cs:213 — SystemSampler.Run has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsWindow.AttachDrag (cyclomatic 22) · ×1
  • SettingsWindow.AttachDrag (cyclomatic 22) src/BrimDeck/SettingsApplications.cs:134 — SettingsWindow.AttachDrag has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 170, 166, 176, …). 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 · SettingsWindow.RuleRow (cyclomatic 22) · ×1
  • SettingsWindow.RuleRow (cyclomatic 22) src/BrimDeck/SettingsProfiles.cs:310 — SettingsWindow.RuleRow has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 4 function literals 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 · RazerHeadsets.Takes (cyclomatic 21) · ×1
  • RazerHeadsets.Takes (cyclomatic 21) src/BrimDeck.Core/Brands/RazerHeadsets.cs:142 — RazerHeadsets.Takes has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Dongles.F83Battery (cyclomatic 21) · ×1
  • Dongles.F83Battery (cyclomatic 21) src/BrimDeck.Core/DeviceProtocols.cs:717 — Dongles.F83Battery 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 · Pricing.FromReported (cyclomatic 21) · ×1
  • Pricing.FromReported (cyclomatic 21) src/BrimDeck.Core/Pricing.cs:461 — Pricing.FromReported has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · LyricsService.Unescape (cyclomatic 21) · ×1
  • LyricsService.Unescape (cyclomatic 21) src/BrimDeck.Core/QueMusicLyrics.cs:111 — LyricsService.Unescape has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MainWindow.ApplyMediaUpdate (cyclomatic 21) · ×1
  • MainWindow.ApplyMediaUpdate (cyclomatic 21) src/BrimDeck/MainWindow.Music.cs:261 — MainWindow.ApplyMediaUpdate has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MainWindow.TickMusic (cyclomatic 21) · ×1
  • MainWindow.TickMusic (cyclomatic 21) src/BrimDeck/MainWindow.Music.cs:1471 — MainWindow.TickMusic 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 · MainWindow.RenderShelf (cyclomatic 21) · ×1
  • MainWindow.RenderShelf (cyclomatic 21) src/BrimDeck/MainWindow.Shelf.cs:178 — MainWindow.RenderShelf 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 · MainWindow.FileRow (cyclomatic 21) · ×1
  • MainWindow.FileRow (cyclomatic 21) src/BrimDeck/MainWindow.Shelf.cs:810 — MainWindow.FileRow has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 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 · MainWindow.AttachRow (cyclomatic 21) · ×1
  • MainWindow.AttachRow (cyclomatic 21) src/BrimDeck/MainWindow.Shelf.cs:953 — MainWindow.AttachRow has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 979, 960, 963, …). 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 · MainWindow.PlaceDeck (cyclomatic 21) · ×1
  • MainWindow.PlaceDeck (cyclomatic 21) src/BrimDeck/MainWindow.ShelfArrange.cs:491 — MainWindow.PlaceDeck 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 · MainWindow.CheckSourceMenuPointer (cyclomatic 21) · ×1
  • MainWindow.CheckSourceMenuPointer (cyclomatic 21) src/BrimDeck/MainWindow.SourceMenu.cs:107 — MainWindow.CheckSourceMenuPointer 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 · LogitechReader.ReadOne (cyclomatic 21) · ×1
  • LogitechReader.ReadOne (cyclomatic 21) src/BrimDeck/Native/HidBatteries.cs:1590 — LogitechReader.ReadOne has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: HidBatteries.Dongle (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MediaSessions.SeekAsync (cyclomatic 21) · ×1
  • MediaSessions.SeekAsync (cyclomatic 21) src/BrimDeck/Native/MediaSessions.cs:760 — MediaSessions.SeekAsync has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body's own statements and 7 belong to 3 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.
D1 · Cyclomatic Complexity · PowerProvider.Sample (cyclomatic 21) · ×1
  • PowerProvider.Sample (cyclomatic 21) src/BrimDeck/Native/PowerSensors.cs:62 — PowerProvider.Sample has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WindowsHost.TopmostCover (cyclomatic 21) · ×1
  • WindowsHost.TopmostCover (cyclomatic 21) src/BrimDeck/Native/WindowsHost.cs:219 — WindowsHost.TopmostCover 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 · SettingsWindow.DeviceRow (cyclomatic 21) · ×1
  • SettingsWindow.DeviceRow (cyclomatic 21) src/BrimDeck/SettingsDevices.cs:170 — SettingsWindow.DeviceRow has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 4 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 · SettingsWindow.DisplayProfiles (cyclomatic 21) · ×1
  • SettingsWindow.DisplayProfiles (cyclomatic 21) src/BrimDeck/SettingsProfiles.cs:200 — SettingsWindow.DisplayProfiles has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 4 function literals 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 · MainWindow.Fit (cyclomatic 21) · ×1
  • MainWindow.Fit (cyclomatic 21) src/BrimDeck/UsagePanel.cs:98 — MainWindow.Fit 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 · LyricsService.FindApple (cyclomatic 20) · ×1
  • LyricsService.FindApple (cyclomatic 20) src/BrimDeck.Core/AppleMusicLyrics.cs:33 — LyricsService.FindApple has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 3 function literals 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 · SonyInzone.Battery (cyclomatic 20) · ×1
  • SonyInzone.Battery (cyclomatic 20) src/BrimDeck.Core/Brands/SonyInzone.cs:29 — SonyInzone.Battery has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ThunderobotMice.Battery (cyclomatic 20) · ×1
  • ThunderobotMice.Battery (cyclomatic 20) src/BrimDeck.Core/Brands/Thunderobot.cs:16 — ThunderobotMice.Battery 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 · CommandCodeUsage.ReadPrices (cyclomatic 20) · ×1
  • CommandCodeUsage.ReadPrices (cyclomatic 20) src/BrimDeck.Core/CommandCodeUsage.cs:42 — CommandCodeUsage.ReadPrices has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 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 · CompactSpacing.ShareFlowing (cyclomatic 20) · ×1
  • CompactSpacing.ShareFlowing (cyclomatic 20) src/BrimDeck.Core/CompactSpacing.cs:160 — CompactSpacing.ShareFlowing has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Pushes.Find (cyclomatic 20) · ×1
  • Pushes.Find (cyclomatic 20) src/BrimDeck.Core/DeviceProtocols.cs:1603 — Pushes.Find 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 · CompactMusicLayout.Natural (cyclomatic 20) · ×1
  • CompactMusicLayout.Natural (cyclomatic 20) src/BrimDeck.Core/Music.cs:211 — CompactMusicLayout.Natural has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PanelThemes.FileProblem (cyclomatic 20) · ×1
  • PanelThemes.FileProblem (cyclomatic 20) src/BrimDeck.Core/PanelThemes.Files.cs:78 — PanelThemes.FileProblem has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · App.UpdateSettings (cyclomatic 20) · ×1
  • App.UpdateSettings (cyclomatic 20) src/BrimDeck/App.xaml.cs:243 — App.UpdateSettings has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: App.UpdateMonitorExtras (cyclomatic 28) 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 method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MainWindow.UpdateLyrics (cyclomatic 20) · ×1
  • MainWindow.UpdateLyrics (cyclomatic 20) src/BrimDeck/MainWindow.Music.cs:308 — MainWindow.UpdateLyrics 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 · MainWindow.DeckCardFor (cyclomatic 20) · ×1
  • MainWindow.DeckCardFor (cyclomatic 20) src/BrimDeck/MainWindow.ShelfArrange.cs:302 — MainWindow.DeckCardFor has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GamingBatteries.Read (cyclomatic 20) · ×1
  • GamingBatteries.Read (cyclomatic 20) src/BrimDeck/Native/GamingBatteries.cs:56 — GamingBatteries.Read 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 · KugouCdpConnection.ConnectAsync (cyclomatic 20) · ×1
  • KugouCdpConnection.ConnectAsync (cyclomatic 20) src/BrimDeck/Native/KugouCdpConnection.cs:120 — KugouCdpConnection.ConnectAsync has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 2 function literals 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 · NeteaseCdpConnection.ParseSnapshot (cyclomatic 20) · ×1
  • NeteaseCdpConnection.ParseSnapshot (cyclomatic 20) src/BrimDeck/Native/NeteaseCdpConnection.cs:193 — NeteaseCdpConnection.ParseSnapshot has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · SettingsWindow.AddSyncCard (cyclomatic 20) · ×1
  • SettingsWindow.AddSyncCard (cyclomatic 20) src/BrimDeck/SettingsClipboardSync.cs:70 — SettingsWindow.AddSyncCard has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 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 · SettingsWindow.PartRow (cyclomatic 20) · ×1
  • SettingsWindow.PartRow (cyclomatic 20) src/BrimDeck/SettingsMusic.cs:78 — SettingsWindow.PartRow has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 93). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · SettingsWindow.SensorsSettings (cyclomatic 20) · ×1
  • SettingsWindow.SensorsSettings (cyclomatic 20) src/BrimDeck/SettingsSensors.cs:23 — SettingsWindow.SensorsSettings has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 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 · SettingsWindow.OpenLanPairingAsync (cyclomatic 20) · ×1
  • SettingsWindow.OpenLanPairingAsync (cyclomatic 20) src/BrimDeck/SettingsSyncDialogs.cs:382 — SettingsWindow.OpenLanPairingAsync has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · Renderer.RunAsync (cyclomatic 20) · ×1
  • Renderer.RunAsync (cyclomatic 20) scripts/readme-media/Program.cs:97 — Renderer.RunAsync has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CursorPrices.Update (cyclomatic 19) · ×1
  • CursorPrices.Update (cyclomatic 19) src/BrimDeck.Core/CursorPrices.cs:90 — CursorPrices.Update has cyclomatic complexity 19 (threshold 15). Of this number, 18 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 · EdgeFrame.For (cyclomatic 19) · ×1
  • EdgeFrame.For (cyclomatic 19) src/BrimDeck.Core/EdgeFrame.cs:19 — EdgeFrame.For has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PanelThemes.LoadFolder (cyclomatic 19) · ×1
  • PanelThemes.LoadFolder (cyclomatic 19) src/BrimDeck.Core/PanelThemes.Files.cs:17 — PanelThemes.LoadFolder has cyclomatic complexity 19 (threshold 15). Of this number, 18 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 · UsageLastSeen.Slim (cyclomatic 19) · ×1
  • UsageLastSeen.Slim (cyclomatic 19) src/BrimDeck.Core/UsageLastSeen.cs:192 — UsageLastSeen.Slim has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 function literals 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 · UsageService.ReadCursorBillingDays (cyclomatic 19) · ×1
  • UsageService.ReadCursorBillingDays (cyclomatic 19) src/BrimDeck.Core/UsageService.cs:1037 — UsageService.ReadCursorBillingDays 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 · UsageService.ReadKimiAsync (cyclomatic 19) · ×1
  • UsageService.ReadKimiAsync (cyclomatic 19) src/BrimDeck.Core/UsageService.cs:1655 — UsageService.ReadKimiAsync 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 · App.ReleaseUnused (cyclomatic 19) · ×1
  • App.ReleaseUnused (cyclomatic 19) src/BrimDeck/App.Memory.cs:112 — App.ReleaseUnused 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 · DevicesView.Update (cyclomatic 19) · ×1
  • DevicesView.Update (cyclomatic 19) src/BrimDeck/DevicesView.cs:70 — DevicesView.Update has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MainWindow.PointerChanged (cyclomatic 19) · ×1
  • MainWindow.PointerChanged (cyclomatic 19) src/BrimDeck/MainWindow.xaml.cs:1153 — MainWindow.PointerChanged 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 · FigureGauge.OnRender (cyclomatic 19) · ×1
  • FigureGauge.OnRender (cyclomatic 19) src/BrimDeck/MonitorGauges.cs:197 — FigureGauge.OnRender has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MainWindow.RenderMonitor (cyclomatic 19) · ×1
  • MainWindow.RenderMonitor (cyclomatic 19) src/BrimDeck/MonitorPanel.cs:198 — MainWindow.RenderMonitor has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MonitorStrip.MonitorStrip.ctor (cyclomatic 19) · ×1
  • MonitorStrip.MonitorStrip.ctor (cyclomatic 19) src/BrimDeck/MonitorStrip.cs:59 — MonitorStrip.MonitorStrip.ctor has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 3 function literals 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 · MonitorStrip.Figures (cyclomatic 19) · ×1
  • MonitorStrip.Figures (cyclomatic 19) src/BrimDeck/MonitorStrip.cs:436 — MonitorStrip.Figures 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 · GattBattery.PollAsync (cyclomatic 19) · ×1
  • GattBattery.PollAsync (cyclomatic 19) src/BrimDeck/Native/BluetoothBatteries.cs:380 — GattBattery.PollAsync has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · StorageReader.Read (cyclomatic 19) · ×1
  • StorageReader.Read (cyclomatic 19) src/BrimDeck/Native/StorageReader.cs:81 — StorageReader.Read has cyclomatic complexity 19 (threshold 15). Of this number, 18 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 · GpuTemperatures.ReadFor (cyclomatic 19) · ×1
  • GpuTemperatures.ReadFor (cyclomatic 19) src/BrimDeck/Native/TemperatureSensors.cs:88 — GpuTemperatures.ReadFor has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PopupMotion.Prepare (cyclomatic 19) · ×1
  • PopupMotion.Prepare (cyclomatic 19) src/BrimDeck/PopupMotion.cs:63 — PopupMotion.Prepare has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 66, 83, 102, …). 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 · SettingsWindow.CategoryOptions (cyclomatic 19) · ×1
  • SettingsWindow.CategoryOptions (cyclomatic 19) src/BrimDeck/SettingsShelfRules.cs:131 — SettingsWindow.CategoryOptions has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function literals 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 · SettingsWindow.General (cyclomatic 19) · ×1
  • SettingsWindow.General (cyclomatic 19) src/BrimDeck/SettingsWindow.cs:390 — SettingsWindow.General has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 442, 452, 418, …). 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. This is NOT this file's highest cyclomatic complexity: SettingsWindow.NavigationIcon (cyclomatic 20) 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 method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SettingsWindow.WorkBuddyDetails (cyclomatic 19) · ×1
  • SettingsWindow.WorkBuddyDetails (cyclomatic 19) src/BrimDeck/SettingsWorkBuddy.cs:19 — SettingsWindow.WorkBuddyDetails has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 59, Open, a function literal at line 77). 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 · DoubaoSyncClient.ReadText (cyclomatic 18) · ×1
  • DoubaoSyncClient.ReadText (cyclomatic 18) src/BrimDeck.Core/ClipboardSync/DoubaoSyncClient.cs:240 — DoubaoSyncClient.ReadText has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Devices.Kind (cyclomatic 18) · ×1
  • Devices.Kind (cyclomatic 18) src/BrimDeck.Core/Devices.cs:242 — Devices.Kind 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 · MediaSeekPreview.Observe (cyclomatic 18) · ×1
  • MediaSeekPreview.Observe (cyclomatic 18) src/BrimDeck.Core/MediaSeekPreview.cs:20 — MediaSeekPreview.Observe has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SettingsMigrations.To1_3_0 (cyclomatic 18) · ×1
  • SettingsMigrations.To1_3_0 (cyclomatic 18) src/BrimDeck.Core/SettingsMigrations.cs:89 — SettingsMigrations.To1_3_0 has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 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 · StripAdmission.Update (cyclomatic 18) · ×1
  • StripAdmission.Update (cyclomatic 18) src/BrimDeck.Core/StripPresence.cs:112 — StripAdmission.Update has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ZCodeUsage.ReadAccount (cyclomatic 18) · ×1
  • ZCodeUsage.ReadAccount (cyclomatic 18) src/BrimDeck.Core/ZCodeUsage.cs:31 — ZCodeUsage.ReadAccount has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MainWindow.ClipRow (cyclomatic 18) · ×1
  • MainWindow.ClipRow (cyclomatic 18) src/BrimDeck/MainWindow.Shelf.cs:688 — MainWindow.ClipRow 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 · MainWindow.FileTile (cyclomatic 18) · ×1
  • MainWindow.FileTile (cyclomatic 18) src/BrimDeck/MainWindow.ShelfViews.cs:185 — MainWindow.FileTile has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 3 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 · MainWindow.CheckPointerExit (cyclomatic 18) · ×1
  • MainWindow.CheckPointerExit (cyclomatic 18) src/BrimDeck/MainWindow.xaml.cs:1180 — MainWindow.CheckPointerExit has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BlockGauge.OnRender (cyclomatic 18) · ×1
  • BlockGauge.OnRender (cyclomatic 18) src/BrimDeck/MonitorGauges.cs:546 — BlockGauge.OnRender has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 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 · WindowsHost.BackgroundFilled (cyclomatic 18) · ×1
  • WindowsHost.BackgroundFilled (cyclomatic 18) src/BrimDeck/Native/WindowsHost.cs:557 — WindowsHost.BackgroundFilled has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 562). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · SettingsWindow.ReadingRow (cyclomatic 18) · ×1
  • SettingsWindow.ReadingRow (cyclomatic 18) src/BrimDeck/SettingsMonitor.cs:408 — SettingsWindow.ReadingRow has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MainWindow.Segmented (cyclomatic 18) · ×1
  • MainWindow.Segmented (cyclomatic 18) src/BrimDeck/UsagePanel.cs:244 — MainWindow.Segmented has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 270, 253). 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 · AudioTags.Read (cyclomatic 17) · ×1
  • AudioTags.Read (cyclomatic 17) src/BrimDeck.Core/AudioTags.cs:23 — AudioTags.Read has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MetapandaMice.Status (cyclomatic 17) · ×1
  • MetapandaMice.Status (cyclomatic 17) src/BrimDeck.Core/Brands/Metapanda.cs:29 — MetapandaMice.Status has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PairingHost.AcceptAsync (cyclomatic 17) · ×1
  • PairingHost.AcceptAsync (cyclomatic 17) src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:93 — PairingHost.AcceptAsync has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · LanPairingHandshake.ConfirmAsync (cyclomatic 17) · ×1
  • LanPairingHandshake.ConfirmAsync (cyclomatic 17) src/BrimDeck.Core/ClipboardSync/LanPairingHandshake.cs:26 — LanPairingHandshake.ConfirmAsync has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CompactSpacing.Arrange (cyclomatic 17) · ×1
  • CompactSpacing.Arrange (cyclomatic 17) src/BrimDeck.Core/CompactSpacing.cs:31 — CompactSpacing.Arrange has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CursorPrices.Use (cyclomatic 17) · ×1
  • CursorPrices.Use (cyclomatic 17) src/BrimDeck.Core/CursorPrices.cs:56 — CursorPrices.Use has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 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.
D1 · Cyclomatic Complexity · ExpandedLayout.PlaceMetrics (cyclomatic 17) · ×1
  • ExpandedLayout.PlaceMetrics (cyclomatic 17) src/BrimDeck.Core/ExpandedLayout.cs:351 — ExpandedLayout.PlaceMetrics has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GpuReadings.Samples (cyclomatic 17) · ×1
  • GpuReadings.Samples (cyclomatic 17) src/BrimDeck.Core/GpuAdapters.cs:152 — GpuReadings.Samples has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 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 · LyricsService.FindKugou (cyclomatic 17) · ×1
  • LyricsService.FindKugou (cyclomatic 17) src/BrimDeck.Core/KugouLyrics.cs:11 — LyricsService.FindKugou has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QuotaParser.Codex (cyclomatic 17) · ×1
  • QuotaParser.Codex (cyclomatic 17) src/BrimDeck.Core/LogReader.cs:308 — QuotaParser.Codex has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Pricing.RebuildLookup (cyclomatic 17) · ×1
  • Pricing.RebuildLookup (cyclomatic 17) src/BrimDeck.Core/Pricing.cs:329 — Pricing.RebuildLookup has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ResizeGrips.Panel (cyclomatic 17) · ×1
  • ResizeGrips.Panel (cyclomatic 17) src/BrimDeck.Core/ResizeGrips.cs:16 — ResizeGrips.Panel has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UsageService.ParseCursorBillingItem (cyclomatic 17) · ×1
  • UsageService.ParseCursorBillingItem (cyclomatic 17) src/BrimDeck.Core/UsageService.cs:1140 — UsageService.ParseCursorBillingItem has cyclomatic complexity 17 (threshold 15). Of this number, 16 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 · DevicesView.OnRender (cyclomatic 17) · ×1
  • DevicesView.OnRender (cyclomatic 17) src/BrimDeck/DevicesView.cs:195 — DevicesView.OnRender has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MainWindow.SlideCompactRow (cyclomatic 17) · ×1
  • MainWindow.SlideCompactRow (cyclomatic 17) src/BrimDeck/MainWindow.Music.cs:1341 — MainWindow.SlideCompactRow has cyclomatic complexity 17 (threshold 15). Of this number, 16 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 · MainWindow.GripMove (cyclomatic 17) · ×1
  • MainWindow.GripMove (cyclomatic 17) src/BrimDeck/MainWindow.Resize.cs:159 — MainWindow.GripMove has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MainWindow.WireDeckHit (cyclomatic 17) · ×1
  • MainWindow.WireDeckHit (cyclomatic 17) src/BrimDeck/MainWindow.ShelfArrange.cs:378 — MainWindow.WireDeckHit has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 392, 384, 406, …). 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 · ModelDatePicker.Refresh (cyclomatic 17) · ×1
  • ModelDatePicker.Refresh (cyclomatic 17) src/BrimDeck/ModelDatePicker.cs:352 — ModelDatePicker.Refresh has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MonitorStrip.Drives (cyclomatic 17) · ×1
  • MonitorStrip.Drives (cyclomatic 17) src/BrimDeck/MonitorStrip.cs:491 — MonitorStrip.Drives has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MonitorStrip.Spoken (cyclomatic 17) · ×1
  • MonitorStrip.Spoken (cyclomatic 17) src/BrimDeck/MonitorStrip.cs:573 — MonitorStrip.Spoken has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MusicVisuals.Accent (cyclomatic 17) · ×1
  • MusicVisuals.Accent (cyclomatic 17) src/BrimDeck/MusicVisuals.cs:50 — MusicVisuals.Accent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MusicMarquee.Draw (cyclomatic 17) · ×1
  • MusicMarquee.Draw (cyclomatic 17) src/BrimDeck/MusicVisuals.cs:482 — MusicMarquee.Draw has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BluetoothBatteries.Publish (cyclomatic 17) · ×1
  • BluetoothBatteries.Publish (cyclomatic 17) src/BrimDeck/Native/BluetoothBatteries.cs:202 — BluetoothBatteries.Publish has cyclomatic complexity 17 (threshold 15). Of this number, 16 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 · HidBatteries.ReadHeadset (cyclomatic 17) · ×1
  • HidBatteries.ReadHeadset (cyclomatic 17) src/BrimDeck/Native/HidBatteries.cs:722 — HidBatteries.ReadHeadset has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: HidBatteries.Dongle (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · HidBatteries.Family (cyclomatic 17) · ×1
  • HidBatteries.Family (cyclomatic 17) src/BrimDeck/Native/HidBatteries.cs:961 — HidBatteries.Family has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: HidBatteries.Dongle (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KugouCdpConnection.EvaluateAsync (cyclomatic 17) · ×1
  • KugouCdpConnection.EvaluateAsync (cyclomatic 17) src/BrimDeck/Native/KugouCdpConnection.cs:179 — KugouCdpConnection.EvaluateAsync has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KugouCdpConnection.ParseSnapshot (cyclomatic 17) · ×1
  • KugouCdpConnection.ParseSnapshot (cyclomatic 17) src/BrimDeck/Native/KugouCdpConnection.cs:217 — KugouCdpConnection.ParseSnapshot has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MediaSessions.CheckKugouInstall (cyclomatic 17) · ×1
  • MediaSessions.CheckKugouInstall (cyclomatic 17) src/BrimDeck/Native/MediaSessions.cs:148 — MediaSessions.CheckKugouInstall has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 158, 153). 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. This is NOT this file's highest cyclomatic complexity: MediaSessions.SystemCommandAsync (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MediaSessions.BuildRoutes (cyclomatic 17) · ×1
  • MediaSessions.BuildRoutes (cyclomatic 17) src/BrimDeck/Native/MediaSessions.cs:491 — MediaSessions.BuildRoutes has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: MediaSessions.SystemCommandAsync (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MediaSessions.ReadCoverAsync (cyclomatic 17) · ×1
  • MediaSessions.ReadCoverAsync (cyclomatic 17) src/BrimDeck/Native/MediaSessions.cs:518 — MediaSessions.ReadCoverAsync 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. This is NOT this file's highest cyclomatic complexity: MediaSessions.SystemCommandAsync (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · NeteaseLogReader.ReadAsync (cyclomatic 17) · ×1
  • NeteaseLogReader.ReadAsync (cyclomatic 17) src/BrimDeck/Native/NeteaseLogReader.cs:94 — NeteaseLogReader.ReadAsync has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PushEvents.Run (cyclomatic 17) · ×1
  • PushEvents.Run (cyclomatic 17) src/BrimDeck/Native/PushEvents.cs:51 — PushEvents.Run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TaskbarMirror.Hover (cyclomatic 17) · ×1
  • TaskbarMirror.Hover (cyclomatic 17) src/BrimDeck/Native/TaskbarMirror.cs:314 — TaskbarMirror.Hover has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SettingsWindow.ExceptionsContent (cyclomatic 17) · ×1
  • SettingsWindow.ExceptionsContent (cyclomatic 17) src/BrimDeck/SettingsFullscreen.cs:69 — SettingsWindow.ExceptionsContent has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SettingsWindow.ProfileRow (cyclomatic 17) · ×1
  • SettingsWindow.ProfileRow (cyclomatic 17) src/BrimDeck/SettingsProfiles.cs:89 — SettingsWindow.ProfileRow has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 3 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 · SyncCodeBox.OnKeyDown (cyclomatic 17) · ×1
  • SyncCodeBox.OnKeyDown (cyclomatic 17) src/BrimDeck/SyncCodeBox.cs:54 — SyncCodeBox.OnKeyDown has cyclomatic complexity 17 (threshold 15). Of this number, 16 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 · AntigravityUsage.Read (cyclomatic 16) · ×1
  • AntigravityUsage.Read (cyclomatic 16) src/BrimDeck.Core/AntigravityUsage.cs:51 — AntigravityUsage.Read has cyclomatic complexity 16 (threshold 15). Of this number, 15 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 · DoubaoSyncClient.ReadImage (cyclomatic 16) · ×1
  • DoubaoSyncClient.ReadImage (cyclomatic 16) src/BrimDeck.Core/ClipboardSync/DoubaoSyncClient.cs:213 — DoubaoSyncClient.ReadImage 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 · LanDiscovery.ReplyAsync (cyclomatic 16) · ×1
  • LanDiscovery.ReplyAsync (cyclomatic 16) src/BrimDeck.Core/ClipboardSync/LanDiscovery.cs:102 — LanDiscovery.ReplyAsync has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · WeTypeSyncClient.GroupAsync (cyclomatic 16) · ×1
  • WeTypeSyncClient.GroupAsync (cyclomatic 16) src/BrimDeck.Core/ClipboardSync/WeTypeSyncClient.cs:176 — WeTypeSyncClient.GroupAsync has cyclomatic complexity 16 (threshold 15). Of this number, 14 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 · Corsair.Value (cyclomatic 16) · ×1
  • Corsair.Value (cyclomatic 16) src/BrimDeck.Core/DeviceProtocols.cs:1759 — Corsair.Value has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PanelThemes.Derive (cyclomatic 16) · ×1
  • PanelThemes.Derive (cyclomatic 16) src/BrimDeck.Core/PanelThemes.Derive.cs:35 — PanelThemes.Derive 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 · PanelThemes.ClockProblem (cyclomatic 16) · ×1
  • PanelThemes.ClockProblem (cyclomatic 16) src/BrimDeck.Core/PanelThemes.Files.cs:124 — PanelThemes.ClockProblem has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PanelThemes.AppendNight (cyclomatic 16) · ×1
  • PanelThemes.AppendNight (cyclomatic 16) REDACTED:72 — PanelThemes.AppendNight has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PowerResolver.Resolve (cyclomatic 16) · ×1
  • PowerResolver.Resolve (cyclomatic 16) src/BrimDeck.Core/Power.cs:65 — PowerResolver.Resolve 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 · PowerResolver.FromCounters (cyclomatic 16) · ×1
  • PowerResolver.FromCounters (cyclomatic 16) src/BrimDeck.Core/Power.cs:117 — PowerResolver.FromCounters 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 · DeckSettings.Behavior (cyclomatic 16) · ×1
  • DeckSettings.Behavior (cyclomatic 16) src/BrimDeck.Core/Settings.cs:834 — DeckSettings.Behavior has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: DeckSettings.Hotkey (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Shelf.TileName (cyclomatic 16) · ×1
  • Shelf.TileName (cyclomatic 16) src/BrimDeck.Core/Shelf.cs:241 — Shelf.TileName has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MainWindow.ResizeFromKeyboard (cyclomatic 16) · ×1
  • MainWindow.ResizeFromKeyboard (cyclomatic 16) src/BrimDeck/MainWindow.Resize.cs:339 — MainWindow.ResizeFromKeyboard 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 · MainWindow.InitializeShelf (cyclomatic 16) · ×1
  • MainWindow.InitializeShelf (cyclomatic 16) src/BrimDeck/MainWindow.Shelf.cs:59 — MainWindow.InitializeShelf has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 79, 87, 64). 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 · MainWindow.DragOut (cyclomatic 16) · ×1
  • MainWindow.DragOut (cyclomatic 16) src/BrimDeck/MainWindow.Shelf.cs:1029 — MainWindow.DragOut has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MainWindow.AcrossList (cyclomatic 16) · ×1
  • MainWindow.AcrossList (cyclomatic 16) src/BrimDeck/MainWindow.ShelfViews.cs:375 — MainWindow.AcrossList has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 5 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 · ModelDatePicker.ModelDatePicker.ctor (cyclomatic 16) · ×1
  • ModelDatePicker.ModelDatePicker.ctor (cyclomatic 16) src/BrimDeck/ModelDatePicker.cs:85 — ModelDatePicker.ModelDatePicker.ctor 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 · CorsairReader.Read (cyclomatic 16) · ×1
  • CorsairReader.Read (cyclomatic 16) src/BrimDeck/Native/CorsairReader.cs:96 — CorsairReader.Read has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 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 · DesktopSources.RenewCodeAgentAsync (cyclomatic 16) · ×1
  • DesktopSources.RenewCodeAgentAsync (cyclomatic 16) src/BrimDeck/Native/DesktopSources.cs:20 — DesktopSources.RenewCodeAgentAsync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · HidBatteries.ListUnread (cyclomatic 16) · ×1
  • HidBatteries.ListUnread (cyclomatic 16) src/BrimDeck/Native/HidBatteries.cs:593 — HidBatteries.ListUnread has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 function literals 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. This is NOT this file's highest cyclomatic complexity: HidBatteries.Dongle (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · HidBatteries.MchoseAsk (cyclomatic 16) · ×1
  • HidBatteries.MchoseAsk (cyclomatic 16) src/BrimDeck/Native/HidBatteries.cs:1171 — HidBatteries.MchoseAsk has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals 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. This is NOT this file's highest cyclomatic complexity: HidBatteries.Dongle (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SettingsWindow.SegmentBorder (cyclomatic 16) · ×1
  • SettingsWindow.SegmentBorder (cyclomatic 16) src/BrimDeck/SettingsControls.cs:87 — SettingsWindow.SegmentBorder has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 4 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 · SettingsWindow.ExpandedSketch (cyclomatic 16) · ×1
  • SettingsWindow.ExpandedSketch (cyclomatic 16) src/BrimDeck/SettingsMonitorExpanded.cs:278 — SettingsWindow.ExpandedSketch has cyclomatic complexity 16 (threshold 15). Of this number, 15 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 · SettingsWindow.ModelPrices (cyclomatic 16) · ×1
  • SettingsWindow.ModelPrices (cyclomatic 16) src/BrimDeck/SettingsPricing.cs:30 — SettingsWindow.ModelPrices has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 79, 39, 63, …). 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 · ShelfFiles.ShellImage (cyclomatic 16) · ×1
  • ShelfFiles.ShellImage (cyclomatic 16) src/BrimDeck/ShelfFiles.cs:181 — ShelfFiles.ShellImage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ShelfService.Apply (cyclomatic 16) · ×1
  • ShelfService.Apply (cyclomatic 16) src/BrimDeck/ShelfService.cs:58 — ShelfService.Apply has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SensorService.Serve (cyclomatic 16) · ×1
  • SensorService.Serve (cyclomatic 16) src/BrimDeck.Sensors/Program.cs:54 — SensorService.Serve 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 · MainWindow.RenderMusic (cognitive 246) · ×1
  • MainWindow.RenderMusic (cognitive 246) src/BrimDeck/MainWindow.Music.cs:448 — MainWindow.RenderMusic has cognitive complexity 246 (threshold 15). Of this number, 220 points are the body's own statements and 26 belong to 7 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MainWindow.SetExpanded (cognitive 170) · ×1
  • MainWindow.SetExpanded (cognitive 170) src/BrimDeck/MainWindow.xaml.cs:829 — MainWindow.SetExpanded has cognitive complexity 170 (threshold 15). Of this number, 166 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HidBatteries.Scan (cognitive 165) · ×1
  • HidBatteries.Scan (cognitive 165) src/BrimDeck/Native/HidBatteries.cs:344 — HidBatteries.Scan has cognitive complexity 165 (threshold 15). Of this number, 151 points are the body's own statements and 14 belong to 9 function literals 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 · MediaSessions.RefreshAsync (cognitive 150) · ×1
  • MediaSessions.RefreshAsync (cognitive 150) src/BrimDeck/Native/MediaSessions.cs:322 — MediaSessions.RefreshAsync has cognitive complexity 150 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExpandedLayout.For (cognitive 133) · ×1
  • ExpandedLayout.For (cognitive 133) src/BrimDeck.Core/ExpandedLayout.cs:123 — ExpandedLayout.For has cognitive complexity 133 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dongles.Find (cognitive 115) · ×1
  • Dongles.Find (cognitive 115) src/BrimDeck.Core/DeviceProtocols.cs:1306 — Dongles.Find has cognitive complexity 115 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonitorView.MonitorView.ctor (cognitive 114) · ×1
  • MonitorView.MonitorView.ctor (cognitive 114) src/BrimDeck/MonitorView.cs:84 — MonitorView.MonitorView.ctor has cognitive complexity 114 (threshold 15). Of this number, 108 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MainWindow.RenderModels (cognitive 106) · ×1
  • MainWindow.RenderModels (cognitive 106) src/BrimDeck/ModelDetails.cs:328 — MainWindow.RenderModels has cognitive complexity 106 (threshold 15). Of this number, 102 points are the body's own statements and 4 belong to 2 function literals 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 · DeckSettings.Normalize (cognitive 98) · ×1
  • DeckSettings.Normalize (cognitive 98) src/BrimDeck.Core/Settings.cs:874 — DeckSettings.Normalize has cognitive complexity 98 (threshold 15). Of this number, 88 points are the body's own statements and 10 belong to 7 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SettingsWindow.SourceDetails (cognitive 86) · ×1
  • SettingsWindow.SourceDetails (cognitive 86) src/BrimDeck/SettingsProviders.cs:236 — SettingsWindow.SourceDetails has cognitive complexity 86 (threshold 15). Of this number, 66 points are the body's own statements and 20 belong to 6 function literals 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 · SystemSampler.Collect (cognitive 85) · ×1
  • SystemSampler.Collect (cognitive 85) src/BrimDeck/Native/SystemSampler.cs:370 — SystemSampler.Collect has cognitive complexity 85 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MainWindow.QuotaBlock (cognitive 83) · ×1
  • MainWindow.QuotaBlock (cognitive 83) src/BrimDeck/UsagePanel.cs:599 — MainWindow.QuotaBlock has cognitive complexity 83 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SettingsWindow.HotkeyRow (cognitive 76) · ×1
  • SettingsWindow.HotkeyRow (cognitive 76) src/BrimDeck/SettingsHotkeys.cs:78 — SettingsWindow.HotkeyRow has cognitive complexity 76 (threshold 15). Of this number, 30 points are the body's own statements and 46 belong to 8 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MainWindow.RenderCompactMusic (cognitive 73) · ×1
  • MainWindow.RenderCompactMusic (cognitive 73) src/BrimDeck/MainWindow.Music.cs:1168 — MainWindow.RenderCompactMusic has cognitive complexity 73 (threshold 15). 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 · MonitorView.Update (cognitive 71) · ×1
  • MonitorView.Update (cognitive 71) src/BrimDeck/MonitorView.cs:322 — MonitorView.Update has cognitive complexity 71 (threshold 15). Of this number, 69 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 · Renderer.ShelfMeasures (cognitive 71) · ×1
  • Renderer.ShelfMeasures (cognitive 71) scripts/readme-media/Program.cs:1243 — Renderer.ShelfMeasures has cognitive complexity 71 (threshold 15). Of this number, 57 points are the body's own statements and 14 belong to 5 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 · SettingsWindow.RingDetails (cognitive 68) · ×1
  • SettingsWindow.RingDetails (cognitive 68) src/BrimDeck/SettingsProviders.cs:497 — SettingsWindow.RingDetails has cognitive complexity 68 (threshold 15). Of this number, 48 points are the body's own statements and 20 belong to 7 function literals 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 · ClipboardSyncService.ExchangeLanAsync (cognitive 65) · ×1
  • ClipboardSyncService.ExchangeLanAsync (cognitive 65) src/BrimDeck/ClipboardSyncService.Lan.cs:135 — ClipboardSyncService.ExchangeLanAsync has cognitive complexity 65 (threshold 15). Of this number, 58 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 · BatteryModel.Build (cognitive 61) · ×1
  • BatteryModel.Build (cognitive 61) src/BrimDeck.Core/BatteryModel.cs:51 — BatteryModel.Build has cognitive complexity 61 (threshold 15). 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 · MainWindow.ColumnHeader (cognitive 60) · ×1
  • MainWindow.ColumnHeader (cognitive 60) src/BrimDeck/MainWindow.Shelf.cs:385 — MainWindow.ColumnHeader has cognitive complexity 60 (threshold 15). Of this number, 49 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DeviceRoster.Merge (cognitive 58) · ×1
  • DeviceRoster.Merge (cognitive 58) src/BrimDeck.Core/Devices.cs:432 — DeviceRoster.Merge has cognitive complexity 58 (threshold 15). Of this number, 45 points are the body's own statements and 13 belong to 8 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 · DeviceLists.Adopt (cognitive 57) · ×1
  • DeviceLists.Adopt (cognitive 57) src/BrimDeck.Core/Devices.cs:95 — DeviceLists.Adopt has cognitive complexity 57 (threshold 15). Of this number, 51 points are the body's own statements and 6 belong to 4 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 · CorsairReader.Run (cognitive 57) · ×1
  • CorsairReader.Run (cognitive 57) src/BrimDeck/Native/CorsairReader.cs:48 — CorsairReader.Run has cognitive complexity 57 (threshold 15). Of this number, 56 points are the body's own statements and 1 belongs 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 · LanPng.Validate (cognitive 56) · ×1
  • LanPng.Validate (cognitive 56) src/BrimDeck.Core/ClipboardSync/LanPng.cs:18 — LanPng.Validate has cognitive complexity 56 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.Column (cognitive 54) · ×1
  • MainWindow.Column (cognitive 54) src/BrimDeck/UsagePanel.cs:363 — MainWindow.Column has cognitive complexity 54 (threshold 15). Of this number, 48 points are the body's own statements and 6 belong to 2 function literals 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 · UsageService.ReadClaudeUnitAsync (cognitive 52) · ×1
  • UsageService.ReadClaudeUnitAsync (cognitive 52) src/BrimDeck.Core/UsageService.cs:561 — UsageService.ReadClaudeUnitAsync has cognitive complexity 52 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MainWindow.RenderCompactColumn (cognitive 52) · ×1
  • MainWindow.RenderCompactColumn (cognitive 52) src/BrimDeck/MainWindow.CompactColumn.cs:28 — MainWindow.RenderCompactColumn has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PowerGlyphs.Battery (cognitive 52) · ×1
  • PowerGlyphs.Battery (cognitive 52) src/BrimDeck/PowerGlyphs.cs:97 — PowerGlyphs.Battery has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LogReader.Read (cognitive 51) · ×1
  • LogReader.Read (cognitive 51) src/BrimDeck.Core/LogReader.cs:37 — LogReader.Read has cognitive complexity 51 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClipboardSyncService.RunAsync (cognitive 51) · ×1
  • ClipboardSyncService.RunAsync (cognitive 51) src/BrimDeck/ClipboardSyncService.cs:312 — ClipboardSyncService.RunAsync has cognitive complexity 51 (threshold 15). Of this number, 50 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LogReader.ParseLine (cognitive 49) · ×1
  • LogReader.ParseLine (cognitive 49) src/BrimDeck.Core/LogReader.cs:217 — LogReader.ParseLine has cognitive complexity 49 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LyricsService.FindQq (cognitive 49) · ×1
  • LyricsService.FindQq (cognitive 49) src/BrimDeck.Core/QqLyrics.cs:13 — LyricsService.FindQq has cognitive complexity 49 (threshold 15). Of this number, 48 points are the body's own statements and 1 belongs 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 · WindowsHost.WatchOrderOnce (cognitive 49) · ×1
  • WindowsHost.WatchOrderOnce (cognitive 49) src/BrimDeck/Native/WindowsHost.cs:148 — WindowsHost.WatchOrderOnce has cognitive complexity 49 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SettingsWindow.ConditionRow (cognitive 49) · ×1
  • SettingsWindow.ConditionRow (cognitive 49) src/BrimDeck/SettingsShelfRules.cs:206 — SettingsWindow.ConditionRow has cognitive complexity 49 (threshold 15). Of this number, 29 points are the body's own statements and 20 belong to 6 function literals 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 · AudioTags.ReadId3 (cognitive 48) · ×1
  • AudioTags.ReadId3 (cognitive 48) src/BrimDeck.Core/AudioTags.cs:95 — AudioTags.ReadId3 has cognitive complexity 48 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CpuProvider.Sample (cognitive 48) · ×1
  • CpuProvider.Sample (cognitive 48) src/BrimDeck/Native/CpuProvider.cs:61 — CpuProvider.Sample has cognitive complexity 48 (threshold 15). Of this number, 47 points are the body's own statements and 1 belongs 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 · SettingsWindow.FiguresMenu (cognitive 48) · ×1
  • SettingsWindow.FiguresMenu (cognitive 48) src/BrimDeck/SettingsMonitor.cs:496 — SettingsWindow.FiguresMenu has cognitive complexity 48 (threshold 15). Of this number, 35 points are the body's own statements and 13 belong to 6 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 · LyricsService.Get (cognitive 46) · ×1
  • LyricsService.Get (cognitive 46) src/BrimDeck.Core/Lyrics.cs:211 — LyricsService.Get has cognitive complexity 46 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.MusicColumns (cognitive 46) · ×1
  • MainWindow.MusicColumns (cognitive 46) src/BrimDeck/MainWindow.Music.cs:833 — MainWindow.MusicColumns has cognitive complexity 46 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.UpdateMusicPosition (cognitive 46) · ×1
  • MainWindow.UpdateMusicPosition (cognitive 46) src/BrimDeck/MainWindow.Music.cs:1070 — MainWindow.UpdateMusicPosition has cognitive complexity 46 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AudioLevelMeter.Run (cognitive 46) · ×1
  • AudioLevelMeter.Run (cognitive 46) src/BrimDeck/Native/AudioLevelMeter.cs:75 — AudioLevelMeter.Run has cognitive complexity 46 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.NeteaseSwitch (cognitive 45) · ×1
  • SettingsWindow.NeteaseSwitch (cognitive 45) src/BrimDeck/SettingsMusic.cs:491 — SettingsWindow.NeteaseSwitch has cognitive complexity 45 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · QqMediaConnection.AcceptCore (cognitive 44) · ×1
  • QqMediaConnection.AcceptCore (cognitive 44) src/BrimDeck/Native/QqMediaConnection.cs:155 — QqMediaConnection.AcceptCore has cognitive complexity 44 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LanClipboardLink.RunOnCurrentNetworkAsync (cognitive 43) · ×1
  • LanClipboardLink.RunOnCurrentNetworkAsync (cognitive 43) src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:60 — LanClipboardLink.RunOnCurrentNetworkAsync has cognitive complexity 43 (threshold 15). Of this number, 41 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Pushes.Apply (cognitive 43) · ×1
  • Pushes.Apply (cognitive 43) src/BrimDeck.Core/DeviceProtocols.cs:1626 — Pushes.Apply has cognitive complexity 43 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FrameRates.Sample (cognitive 43) · ×1
  • FrameRates.Sample (cognitive 43) src/BrimDeck/Native/FrameRates.cs:122 — FrameRates.Sample has cognitive complexity 43 (threshold 15). 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 · HidBatteries.Pass (cognitive 43) · ×1
  • HidBatteries.Pass (cognitive 43) src/BrimDeck/Native/HidBatteries.cs:243 — HidBatteries.Pass has cognitive complexity 43 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SystemSampler.Run (cognitive 43) · ×1
  • SystemSampler.Run (cognitive 43) src/BrimDeck/Native/SystemSampler.cs:213 — SystemSampler.Run has cognitive complexity 43 (threshold 15). Of this number, 42 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeteaseLog.Parse (cognitive 42) · ×1
  • NeteaseLog.Parse (cognitive 42) src/BrimDeck.Core/NeteaseLog.cs:47 — NeteaseLog.Parse has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeteaseLogState.Apply (cognitive 42) · ×1
  • NeteaseLogState.Apply (cognitive 42) src/BrimDeck.Core/NeteaseLog.cs:170 — NeteaseLogState.Apply has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScriptSession.SendAsync (cognitive 42) · ×1
  • ScriptSession.SendAsync (cognitive 42) src/BrimDeck.Core/ScriptProvider.cs:96 — ScriptSession.SendAsync has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfiguredProviders.FetchAsync (cognitive 42) · ×1
  • ConfiguredProviders.FetchAsync (cognitive 42) src/BrimDeck.Core/ScriptProvider.cs:396 — ConfiguredProviders.FetchAsync has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UsageService.ReadCursorEvents (cognitive 42) · ×1
  • UsageService.ReadCursorEvents (cognitive 42) src/BrimDeck.Core/UsageService.cs:943 — UsageService.ReadCursorEvents has cognitive complexity 42 (threshold 15). Of this number, 38 points are the body's own statements and 4 belong to 3 function literals 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 · UsageService.ReadZCodeAsync (cognitive 42) · ×1
  • UsageService.ReadZCodeAsync (cognitive 42) src/BrimDeck.Core/UsageService.cs:1209 — UsageService.ReadZCodeAsync has cognitive complexity 42 (threshold 15). Of this number, 40 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SettingsWindow.ShowWeTypePairingAsync (cognitive 41) · ×1
  • SettingsWindow.ShowWeTypePairingAsync (cognitive 41) src/BrimDeck/SettingsSyncDialogs.cs:157 — SettingsWindow.ShowWeTypePairingAsync has cognitive complexity 41 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GpuReadings.Samples (cognitive 40) · ×1
  • GpuReadings.Samples (cognitive 40) src/BrimDeck.Core/GpuAdapters.cs:152 — GpuReadings.Samples has cognitive complexity 40 (threshold 15). Of this number, 37 points are the body's own statements and 3 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 · DoubaoBrowserLogin.SignInAsync (cognitive 40) · ×1
  • DoubaoBrowserLogin.SignInAsync (cognitive 40) src/BrimDeck/Native/DoubaoBrowserLogin.cs:18 — DoubaoBrowserLogin.SignInAsync has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.RenderSyncButton (cognitive 40) · ×1
  • MainWindow.RenderSyncButton (cognitive 40) src/BrimDeck/UsageSynchronization.cs:64 — MainWindow.RenderSyncButton has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UsageService.ReadCursorBillingDays (cognitive 39) · ×1
  • UsageService.ReadCursorBillingDays (cognitive 39) src/BrimDeck.Core/UsageService.cs:1037 — UsageService.ReadCursorBillingDays has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.PriceBreakdown (cognitive 39) · ×1
  • MainWindow.PriceBreakdown (cognitive 39) src/BrimDeck/ModelDetails.cs:268 — MainWindow.PriceBreakdown has cognitive complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to 2 function literals 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 · LyricsService.FindAsync (cognitive 38) · ×1
  • LyricsService.FindAsync (cognitive 38) src/BrimDeck.Core/Lyrics.cs:163 — LyricsService.FindAsync has cognitive complexity 38 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.KugouSwitch (cognitive 38) · ×1
  • SettingsWindow.KugouSwitch (cognitive 38) src/BrimDeck/SettingsMusic.cs:418 — SettingsWindow.KugouSwitch has cognitive complexity 38 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SettingsWindow.CreatePriceEditor (cognitive 38) · ×1
  • SettingsWindow.CreatePriceEditor (cognitive 38) src/BrimDeck/SettingsPricing.cs:116 — SettingsWindow.CreatePriceEditor has cognitive complexity 38 (threshold 15). Of this number, 34 points are the body's own statements and 4 belong to 3 function literals 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 · SettingsWindow.ShowPageCore (cognitive 38) · ×1
  • SettingsWindow.ShowPageCore (cognitive 38) src/BrimDeck/SettingsWindow.cs:313 — SettingsWindow.ShowPageCore has cognitive complexity 38 (threshold 15). Of this number, 33 points are the body's own statements and 5 belong to 2 function literals 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 · SettingsWindow.SourceSelector (cognitive 38) · ×1
  • SettingsWindow.SourceSelector (cognitive 38) src/BrimDeck/SettingsWindow.cs:901 — SettingsWindow.SourceSelector has cognitive complexity 38 (threshold 15). Of this number, 28 points are the body's own statements and 10 belong to 3 function literals 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 · SteelSeriesHeadsets.Battery (cognitive 37) · ×1
  • SteelSeriesHeadsets.Battery (cognitive 37) src/BrimDeck.Core/Brands/SteelSeriesHeadsets.cs:49 — SteelSeriesHeadsets.Battery has cognitive complexity 37 (threshold 15). None of this is in the body itself: all 37 points belong to 5 function literals inside it that branch (lines 58, 60, 51, …). 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 · QuotaRing.For (cognitive 37) · ×1
  • QuotaRing.For (cognitive 37) src/BrimDeck.Core/QuotaRing.cs:39 — QuotaRing.For has cognitive complexity 37 (threshold 15). Of this number, 24 points are the body's own statements and 13 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SettingsWindow.OpenLanPairingAsync (cognitive 37) · ×1
  • SettingsWindow.OpenLanPairingAsync (cognitive 37) src/BrimDeck/SettingsSyncDialogs.cs:382 — SettingsWindow.OpenLanPairingAsync has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WeTypeWire.Unsnappy (cognitive 36) · ×1
  • WeTypeWire.Unsnappy (cognitive 36) src/BrimDeck.Core/ClipboardSync/WeTypeWire.cs:68 — WeTypeWire.Unsnappy has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayStation.Battery (cognitive 36) · ×1
  • PlayStation.Battery (cognitive 36) src/BrimDeck.Core/DeviceProtocols.cs:1946 — PlayStation.Battery has cognitive complexity 36 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Pricing.FromReported (cognitive 36) · ×1
  • Pricing.FromReported (cognitive 36) src/BrimDeck.Core/Pricing.cs:461 — Pricing.FromReported has cognitive complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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 · Profiles.Normalize (cognitive 36) · ×1
  • Profiles.Normalize (cognitive 36) src/BrimDeck.Core/Profiles.cs:244 — Profiles.Normalize has cognitive complexity 36 (threshold 15). Of this number, 27 points are the body's own statements and 9 belong to 4 function literals 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 · GattBattery.Open (cognitive 36) · ×1
  • GattBattery.Open (cognitive 36) src/BrimDeck/Native/BluetoothBatteries.cs:272 — GattBattery.Open has cognitive complexity 36 (threshold 15). Of this number, 33 points are the body's own statements and 3 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 · PanelThemes.Renamed (cognitive 35) · ×1
  • PanelThemes.Renamed (cognitive 35) src/BrimDeck.Core/PanelThemes.Rename.cs:11 — PanelThemes.Renamed has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.MainWindow.ctor (cognitive 35) · ×1
  • MainWindow.MainWindow.ctor (cognitive 35) src/BrimDeck/MainWindow.xaml.cs:124 — MainWindow.MainWindow.ctor has cognitive complexity 35 (threshold 15). None of this is in the body itself: all 35 points belong to 16 function literals inside it that branch (lines 238, 168, 221, …). 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 · MediaSessions.ReadSystemCoreAsync (cognitive 35) · ×1
  • MediaSessions.ReadSystemCoreAsync (cognitive 35) src/BrimDeck/Native/MediaSessions.cs:585 — MediaSessions.ReadSystemCoreAsync has cognitive complexity 35 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MainWindow.PlaceDeck (cognitive 34) · ×1
  • MainWindow.PlaceDeck (cognitive 34) src/BrimDeck/MainWindow.ShelfArrange.cs:491 — MainWindow.PlaceDeck has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.ClipBlock (cognitive 34) · ×1
  • MainWindow.ClipBlock (cognitive 34) src/BrimDeck/MainWindow.ShelfViews.cs:587 — MainWindow.ClipBlock has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.TrackPointer (cognitive 34) · ×1
  • MainWindow.TrackPointer (cognitive 34) src/BrimDeck/MainWindow.xaml.cs:1094 — MainWindow.TrackPointer has cognitive complexity 34 (threshold 15). 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 · HidBatteries.F83 (cognitive 34) · ×1
  • HidBatteries.F83 (cognitive 34) src/BrimDeck/Native/HidBatteries.cs:1269 — HidBatteries.F83 has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.CreateUpdateView (cognitive 34) · ×1
  • SettingsWindow.CreateUpdateView (cognitive 34) src/BrimDeck/SettingsUpdates.cs:86 — SettingsWindow.CreateUpdateView has cognitive complexity 34 (threshold 15). Of this number, 29 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UsageService.FetchCoreAsync (cognitive 33) · ×1
  • UsageService.FetchCoreAsync (cognitive 33) src/BrimDeck.Core/UsageService.cs:313 — UsageService.FetchCoreAsync has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.Banded (cognitive 33) · ×1
  • MainWindow.Banded (cognitive 33) src/BrimDeck/MainWindow.ShelfSelect.cs:92 — MainWindow.Banded has cognitive complexity 33 (threshold 15). None of this is in the body itself: all 33 points belong to 4 function literals inside it that branch (lines 120, 106, 145, …). 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 · PushEvents.Run (cognitive 33) · ×1
  • PushEvents.Run (cognitive 33) src/BrimDeck/Native/PushEvents.cs:51 — PushEvents.Run has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.DisplayProfiles (cognitive 33) · ×1
  • SettingsWindow.DisplayProfiles (cognitive 33) src/BrimDeck/SettingsProfiles.cs:200 — SettingsWindow.DisplayProfiles has cognitive complexity 33 (threshold 15). Of this number, 17 points are the body's own statements and 16 belong to 4 function literals 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 · CommandCodeUsage.ReadPrices (cognitive 32) · ×1
  • CommandCodeUsage.ReadPrices (cognitive 32) src/BrimDeck.Core/CommandCodeUsage.cs:42 — CommandCodeUsage.ReadPrices has cognitive complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 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 · KimiSessions.Read (cognitive 32) · ×1
  • KimiSessions.Read (cognitive 32) src/BrimDeck.Core/KimiSessions.cs:39 — KimiSessions.Read has cognitive complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs 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 · MonitorLayout.For (cognitive 32) · ×1
  • MonitorLayout.For (cognitive 32) src/BrimDeck.Core/MonitorLayout.cs:263 — MonitorLayout.For has cognitive complexity 32 (threshold 15). 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 · MainWindow.ClipRowThree (cognitive 32) · ×1
  • MainWindow.ClipRowThree (cognitive 32) src/BrimDeck/MainWindow.ShelfViews.cs:488 — MainWindow.ClipRowThree has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelThemes.Build (cognitive 31) · ×1
  • PanelThemes.Build (cognitive 31) src/BrimDeck.Core/PanelThemes.Build.cs:36 — PanelThemes.Build has cognitive complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs 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 · ThemeColor.EnsureContrast (cognitive 31) · ×1
  • ThemeColor.EnsureContrast (cognitive 31) src/BrimDeck.Core/ThemeColor.cs:83 — ThemeColor.EnsureContrast has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UsageService.ReadCursorAsync (cognitive 31) · ×1
  • UsageService.ReadCursorAsync (cognitive 31) src/BrimDeck.Core/UsageService.cs:871 — UsageService.ReadCursorAsync has cognitive complexity 31 (threshold 15). 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 · KugouCdpConnection.ConnectAsync (cognitive 31) · ×1
  • KugouCdpConnection.ConnectAsync (cognitive 31) src/BrimDeck/Native/KugouCdpConnection.cs:120 — KugouCdpConnection.ConnectAsync has cognitive complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 2 function literals 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 · StorageReader.Read (cognitive 31) · ×1
  • StorageReader.Read (cognitive 31) src/BrimDeck/Native/StorageReader.cs:81 — StorageReader.Read has cognitive complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs 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 · SettingsWindow.SketchPair (cognitive 31) · ×1
  • SettingsWindow.SketchPair (cognitive 31) src/BrimDeck/SettingsMonitorExpanded.cs:152 — SettingsWindow.SketchPair has cognitive complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SettingsWindow.SketchBlock (cognitive 31) · ×1
  • SettingsWindow.SketchBlock (cognitive 31) src/BrimDeck/SettingsMonitorExpanded.cs:350 — SettingsWindow.SketchBlock has cognitive complexity 31 (threshold 15). Of this number, 20 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SettingsWindow.RuleRow (cognitive 31) · ×1
  • SettingsWindow.RuleRow (cognitive 31) src/BrimDeck/SettingsProfiles.cs:310 — SettingsWindow.RuleRow has cognitive complexity 31 (threshold 15). Of this number, 23 points are the body's own statements and 8 belong to 4 function literals 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 · PixelStairs.Build (cognitive 30) · ×1
  • PixelStairs.Build (cognitive 30) src/BrimDeck.Core/PixelStairs.cs:23 — PixelStairs.Build has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MainWindow.LayoutCompactAlert (cognitive 30) · ×1
  • MainWindow.LayoutCompactAlert (cognitive 30) src/BrimDeck/MainWindow.CompactLayout.cs:71 — MainWindow.LayoutCompactAlert has cognitive complexity 30 (threshold 15). 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 · BluetoothBatteries.Publish (cognitive 30) · ×1
  • BluetoothBatteries.Publish (cognitive 30) src/BrimDeck/Native/BluetoothBatteries.cs:202 — BluetoothBatteries.Publish has cognitive 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, split the body into named stages: move each independent 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 · LogitechReader.ReadOne (cognitive 30) · ×1
  • LogitechReader.ReadOne (cognitive 30) src/BrimDeck/Native/HidBatteries.cs:1590 — LogitechReader.ReadOne has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.SizeRow (cognitive 30) · ×1
  • SettingsWindow.SizeRow (cognitive 30) src/BrimDeck/SettingsCollapsedSize.cs:242 — SettingsWindow.SizeRow has cognitive complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SettingsWindow.CategoryOptions (cognitive 30) · ×1
  • SettingsWindow.CategoryOptions (cognitive 30) src/BrimDeck/SettingsShelfRules.cs:131 — SettingsWindow.CategoryOptions has cognitive complexity 30 (threshold 15). Of this number, 19 points are the body's own statements and 11 belong to 2 function literals 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 · SensorService.Serve (cognitive 30) · ×1
  • SensorService.Serve (cognitive 30) src/BrimDeck.Sensors/Program.cs:54 — SensorService.Serve has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DshSessions.Read (cognitive 29) · ×1
  • DshSessions.Read (cognitive 29) src/BrimDeck.Core/DshSessions.cs:43 — DshSessions.Read has cognitive complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs 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 · DshSessions.Parse (cognitive 29) · ×1
  • DshSessions.Parse (cognitive 29) src/BrimDeck.Core/DshSessions.cs:88 — DshSessions.Parse has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Pricing.Pricing.ctor (cognitive 29) · ×1
  • Pricing.Pricing.ctor (cognitive 29) src/BrimDeck.Core/Pricing.cs:65 — Pricing.Pricing.ctor has cognitive complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs 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 · Fonts.Retarget (cognitive 29) · ×1
  • Fonts.Retarget (cognitive 29) src/BrimDeck/Fonts.cs:114 — Fonts.Retarget has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HidBatteries.RunNow (cognitive 29) · ×1
  • HidBatteries.RunNow (cognitive 29) src/BrimDeck/Native/HidBatteries.cs:1086 — HidBatteries.RunNow has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeteaseCdpConnection.ConnectAsync (cognitive 29) · ×1
  • NeteaseCdpConnection.ConnectAsync (cognitive 29) src/BrimDeck/Native/NeteaseCdpConnection.cs:67 — NeteaseCdpConnection.ConnectAsync has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeteaseCdpConnection.ReceiveAsync (cognitive 29) · ×1
  • NeteaseCdpConnection.ReceiveAsync (cognitive 29) src/BrimDeck/Native/NeteaseCdpConnection.cs:122 — NeteaseCdpConnection.ReceiveAsync has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeteaseLogReader.ReadLinesAsync (cognitive 29) · ×1
  • NeteaseLogReader.ReadLinesAsync (cognitive 29) src/BrimDeck/Native/NeteaseLogReader.cs:123 — NeteaseLogReader.ReadLinesAsync has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SettingsWindow.RefreshSyncStatus (cognitive 29) · ×1
  • SettingsWindow.RefreshSyncStatus (cognitive 29) src/BrimDeck/SettingsClipboardSync.cs:279 — SettingsWindow.RefreshSyncStatus has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Renderer.ClipboardSyncScene (cognitive 29) · ×1
  • Renderer.ClipboardSyncScene (cognitive 29) scripts/readme-media/Program.cs:1397 — Renderer.ClipboardSyncScene has cognitive complexity 29 (threshold 15). 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 · PanelThemes.Derive (cognitive 28) · ×1
  • PanelThemes.Derive (cognitive 28) src/BrimDeck.Core/PanelThemes.Derive.cs:35 — PanelThemes.Derive has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.RenderPageSwitch (cognitive 28) · ×1
  • MainWindow.RenderPageSwitch (cognitive 28) src/BrimDeck/MainWindow.Music.cs:226 — MainWindow.RenderPageSwitch has cognitive complexity 28 (threshold 15). 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 · MainWindow.UpdateLyrics (cognitive 28) · ×1
  • MainWindow.UpdateLyrics (cognitive 28) src/BrimDeck/MainWindow.Music.cs:308 — MainWindow.UpdateLyrics has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.ApplySettings (cognitive 28) · ×1
  • MainWindow.ApplySettings (cognitive 28) src/BrimDeck/MainWindow.xaml.cs:377 — MainWindow.ApplySettings has cognitive complexity 28 (threshold 15). 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 · MonitorStrip.Drives (cognitive 28) · ×1
  • MonitorStrip.Drives (cognitive 28) src/BrimDeck/MonitorStrip.cs:491 — MonitorStrip.Drives has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CorsairReader.Read (cognitive 28) · ×1
  • CorsairReader.Read (cognitive 28) src/BrimDeck/Native/CorsairReader.cs:96 — CorsairReader.Read has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.SensorsSettings (cognitive 28) · ×1
  • SettingsWindow.SensorsSettings (cognitive 28) src/BrimDeck/SettingsSensors.cs:23 — SettingsWindow.SensorsSettings has cognitive complexity 28 (threshold 15). Of this number, 21 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 · CompactSpacing.Share (cognitive 27) · ×1
  • CompactSpacing.Share (cognitive 27) src/BrimDeck.Core/CompactSpacing.cs:126 — CompactSpacing.Share has cognitive complexity 27 (threshold 15). 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 · Dongles.F83Battery (cognitive 27) · ×1
  • Dongles.F83Battery (cognitive 27) src/BrimDeck.Core/DeviceProtocols.cs:717 — Dongles.F83Battery has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Devices.Kind (cognitive 27) · ×1
  • Devices.Kind (cognitive 27) src/BrimDeck.Core/Devices.cs:242 — Devices.Kind has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UsageService.ReadClaudeAsync (cognitive 27) · ×1
  • UsageService.ReadClaudeAsync (cognitive 27) src/BrimDeck.Core/UsageService.cs:484 — UsageService.ReadClaudeAsync has cognitive complexity 27 (threshold 15). Of this number, 26 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 · MainWindow.MirrorPointer (cognitive 27) · ×1
  • MainWindow.MirrorPointer (cognitive 27) src/BrimDeck/MainWindow.xaml.cs:301 — MainWindow.MirrorPointer has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MusicMarquee.Draw (cognitive 27) · ×1
  • MusicMarquee.Draw (cognitive 27) src/BrimDeck/MusicVisuals.cs:482 — MusicMarquee.Draw has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.ColorRow (cognitive 27) · ×1
  • SettingsWindow.ColorRow (cognitive 27) src/BrimDeck/SettingsThemeEditor.cs:96 — SettingsWindow.ColorRow has cognitive complexity 27 (threshold 15). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 122, 118, 112, …). 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 · NeteaseSource.RefreshAsync (cognitive 26) · ×1
  • NeteaseSource.RefreshAsync (cognitive 26) src/BrimDeck/Native/NeteaseSource.cs:179 — NeteaseSource.RefreshAsync has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.Fit (cognitive 26) · ×1
  • MainWindow.Fit (cognitive 26) src/BrimDeck/UsagePanel.cs:98 — MainWindow.Fit has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CursorPrices.Solve (cognitive 25) · ×1
  • CursorPrices.Solve (cognitive 25) src/BrimDeck.Core/CursorPrices.cs:230 — CursorPrices.Solve has cognitive complexity 25 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · LyricsService.FindQueMusic (cognitive 25) · ×1
  • LyricsService.FindQueMusic (cognitive 25) src/BrimDeck.Core/QueMusicLyrics.cs:26 — LyricsService.FindQueMusic has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · StripAdmission.Wanted (cognitive 25) · ×1
  • StripAdmission.Wanted (cognitive 25) src/BrimDeck.Core/StripPresence.cs:65 — StripAdmission.Wanted has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.TickMusic (cognitive 25) · ×1
  • MainWindow.TickMusic (cognitive 25) src/BrimDeck/MainWindow.Music.cs:1471 — MainWindow.TickMusic has cognitive complexity 25 (threshold 15). 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 · MainWindow.FileRow (cognitive 25) · ×1
  • MainWindow.FileRow (cognitive 25) src/BrimDeck/MainWindow.Shelf.cs:810 — MainWindow.FileRow has cognitive complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 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 · WindowsHost.Detect (cognitive 25) · ×1
  • WindowsHost.Detect (cognitive 25) src/BrimDeck/Native/WindowsHost.cs:481 — WindowsHost.Detect has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThunderobotMice.Battery (cognitive 24) · ×1
  • ThunderobotMice.Battery (cognitive 24) src/BrimDeck.Core/Brands/Thunderobot.cs:16 — ThunderobotMice.Battery has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LibcefPatch.Locate (cognitive 24) · ×1
  • LibcefPatch.Locate (cognitive 24) src/BrimDeck.Core/LibcefPatch.cs:35 — LibcefPatch.Locate has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelThemes.DecorStops (cognitive 24) · ×1
  • PanelThemes.DecorStops (cognitive 24) src/BrimDeck.Core/PanelThemes.Build.cs:130 — PanelThemes.DecorStops has cognitive complexity 24 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PowerResolver.FromCounters (cognitive 24) · ×1
  • PowerResolver.FromCounters (cognitive 24) src/BrimDeck.Core/Power.cs:117 — PowerResolver.FromCounters has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Pricing.RebuildLookup (cognitive 24) · ×1
  • Pricing.RebuildLookup (cognitive 24) src/BrimDeck.Core/Pricing.cs:329 — Pricing.RebuildLookup has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MetricParser.ParseMetric (cognitive 24) · ×1
  • MetricParser.ParseMetric (cognitive 24) src/BrimDeck.Core/UsageMetric.cs:132 — MetricParser.ParseMetric has cognitive complexity 24 (threshold 15). 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 · App.UpdateMonitorExtras (cognitive 24) · ×1
  • App.UpdateMonitorExtras (cognitive 24) src/BrimDeck/App.xaml.cs:541 — App.UpdateMonitorExtras has cognitive complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MainWindow.AttachRow (cognitive 24) · ×1
  • MainWindow.AttachRow (cognitive 24) src/BrimDeck/MainWindow.Shelf.cs:953 — MainWindow.AttachRow has cognitive complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 960, 963, 979, …). 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 · HidBatteries.RapooGen1 (cognitive 24) · ×1
  • HidBatteries.RapooGen1 (cognitive 24) src/BrimDeck/Native/HidBatteries.cs:1471 — HidBatteries.RapooGen1 has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeteaseProcess.FindInstalled (cognitive 24) · ×1
  • NeteaseProcess.FindInstalled (cognitive 24) src/BrimDeck/Native/NeteaseSource.cs:68 — NeteaseProcess.FindInstalled has cognitive complexity 24 (threshold 15). Of this number, 16 points are the body's own statements and 8 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 · MediaRouting.PreferSystem (cognitive 23) · ×1
  • MediaRouting.PreferSystem (cognitive 23) src/BrimDeck.Core/MediaRouting.cs:61 — MediaRouting.PreferSystem has cognitive complexity 23 (threshold 15). 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 · PanelThemes.LoadFolder (cognitive 23) · ×1
  • PanelThemes.LoadFolder (cognitive 23) src/BrimDeck.Core/PanelThemes.Files.cs:17 — PanelThemes.LoadFolder has cognitive complexity 23 (threshold 15). Of this number, 21 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 · MainWindow.SlideDeck (cognitive 23) · ×1
  • MainWindow.SlideDeck (cognitive 23) src/BrimDeck/MainWindow.ShelfArrange.cs:531 — MainWindow.SlideDeck has cognitive complexity 23 (threshold 15). Of this number, 16 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 · ProcessProvider.Sample (cognitive 23) · ×1
  • ProcessProvider.Sample (cognitive 23) src/BrimDeck/Native/SystemSampler.cs:725 — ProcessProvider.Sample has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.ThemeDetails (cognitive 23) · ×1
  • SettingsWindow.ThemeDetails (cognitive 23) src/BrimDeck/SettingsThemes.cs:124 — SettingsWindow.ThemeDetails has cognitive complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · UsageLastSeen.Slim (cognitive 22) · ×1
  • UsageLastSeen.Slim (cognitive 22) src/BrimDeck.Core/UsageLastSeen.cs:192 — UsageLastSeen.Slim has cognitive complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals 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 · UsageService.ParseCursorBillingItem (cognitive 22) · ×1
  • UsageService.ParseCursorBillingItem (cognitive 22) src/BrimDeck.Core/UsageService.cs:1140 — UsageService.ParseCursorBillingItem has cognitive complexity 22 (threshold 15). Of this number, 20 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 · CompactStylePreview.Create (cognitive 22) · ×1
  • CompactStylePreview.Create (cognitive 22) src/BrimDeck/CompactStylePreview.cs:22 — CompactStylePreview.Create has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.CheckSourceMenuPointer (cognitive 22) · ×1
  • MainWindow.CheckSourceMenuPointer (cognitive 22) src/BrimDeck/MainWindow.SourceMenu.cs:107 — MainWindow.CheckSourceMenuPointer has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.PointerChanged (cognitive 22) · ×1
  • MainWindow.PointerChanged (cognitive 22) src/BrimDeck/MainWindow.xaml.cs:1153 — MainWindow.PointerChanged has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelDatePicker.ModelDatePicker.ctor (cognitive 22) · ×1
  • ModelDatePicker.ModelDatePicker.ctor (cognitive 22) src/BrimDeck/ModelDatePicker.cs:85 — ModelDatePicker.ModelDatePicker.ctor has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelDatePicker.Refresh (cognitive 22) · ×1
  • ModelDatePicker.Refresh (cognitive 22) src/BrimDeck/ModelDatePicker.cs:352 — ModelDatePicker.Refresh has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProcessListView.OnRender (cognitive 22) · ×1
  • ProcessListView.OnRender (cognitive 22) src/BrimDeck/MonitorProcesses.cs:166 — ProcessListView.OnRender has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GamingBatteries.Read (cognitive 22) · ×1
  • GamingBatteries.Read (cognitive 22) src/BrimDeck/Native/GamingBatteries.cs:56 — GamingBatteries.Read has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HidBatteries.Present (cognitive 22) · ×1
  • HidBatteries.Present (cognitive 22) src/BrimDeck/Native/HidBatteries.cs:1001 — HidBatteries.Present has cognitive complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals 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 · LogitechReader.Read (cognitive 22) · ×1
  • LogitechReader.Read (cognitive 22) src/BrimDeck/Native/HidBatteries.cs:1553 — LogitechReader.Read has cognitive complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals 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 · WindowsHost.TopmostCover (cognitive 22) · ×1
  • WindowsHost.TopmostCover (cognitive 22) src/BrimDeck/Native/WindowsHost.cs:219 — WindowsHost.TopmostCover has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.DeviceRow (cognitive 22) · ×1
  • SettingsWindow.DeviceRow (cognitive 22) src/BrimDeck/SettingsDevices.cs:170 — SettingsWindow.DeviceRow has cognitive complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to 4 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 · LyricsService.FindApple (cognitive 21) · ×1
  • LyricsService.FindApple (cognitive 21) src/BrimDeck.Core/AppleMusicLyrics.cs:33 — LyricsService.FindApple has cognitive complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 3 function literals 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 · CompactSpacing.ShareFlowing (cognitive 21) · ×1
  • CompactSpacing.ShareFlowing (cognitive 21) src/BrimDeck.Core/CompactSpacing.cs:160 — CompactSpacing.ShareFlowing has cognitive 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.
D2 · Cognitive Complexity · CursorPrices.Update (cognitive 21) · ×1
  • CursorPrices.Update (cognitive 21) src/BrimDeck.Core/CursorPrices.cs:90 — CursorPrices.Update has cognitive complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs 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 · ExpandedLayout.PlaceMetrics (cognitive 21) · ×1
  • ExpandedLayout.PlaceMetrics (cognitive 21) src/BrimDeck.Core/ExpandedLayout.cs:351 — ExpandedLayout.PlaceMetrics has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KimiUsage.Usages (cognitive 21) · ×1
  • KimiUsage.Usages (cognitive 21) src/BrimDeck.Core/KimiUsage.cs:234 — KimiUsage.Usages has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QuotaParser.Codex (cognitive 21) · ×1
  • QuotaParser.Codex (cognitive 21) src/BrimDeck.Core/LogReader.cs:308 — QuotaParser.Codex has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShelfLayout.For (cognitive 21) · ×1
  • ShelfLayout.For (cognitive 21) src/BrimDeck.Core/Shelf.cs:530 — ShelfLayout.For has cognitive complexity 21 (threshold 15). 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 · UsageService.ReadMiMoLinkedAsync (cognitive 21) · ×1
  • UsageService.ReadMiMoLinkedAsync (cognitive 21) src/BrimDeck.Core/UsageService.cs:1499 — UsageService.ReadMiMoLinkedAsync has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ZCodeUsage.ReadAccount (cognitive 21) · ×1
  • ZCodeUsage.ReadAccount (cognitive 21) src/BrimDeck.Core/ZCodeUsage.cs:31 — ZCodeUsage.ReadAccount has cognitive complexity 21 (threshold 15). Of this number, 20 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, 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 · MonitorStrip.MonitorStrip.ctor (cognitive 21) · ×1
  • MonitorStrip.MonitorStrip.ctor (cognitive 21) src/BrimDeck/MonitorStrip.cs:59 — MonitorStrip.MonitorStrip.ctor has cognitive complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 3 function literals 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 · CpuTopology.Classify (cognitive 21) · ×1
  • CpuTopology.Classify (cognitive 21) src/BrimDeck/Native/CpuProvider.cs:263 — CpuTopology.Classify has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KugouInstall.Find (cognitive 21) · ×1
  • KugouInstall.Find (cognitive 21) src/BrimDeck/Native/KugouInstall.cs:20 — KugouInstall.Find has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResizeGripLayer.OnRender (cognitive 21) · ×1
  • ResizeGripLayer.OnRender (cognitive 21) src/BrimDeck/ResizeGripLayer.cs:128 — ResizeGripLayer.OnRender has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.ExpandedSketch (cognitive 21) · ×1
  • SettingsWindow.ExpandedSketch (cognitive 21) src/BrimDeck/SettingsMonitorExpanded.cs:278 — SettingsWindow.ExpandedSketch has cognitive complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs 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 · SettingsWindow.PartRow (cognitive 21) · ×1
  • SettingsWindow.PartRow (cognitive 21) src/BrimDeck/SettingsMusic.cs:78 — SettingsWindow.PartRow has cognitive complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 93). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SettingsWindow.WorkBuddyDetails (cognitive 21) · ×1
  • SettingsWindow.WorkBuddyDetails (cognitive 21) src/BrimDeck/SettingsWorkBuddy.cs:19 — SettingsWindow.WorkBuddyDetails has cognitive complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 59, Open, a function literal at line 77). 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 · AppendedLines.Read (cognitive 20) · ×1
  • AppendedLines.Read (cognitive 20) src/BrimDeck.Core/AppendedLines.cs:19 — AppendedLines.Read has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PairingHost.AcceptAsync (cognitive 20) · ×1
  • PairingHost.AcceptAsync (cognitive 20) src/BrimDeck.Core/ClipboardSync/LanClipboardPairing.cs:93 — PairingHost.AcceptAsync has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MediaPlaybackStack.Update (cognitive 20) · ×1
  • MediaPlaybackStack.Update (cognitive 20) src/BrimDeck.Core/MediaPlaybackStack.cs:37 — MediaPlaybackStack.Update has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs 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 · PanelThemes.FileProblem (cognitive 20) · ×1
  • PanelThemes.FileProblem (cognitive 20) src/BrimDeck.Core/PanelThemes.Files.cs:78 — PanelThemes.FileProblem has cognitive complexity 20 (threshold 15). 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 · SettingsMigrations.To1_3_0 (cognitive 20) · ×1
  • SettingsMigrations.To1_3_0 (cognitive 20) src/BrimDeck.Core/SettingsMigrations.cs:89 — SettingsMigrations.To1_3_0 has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs 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 · StripAdmission.Update (cognitive 20) · ×1
  • StripAdmission.Update (cognitive 20) src/BrimDeck.Core/StripPresence.cs:112 — StripAdmission.Update has cognitive complexity 20 (threshold 15). 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 · UsageService.ReadCursorDay (cognitive 20) · ×1
  • UsageService.ReadCursorDay (cognitive 20) src/BrimDeck.Core/UsageService.cs:1010 — UsageService.ReadCursorDay has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UsageService.ReadKimiAsync (cognitive 20) · ×1
  • UsageService.ReadKimiAsync (cognitive 20) src/BrimDeck.Core/UsageService.cs:1655 — UsageService.ReadKimiAsync has cognitive complexity 20 (threshold 15). 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 · App.UpdateSettings (cognitive 20) · ×1
  • App.UpdateSettings (cognitive 20) src/BrimDeck/App.xaml.cs:243 — App.UpdateSettings has cognitive complexity 20 (threshold 15). 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 · DevicesView.OnRender (cognitive 20) · ×1
  • DevicesView.OnRender (cognitive 20) src/BrimDeck/DevicesView.cs:195 — DevicesView.OnRender has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.ResizeFromKeyboard (cognitive 20) · ×1
  • MainWindow.ResizeFromKeyboard (cognitive 20) src/BrimDeck/MainWindow.Resize.cs:339 — MainWindow.ResizeFromKeyboard has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PowerBlock.TableView (cognitive 20) · ×1
  • PowerBlock.TableView (cognitive 20) src/BrimDeck/MonitorPower.cs:133 — PowerBlock.TableView has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AmdDriver.Sample (cognitive 20) · ×1
  • AmdDriver.Sample (cognitive 20) src/BrimDeck/Native/GpuDrivers.cs:235 — AmdDriver.Sample has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HidBatteries.ApplyEvents (cognitive 20) · ×1
  • HidBatteries.ApplyEvents (cognitive 20) src/BrimDeck/Native/HidBatteries.cs:125 — HidBatteries.ApplyEvents has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HidBatteries.Family (cognitive 20) · ×1
  • HidBatteries.Family (cognitive 20) src/BrimDeck/Native/HidBatteries.cs:961 — HidBatteries.Family has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MiMoAccount.WaitAsync (cognitive 20) · ×1
  • MiMoAccount.WaitAsync (cognitive 20) src/BrimDeck/Native/MiMoAccount.cs:126 — MiMoAccount.WaitAsync has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonitorBridgeReader.HwInfo (cognitive 20) · ×1
  • MonitorBridgeReader.HwInfo (cognitive 20) src/BrimDeck/Native/MonitorBridgeReader.cs:59 — MonitorBridgeReader.HwInfo has cognitive complexity 20 (threshold 15). 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 · TaskbarMirror.Covered (cognitive 20) · ×1
  • TaskbarMirror.Covered (cognitive 20) src/BrimDeck/Native/TaskbarMirror.cs:101 — TaskbarMirror.Covered has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.RenderUsage (cognitive 20) · ×1
  • MainWindow.RenderUsage (cognitive 20) src/BrimDeck/UsagePanel.cs:170 — MainWindow.RenderUsage has cognitive complexity 20 (threshold 15). 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 · AntigravityUsage.Parse (cognitive 19) · ×1
  • AntigravityUsage.Parse (cognitive 19) src/BrimDeck.Core/AntigravityUsage.cs:89 — AntigravityUsage.Parse has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AsusStrixGo.Battery (cognitive 19) · ×1
  • AsusStrixGo.Battery (cognitive 19) src/BrimDeck.Core/Brands/AsusStrixGo.cs:20 — AsusStrixGo.Battery has cognitive complexity 19 (threshold 15). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 20). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · CreditHours.Parse (cognitive 19) · ×1
  • CreditHours.Parse (cognitive 19) src/BrimDeck.Core/CodeAgentUsage.cs:120 — CreditHours.Parse has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompactSpacing.Arrange (cognitive 19) · ×1
  • CompactSpacing.Arrange (cognitive 19) src/BrimDeck.Core/CompactSpacing.cs:31 — CompactSpacing.Arrange has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dongles.MchoseReads (cognitive 19) · ×1
  • Dongles.MchoseReads (cognitive 19) src/BrimDeck.Core/DeviceProtocols.cs:822 — Dongles.MchoseReads has cognitive complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · CompactMusicLayout.Calculate (cognitive 19) · ×1
  • CompactMusicLayout.Calculate (cognitive 19) src/BrimDeck.Core/Music.cs:248 — CompactMusicLayout.Calculate has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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 · PortableUpdate.Apply (cognitive 19) · ×1
  • PortableUpdate.Apply (cognitive 19) src/BrimDeck.Core/PortableUpdate.cs:68 — PortableUpdate.Apply has cognitive complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · LyricsService.Unescape (cognitive 19) · ×1
  • LyricsService.Unescape (cognitive 19) src/BrimDeck.Core/QueMusicLyrics.cs:111 — LyricsService.Unescape has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ScriptSession.RunMiMoAsync (cognitive 19) · ×1
  • ScriptSession.RunMiMoAsync (cognitive 19) src/BrimDeck.Core/ScriptProvider.cs:277 — ScriptSession.RunMiMoAsync has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClipboardSyncService.Apply (cognitive 19) · ×1
  • ClipboardSyncService.Apply (cognitive 19) src/BrimDeck/ClipboardSyncService.cs:217 — ClipboardSyncService.Apply has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ClockFace.Layout (cognitive 19) · ×1
  • ClockFace.Layout (cognitive 19) src/BrimDeck/ClockFace.cs:124 — ClockFace.Layout has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.UpdateMusicTimer (cognitive 19) · ×1
  • MainWindow.UpdateMusicTimer (cognitive 19) src/BrimDeck/MainWindow.Music.cs:1413 — MainWindow.UpdateMusicTimer has cognitive complexity 19 (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.
D2 · Cognitive Complexity · MainWindow.MoveMusicDrag (cognitive 19) · ×1
  • MainWindow.MoveMusicDrag (cognitive 19) src/BrimDeck/MainWindow.MusicGestures.cs:59 — MainWindow.MoveMusicDrag has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.ClipRow (cognitive 19) · ×1
  • MainWindow.ClipRow (cognitive 19) src/BrimDeck/MainWindow.Shelf.cs:688 — MainWindow.ClipRow has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.AttachFileDrag (cognitive 19) · ×1
  • MainWindow.AttachFileDrag (cognitive 19) src/BrimDeck/MainWindow.Shelf.cs:990 — MainWindow.AttachFileDrag has cognitive complexity 19 (threshold 15). None of this is in the body itself: all 19 points belong to 5 function literals inside it that branch (lines 999, 994, 995, …). 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 · MainWindow.DetailView (cognitive 19) · ×1
  • MainWindow.DetailView (cognitive 19) src/BrimDeck/MainWindow.ShelfDetail.cs:263 — MainWindow.DetailView has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.ShowModelPopup (cognitive 19) · ×1
  • MainWindow.ShowModelPopup (cognitive 19) src/BrimDeck/ModelDetails.cs:200 — MainWindow.ShowModelPopup has cognitive complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 237, 223, 236, …). 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 · AppleBatteries.Received (cognitive 19) · ×1
  • AppleBatteries.Received (cognitive 19) src/BrimDeck/Native/AppleBatteries.cs:105 — AppleBatteries.Received has cognitive complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 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 · HidppEvents.Run (cognitive 19) · ×1
  • HidppEvents.Run (cognitive 19) src/BrimDeck/Native/HidppEvents.cs:48 — HidppEvents.Run has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KugouInstall.CloseAsync (cognitive 19) · ×1
  • KugouInstall.CloseAsync (cognitive 19) src/BrimDeck/Native/KugouInstall.cs:130 — KugouInstall.CloseAsync has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PowerProvider.ReadGpus (cognitive 19) · ×1
  • PowerProvider.ReadGpus (cognitive 19) src/BrimDeck/Native/PowerSensors.cs:89 — PowerProvider.ReadGpus has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrayIcon.CreateMenu (cognitive 19) · ×1
  • TrayIcon.CreateMenu (cognitive 19) src/BrimDeck/Native/TrayIcon.cs:95 — TrayIcon.CreateMenu has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsWindow.AttachDrag (cognitive 19) · ×1
  • SettingsWindow.AttachDrag (cognitive 19) src/BrimDeck/SettingsApplications.cs:134 — SettingsWindow.AttachDrag has cognitive complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 170, 166, 176, …). 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 · SettingsWindow.ModelPrices (cognitive 19) · ×1
  • SettingsWindow.ModelPrices (cognitive 19) src/BrimDeck/SettingsPricing.cs:30 — SettingsWindow.ModelPrices has cognitive complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 39, 63, 79, …). 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 · SettingsWindow.OffPeakDetails (cognitive 19) · ×1
  • SettingsWindow.OffPeakDetails (cognitive 19) src/BrimDeck/SettingsProviders.cs:682 — SettingsWindow.OffPeakDetails has cognitive complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 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 · SyncCodeBox.OnKeyDown (cognitive 19) · ×1
  • SyncCodeBox.OnKeyDown (cognitive 19) src/BrimDeck/SyncCodeBox.cs:54 — SyncCodeBox.OnKeyDown has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs 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 · Renderer.RunAsync (cognitive 19) · ×1
  • Renderer.RunAsync (cognitive 19) scripts/readme-media/Program.cs:97 — Renderer.RunAsync has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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 · AudioTags.Read (cognitive 18) · ×1
  • AudioTags.Read (cognitive 18) src/BrimDeck.Core/AudioTags.cs:23 — AudioTags.Read has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WeTypeSyncClient.PairAsync (cognitive 18) · ×1
  • WeTypeSyncClient.PairAsync (cognitive 18) src/BrimDeck.Core/ClipboardSync/WeTypeSyncClient.cs:109 — WeTypeSyncClient.PairAsync has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs 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 · Asus.Reply (cognitive 18) · ×1
  • Asus.Reply (cognitive 18) src/BrimDeck.Core/DeviceProtocols.cs:1433 — Asus.Reply has cognitive complexity 18 (threshold 15). 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 · QuotaParser.Claude (cognitive 18) · ×1
  • QuotaParser.Claude (cognitive 18) src/BrimDeck.Core/LogReader.cs:325 — QuotaParser.Claude has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelThemes.ClockProblem (cognitive 18) · ×1
  • PanelThemes.ClockProblem (cognitive 18) src/BrimDeck.Core/PanelThemes.Files.cs:124 — PanelThemes.ClockProblem has cognitive complexity 18 (threshold 15). Of this number, 17 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 · PanelThemes.AppendNight (cognitive 18) · ×1
  • PanelThemes.AppendNight (cognitive 18) REDACTED:72 — PanelThemes.AppendNight has cognitive complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · LyricsService.ReadQueMusicLatest (cognitive 18) · ×1
  • LyricsService.ReadQueMusicLatest (cognitive 18) src/BrimDeck.Core/QueMusicLyrics.cs:66 — LyricsService.ReadQueMusicLatest has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UsageService.ReadMiMoAsync (cognitive 18) · ×1
  • UsageService.ReadMiMoAsync (cognitive 18) src/BrimDeck.Core/UsageService.cs:1388 — UsageService.ReadMiMoAsync has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.RenderShelf (cognitive 18) · ×1
  • MainWindow.RenderShelf (cognitive 18) src/BrimDeck/MainWindow.Shelf.cs:178 — MainWindow.RenderShelf has cognitive complexity 18 (threshold 15). 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 · FigureGauge.OnRender (cognitive 18) · ×1
  • FigureGauge.OnRender (cognitive 18) src/BrimDeck/MonitorGauges.cs:197 — FigureGauge.OnRender has cognitive complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong 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 · BlockGauge.OnRender (cognitive 18) · ×1
  • BlockGauge.OnRender (cognitive 18) src/BrimDeck/MonitorGauges.cs:546 — BlockGauge.OnRender has cognitive complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 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 · ProcessListView.Set (cognitive 18) · ×1
  • ProcessListView.Set (cognitive 18) src/BrimDeck/MonitorProcesses.cs:94 — ProcessListView.Set has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonitorStrip.Draw (cognitive 18) · ×1
  • MonitorStrip.Draw (cognitive 18) src/BrimDeck/MonitorStrip.cs:311 — MonitorStrip.Draw has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonitorStrip.Figures (cognitive 18) · ×1
  • MonitorStrip.Figures (cognitive 18) src/BrimDeck/MonitorStrip.cs:436 — MonitorStrip.Figures has cognitive complexity 18 (threshold 15). 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 · AppIdentity.FindImage (cognitive 18) · ×1
  • AppIdentity.FindImage (cognitive 18) src/BrimDeck/Native/AppIdentity.cs:74 — AppIdentity.FindImage has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KugouCdpConnection.EvaluateAsync (cognitive 18) · ×1
  • KugouCdpConnection.EvaluateAsync (cognitive 18) src/BrimDeck/Native/KugouCdpConnection.cs:179 — KugouCdpConnection.EvaluateAsync has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaSessions.CommandAsync (cognitive 18) · ×1
  • MediaSessions.CommandAsync (cognitive 18) src/BrimDeck/Native/MediaSessions.cs:701 — MediaSessions.CommandAsync has cognitive complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 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 · NeteaseCdpConnection.SuperviseAsync (cognitive 18) · ×1
  • NeteaseCdpConnection.SuperviseAsync (cognitive 18) src/BrimDeck/Native/NeteaseCdpConnection.cs:33 — NeteaseCdpConnection.SuperviseAsync has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PanelLook.PublishTo (cognitive 18) · ×1
  • PanelLook.PublishTo (cognitive 18) src/BrimDeck/PanelTheme.cs:269 — PanelLook.PublishTo has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShelfViewPreview.Create (cognitive 18) · ×1
  • ShelfViewPreview.Create (cognitive 18) src/BrimDeck/ShelfViewPreview.cs:26 — ShelfViewPreview.Create has cognitive complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · AntigravityUsage.Read (cognitive 17) · ×1
  • AntigravityUsage.Read (cognitive 17) src/BrimDeck.Core/AntigravityUsage.cs:51 — AntigravityUsage.Read has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs 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 · DoubaoSyncClient.ReadText (cognitive 17) · ×1
  • DoubaoSyncClient.ReadText (cognitive 17) src/BrimDeck.Core/ClipboardSync/DoubaoSyncClient.cs:240 — DoubaoSyncClient.ReadText has cognitive complexity 17 (threshold 15). 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 · WeTypeSyncClient.InitializeAsync (cognitive 17) · ×1
  • WeTypeSyncClient.InitializeAsync (cognitive 17) src/BrimDeck.Core/ClipboardSync/WeTypeSyncClient.cs:73 — WeTypeSyncClient.InitializeAsync has cognitive complexity 17 (threshold 15). 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 · SteelSeriesMice.Battery (cognitive 17) · ×1
  • SteelSeriesMice.Battery (cognitive 17) src/BrimDeck.Core/DeviceProtocols.cs:1539 — SteelSeriesMice.Battery has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Yaml.Parse (cognitive 17) · ×1
  • Yaml.Parse (cognitive 17) src/BrimDeck.Core/DshUsage.cs:80 — Yaml.Parse has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LyricsService.FindKugou (cognitive 17) · ×1
  • LyricsService.FindKugou (cognitive 17) src/BrimDeck.Core/KugouLyrics.cs:11 — LyricsService.FindKugou has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelThemes.ValueEnd (cognitive 17) · ×1
  • PanelThemes.ValueEnd (cognitive 17) src/BrimDeck.Core/PanelThemes.Draft.cs:153 — PanelThemes.ValueEnd has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelThemes.LayerProblem (cognitive 17) · ×1
  • PanelThemes.LayerProblem (cognitive 17) src/BrimDeck.Core/PanelThemes.Files.cs:103 — PanelThemes.LayerProblem has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PowerResolver.Resolve (cognitive 17) · ×1
  • PowerResolver.Resolve (cognitive 17) src/BrimDeck.Core/Power.cs:65 — PowerResolver.Resolve has cognitive complexity 17 (threshold 15). 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 · UsageService.MergeClaude (cognitive 17) · ×1
  • UsageService.MergeClaude (cognitive 17) src/BrimDeck.Core/UsageService.cs:659 — UsageService.MergeClaude has cognitive complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 3 function literals 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 · ClipboardSyncService.RunLanAsync (cognitive 17) · ×1
  • ClipboardSyncService.RunLanAsync (cognitive 17) src/BrimDeck/ClipboardSyncService.Lan.cs:79 — ClipboardSyncService.RunLanAsync has cognitive complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals 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 · DeviceStrip.OnRender (cognitive 17) · ×1
  • DeviceStrip.OnRender (cognitive 17) src/BrimDeck/DeviceStrip.cs:58 — DeviceStrip.OnRender has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DevicesView.Update (cognitive 17) · ×1
  • DevicesView.Update (cognitive 17) src/BrimDeck/DevicesView.cs:70 — DevicesView.Update has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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 · MainWindow.ClipEmpty (cognitive 17) · ×1
  • MainWindow.ClipEmpty (cognitive 17) src/BrimDeck/MainWindow.Shelf.cs:333 — MainWindow.ClipEmpty has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MainWindow.DeckCardFor (cognitive 17) · ×1
  • MainWindow.DeckCardFor (cognitive 17) src/BrimDeck/MainWindow.ShelfArrange.cs:302 — MainWindow.DeckCardFor has cognitive complexity 17 (threshold 15). 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 · MainWindow.FileTile (cognitive 17) · ×1
  • MainWindow.FileTile (cognitive 17) src/BrimDeck/MainWindow.ShelfViews.cs:185 — MainWindow.FileTile has cognitive complexity 17 (threshold 15). 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 · MainWindow.ModelApplicationFilter (cognitive 17) · ×1
  • MainWindow.ModelApplicationFilter (cognitive 17) src/BrimDeck/ModelDetails.cs:93 — MainWindow.ModelApplicationFilter has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainWindow.RenderMonitor (cognitive 17) · ×1
  • MainWindow.RenderMonitor (cognitive 17) src/BrimDeck/MonitorPanel.cs:198 — MainWindow.RenderMonitor has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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 · MusicControlButton.UpdateState (cognitive 17) · ×1
  • MusicControlButton.UpdateState (cognitive 17) src/BrimDeck/MusicControls.cs:40 — MusicControlButton.UpdateState has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GattBattery.PollAsync (cognitive 17) · ×1
  • GattBattery.PollAsync (cognitive 17) src/BrimDeck/Native/BluetoothBatteries.cs:380 — GattBattery.PollAsync has cognitive complexity 17 (threshold 15). 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 · DesktopSources.FindAntigravityAsync (cognitive 17) · ×1
  • DesktopSources.FindAntigravityAsync (cognitive 17) src/BrimDeck/Native/DesktopSources.cs:136 — DesktopSources.FindAntigravityAsync has cognitive complexity 17 (threshold 15). 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 into named stages: move each independent 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 · DoubaoBrowserLogin.CallAsync (cognitive 17) · ×1
  • DoubaoBrowserLogin.CallAsync (cognitive 17) src/BrimDeck/Native/DoubaoBrowserLogin.cs:106 — DoubaoBrowserLogin.CallAsync has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HidBatteries.ListUnread (cognitive 17) · ×1
  • HidBatteries.ListUnread (cognitive 17) src/BrimDeck/Native/HidBatteries.cs:593 — HidBatteries.ListUnread has cognitive complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 3 function literals 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 · HidBatteries.ReadRazer (cognitive 17) · ×1
  • HidBatteries.ReadRazer (cognitive 17) src/BrimDeck/Native/HidBatteries.cs:676 — HidBatteries.ReadRazer has cognitive complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HidBatteries.ReadHeadset (cognitive 17) · ×1
  • HidBatteries.ReadHeadset (cognitive 17) src/BrimDeck/Native/HidBatteries.cs:722 — HidBatteries.ReadHeadset has cognitive complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · HidBatteries.Aula (cognitive 17) · ×1
  • HidBatteries.Aula (cognitive 17) src/BrimDeck/Native/HidBatteries.cs:876 — HidBatteries.Aula has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PowerProvider.Sample (cognitive 17) · ×1
  • PowerProvider.Sample (cognitive 17) src/BrimDeck/Native/PowerSensors.cs:62 — PowerProvider.Sample has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. 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 · SettingsWindow.ExceptionsContent (cognitive 17) · ×1
  • SettingsWindow.ExceptionsContent (cognitive 17) src/BrimDeck/SettingsFullscreen.cs:69 — SettingsWindow.ExceptionsContent has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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 · MainWindow.Segmented (cognitive 17) · ×1
  • MainWindow.Segmented (cognitive 17) src/BrimDeck/UsagePanel.cs:244 — MainWindow.Segmented has cognitive complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals 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 · AntigravityUsage.Fields (cognitive 16) · ×1
  • AntigravityUsage.Fields (cognitive 16) src/BrimDeck.Core/AntigravityUsage.cs:174 — AntigravityUsage.Fields has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ApplicationVersion.Compare (cognitive 16) · ×1
  • ApplicationVersion.Compare (cognitive 16) src/BrimDeck.Core/ApplicationVersion.cs:23 — ApplicationVersion.Compare has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DoubaoSyncClient.ReadImage (cognitive 16) · ×1
  • DoubaoSyncClient.ReadImage (cognitive 16) src/BrimDeck.Core/ClipboardSync/DoubaoSyncClient.cs:213 — DoubaoSyncClient.ReadImage has cognitive complexity 16 (threshold 15). 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 · CommandCodeUsage.Parse (cognitive 16) · ×1
  • CommandCodeUsage.Parse (cognitive 16) src/BrimDeck.Core/CommandCodeUsage.cs:128 — CommandCodeUsage.Parse has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dongles.Shadowed (cognitive 16) · ×1
  • Dongles.Shadowed (cognitive 16) src/BrimDeck.Core/DeviceProtocols.cs:1125 — Dongles.Shadowed has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 1133, 1128, 1128, …). 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 · DisplayLayout.Arrange (cognitive 16) · ×1
  • DisplayLayout.Arrange (cognitive 16) src/BrimDeck.Core/DisplayLayout.cs:20 — DisplayLayout.Arrange has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DshSessions.FrameLength (cognitive 16) · ×1
  • DshSessions.FrameLength (cognitive 16) src/BrimDeck.Core/DshSessions.cs:199 — DshSessions.FrameLength has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GpuCounters.Sum (cognitive 16) · ×1
  • GpuCounters.Sum (cognitive 16) src/BrimDeck.Core/GpuAdapters.cs:50 — GpuCounters.Sum has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MiMoUsage.Merge (cognitive 16) · ×1
  • MiMoUsage.Merge (cognitive 16) src/BrimDeck.Core/MiMoUsage.cs:72 — MiMoUsage.Merge has cognitive complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals 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 · Pricing.ParseOfficial (cognitive 16) · ×1
  • Pricing.ParseOfficial (cognitive 16) src/BrimDeck.Core/Pricing.cs:262 — Pricing.ParseOfficial has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Pricing.FindAntigravityBase (cognitive 16) · ×1
  • Pricing.FindAntigravityBase (cognitive 16) src/BrimDeck.Core/Pricing.cs:533 — Pricing.FindAntigravityBase has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResizeGrips.Panel (cognitive 16) · ×1
  • ResizeGrips.Panel (cognitive 16) src/BrimDeck.Core/ResizeGrips.cs:16 — ResizeGrips.Panel has cognitive complexity 16 (threshold 15). 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 · StripPresence.Set (cognitive 16) · ×1
  • StripPresence.Set (cognitive 16) src/BrimDeck.Core/StripPresence.cs:16 — StripPresence.Set has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QuotaLevels.Update (cognitive 16) · ×1
  • QuotaLevels.Update (cognitive 16) src/BrimDeck.Core/UsageLastSeen.cs:270 — QuotaLevels.Update has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UsageService.ReadGrokBotAsync (cognitive 16) · ×1
  • UsageService.ReadGrokBotAsync (cognitive 16) src/BrimDeck.Core/UsageService.cs:766 — UsageService.ReadGrokBotAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkBuddyUsage.KindTimesAsync (cognitive 16) · ×1
  • WorkBuddyUsage.KindTimesAsync (cognitive 16) src/BrimDeck.Core/WorkBuddyUsage.cs:185 — WorkBuddyUsage.KindTimesAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ZCodeUsage.StartPlan (cognitive 16) · ×1
  • ZCodeUsage.StartPlan (cognitive 16) src/BrimDeck.Core/ZCodeUsage.cs:127 — ZCodeUsage.StartPlan has cognitive complexity 16 (threshold 15). Of this number, 14 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 · App.ReleaseUnused (cognitive 16) · ×1
  • App.ReleaseUnused (cognitive 16) src/BrimDeck/App.Memory.cs:112 — App.ReleaseUnused has cognitive complexity 16 (threshold 15). 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 · InkCentredText.InkSpan (cognitive 16) · ×1
  • InkCentredText.InkSpan (cognitive 16) src/BrimDeck/InkCentredText.cs:94 — InkCentredText.InkSpan has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MainWindow.ClipContent (cognitive 16) · ×1
  • MainWindow.ClipContent (cognitive 16) src/BrimDeck/MainWindow.Shelf.cs:738 — MainWindow.ClipContent has cognitive complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function literal 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 · HidBatteries.RealtekAsk (cognitive 16) · ×1
  • HidBatteries.RealtekAsk (cognitive 16) src/BrimDeck/Native/HidBatteries.cs:1341 — HidBatteries.RealtekAsk has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaSessions.ReadCoverAsync (cognitive 16) · ×1
  • MediaSessions.ReadCoverAsync (cognitive 16) src/BrimDeck/Native/MediaSessions.cs:518 — MediaSessions.ReadCoverAsync has cognitive complexity 16 (threshold 15). 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 · NeteaseSource.EnableFullControlAsync (cognitive 16) · ×1
  • NeteaseSource.EnableFullControlAsync (cognitive 16) src/BrimDeck/Native/NeteaseSource.cs:282 — NeteaseSource.EnableFullControlAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeteaseSource.MaintainFile (cognitive 16) · ×1
  • NeteaseSource.MaintainFile (cognitive 16) src/BrimDeck/Native/NeteaseSource.cs:345 — NeteaseSource.MaintainFile has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 353). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · PdhQuery.Read (cognitive 16) · ×1
  • PdhQuery.Read (cognitive 16) src/BrimDeck/Native/PdhQuery.cs:54 — PdhQuery.Read has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhoneLinkBatteries.Read (cognitive 16) · ×1
  • PhoneLinkBatteries.Read (cognitive 16) src/BrimDeck/Native/PhoneLinkBatteries.cs:65 — PhoneLinkBatteries.Read has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StorageReader.Volumes (cognitive 16) · ×1
  • StorageReader.Volumes (cognitive 16) src/BrimDeck/Native/StorageReader.cs:143 — StorageReader.Volumes has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PopupMotion.Prepare (cognitive 16) · ×1
  • PopupMotion.Prepare (cognitive 16) src/BrimDeck/PopupMotion.cs:63 — PopupMotion.Prepare has cognitive complexity 16 (threshold 15). None of this is in the body itself: all 16 points belong to 4 function literals inside it that branch (lines 66, 83, 102, …). 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 · CpuReader.CpuReader.ctor (cognitive 16) · ×1
  • CpuReader.CpuReader.ctor (cognitive 16) src/BrimDeck.Sensors/CpuReader.cs:30 — CpuReader.CpuReader.ctor has cognitive complexity 16 (threshold 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. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: DeckSettings src/BrimDeck.Core/Settings.cs — ClassTooLong — 479 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 79 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/BrimDeck/SettingsMonitor.cs:678 — src/BrimDeck/SettingsMonitor.cs:678-693 | src/BrimDeck/SettingsMusic.cs:570-583 | src/BrimDeck/SettingsShelf.cs:23-38 | src/BrimDeck/SettingsWindow.cs:615-634 — 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 (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) src/BrimDeck.Core/DshSessions.cs:44 — src/BrimDeck.Core/DshSessions.cs:44-86 | src/BrimDeck.Core/KimiSessions.cs:40-85 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) src/BrimDeck/SettingsAppLists.cs:15 — src/BrimDeck/SettingsAppLists.cs:15-54 | src/BrimDeck/SettingsFullscreen.cs:70-138 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) src/BrimDeck/MainWindow.Shelf.cs:1130 — src/BrimDeck/MainWindow.Shelf.cs:1130-1151 | src/BrimDeck/MainWindow.ShelfSelect.cs:53-73 — 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 (68 corresponding lines) · ×1
  • Edited copy of a member (68 corresponding lines) src/BrimDeck/SettingsMusic.cs:419 — src/BrimDeck/SettingsMusic.cs:419-487 | src/BrimDeck/SettingsMusic.cs:492-559 — These two members are one piece of code written twice and then edited apart: 68 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) · ×1
  • Edited copy of a member (16 corresponding lines) src/BrimDeck/SettingsMonitor.cs:247 — src/BrimDeck/SettingsMonitor.cs:247-262 | src/BrimDeck/SettingsMonitor.cs:266-283 — 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 (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) src/BrimDeck/Native/DoubaoBrowserLogin.cs:107 — src/BrimDeck/Native/DoubaoBrowserLogin.cs:107-127 | src/BrimDeck/Native/MiMoAccount.cs:180-199 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) src/BrimDeck/Native/FramePermission.cs:31 — src/BrimDeck/Native/FramePermission.cs:31-47 | src/BrimDeck/Native/LibcefFile.cs:92-106 | src/BrimDeck/Native/SensorSetup.cs:135-152 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 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 (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) src/BrimDeck/Native/HidBatteries.cs:1231 — src/BrimDeck/Native/HidBatteries.cs:1231-1240 | src/BrimDeck/Native/HidBatteries.cs:1364-1370 | src/BrimDeck/Native/HidBatteries.cs:1392-1398 | src/BrimDeck/Native/HidBatteries.cs:1401-1409 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) src/BrimDeck.Core/Brands/Lofree.cs:28 — src/BrimDeck.Core/Brands/Lofree.cs:28-32 | src/BrimDeck.Core/Brands/RkKeyboard.cs:28-33 | src/BrimDeck.Core/Brands/SonixQuery.cs:44-48 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 6+ corresponding lines) src/BrimDeck.Core/Brands/Aula.cs:22 — src/BrimDeck.Core/Brands/Aula.cs:22-28 | src/BrimDeck.Core/Brands/Darmoshark.cs:42-48 | src/BrimDeck.Core/Brands/Eweadn.cs:46-52 | src/BrimDeck.Core/Brands/Lofree.cs:20-25 | src/BrimDeck.Core/Brands/Pulsar.cs:19-26 | src/BrimDeck.Core/Brands/SonixQuery.cs:35-40 | src/BrimDeck.Core/Brands/SonyInzone.cs:21-27 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 1+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 1+ corresponding lines) src/BrimDeck.Core/Brands/AstroA50.cs:18 — src/BrimDeck.Core/Brands/AstroA50.cs:18-18 | src/BrimDeck.Core/Brands/AtkOfficial.cs:40-40 | src/BrimDeck.Core/Brands/Aula.cs:30-31 | src/BrimDeck.Core/Brands/Darmoshark.cs:34-35 | src/BrimDeck.Core/Brands/Pulsar.cs:28-28 | src/BrimDeck.Core/Brands/RazerHeadsets.cs:138-140 | src/BrimDeck.Core/Brands/VgnV108.cs:29-30 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 1 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, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) src/BrimDeck/SettingsMusic.cs:139 — src/BrimDeck/SettingsMusic.cs:139-144 | src/BrimDeck/SettingsProfiles.cs:356-361 | src/BrimDeck/SettingsWindow.cs:561-567 — 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, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) src/BrimDeck/SettingsMusic.cs:124 — src/BrimDeck/SettingsMusic.cs:124-127 | src/BrimDeck/SettingsProfiles.cs:303-306 | src/BrimDeck/SettingsWindow.cs:598-601 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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, 1+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 1+ corresponding lines) src/BrimDeck/Native/KugouCdpConnection.cs:279 — src/BrimDeck/Native/KugouCdpConnection.cs:279-279 | src/BrimDeck/Native/NeteaseCdpConnection.cs:240-240 | src/BrimDeck/Native/QqMediaConnection.cs:292-293 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 1 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 (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) src/BrimDeck/MainWindow.CompactColumn.cs:35 — src/BrimDeck/MainWindow.CompactColumn.cs:35-47 | src/BrimDeck/MainWindow.Music.cs:1176-1188 — 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, `src/BrimDeck/MainWindow.Music.cs:1189` calls `ShowsSummary`, `QuotaRings` and `src/BrimDeck/MainWindow.CompactColumn.cs:48` 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 (10 lines × 2) · ×1
  • Duplicated block (10 lines × 2) src/BrimDeck/MainWindow.ShelfViews.cs:534 — src/BrimDeck/MainWindow.ShelfViews.cs:534-543 | src/BrimDeck/MainWindow.ShelfViews.cs:646-655 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/MainWindow.ShelfViews.cs:534` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) src/BrimDeck/SettingsMusic.cs:151 — src/BrimDeck/SettingsMusic.cs:151-159 | src/BrimDeck/SettingsProfiles.cs:384-393 — 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 (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) src/BrimDeck/Native/FramePermission.cs:35 — src/BrimDeck/Native/FramePermission.cs:35-43 | src/BrimDeck/Native/LibcefFile.cs:94-102 | src/BrimDeck/Native/SensorSetup.cs:138-145 — 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 `src/BrimDeck/Native/FramePermission.cs:35` 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 (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) src/BrimDeck/SettingsMonitor.cs:681 — src/BrimDeck/SettingsMonitor.cs:681-686 | src/BrimDeck/SettingsMusic.cs:573-578 | src/BrimDeck/SettingsShelf.cs:26-31 | src/BrimDeck/SettingsWindow.cs:618-625 — 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 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/BrimDeck/SettingsMonitor.cs:681` 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 × 2) · ×1
  • Duplicated block (11 lines × 2) src/BrimDeck/Native/MediaAppWindows.cs:70 — src/BrimDeck/Native/MediaAppWindows.cs:70-80 | src/BrimDeck/Native/ProcessWindows.cs:80-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) scripts/readme-media/Program.cs:712 — scripts/readme-media/Program.cs:712-736 | scripts/readme-media/Program.cs:741-766 — 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 · Duplicated block (3–12 lines × 3) · ×1
  • Duplicated block (3–12 lines × 3) scripts/readme-media/Program.cs:1412 — scripts/readme-media/Program.cs:1412-1423 | scripts/readme-media/Program.cs:1551-1562 | scripts/readme-media/Program.cs:1713-1715 — 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. 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.
IC1 · Incompleteness & stubs · Fake-async · ×1
  • Fake-async — async method never awaits src/BrimDeck/Native/MediaSessions.cs:322 — `RefreshAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
P12 · CI test-gate honesty · Test failure does not fail the CI gate · ×1
  • Test failure does not fail the CI gate REDACTED:64 — `continue-on-error: true` lets the step or job that runs `dotnet run --project tests/BrimDeck.WindowsTests -c Release --no-build` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
X1 · Async correctness · Sync-over-async (deadlock risk) through `Task.WaitAll` · ×1
  • Sync-over-async (deadlock risk) through `Task.WaitAll` src/BrimDeck/App.xaml.cs:615 — `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead.
X1 · Async correctness · Blocking `File.ReadAllLines` inside an `async` method · ×1
  • Blocking `File.ReadAllLines` inside an `async` method src/BrimDeck/Native/MiMoAccount.cs:137 — `File.ReadAllLines` blocks the thread on I/O while `File.ReadAllLinesAsync` exists to wait without one — inside a method that is already `async`, await the twin.
X1 · Async correctness · Sync-over-async (deadlock risk) through `.Wait(…)` · ×1
  • Sync-over-async (deadlock risk) through `.Wait(…)` src/BrimDeck.Sensors/Program.cs:71 — `.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters).
X18 · Disposal-pattern correctness · Disposable created into a field and never released · ×1
  • Disposable created into a field and never released src/BrimDeck.Core/ScriptProvider.cs:23 — `_requests` (line 23) holds a `SemaphoreSlim` that `ScriptSession` creates itself with `new`, and nothing in `ScriptSession` ever releases it: the type is not `IDisposable`, declares no `Dispose`, and every other mention of `_requests` only reads through it. And `ScriptSession` is not a process-lifetime owner: `new ScriptSession(_http, entry, secret, now, deadline.Token, _memory.GetValue...` (ScriptProvider.cs line 407) creates one per call and drops it when the call returns, so each call strands one unreleased `SemaphoreSlim` (a timer that keeps firing, a handle, a socket) until finalization. Implement `IDisposable`, release `_requests` there and dispose the owner at that call site — or keep one owner for the process instead of one per call.
X2 · Cancellation propagation · Async local function without CancellationToken · ×1
  • Async local function without CancellationToken: DialAsync src/BrimDeck.Core/ClipboardSync/LanClipboardLink.cs:133 — Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
X2 · Cancellation propagation · Async delegate without CancellationToken · ×1
  • Async delegate without CancellationToken: Refresh src/BrimDeck/Native/AppleMusicControls.cs:35 — Queues or hands on an async lambda whose work calls something that takes a CancellationToken, while neither this method nor the delegate supplies one — that work can't be stopped early once started. Take a CancellationToken here and let the lambda capture it, or use a delegate that is handed one (`Func<CancellationToken, Task>`).
X29 · Per-element action decided by a fixed element · Per-element action decided by a fixed element · ×1
  • Per-element action decided by a fixed element src/BrimDeck.Core/CompactSpacing.cs:251 — This loop runs once per element of `lefts`, and the statement it guards acts on the element it is on — `lefts[i]`. The test deciding whether that statement runs does not: `right <= edge + 1e-6` reads `lefts[j]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts — the fixed one at line 246, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out.
Minor — 123 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×36
  • Duplicated predicate src/BrimDeck/Native/MediaAppWindows.cs:18 — `!IsWindowVisible(handle) || GetWindow(handle, GwOwner) != 0 || GetWindowTextLength(handle) == 0` appears character-identically in 2 files — src/BrimDeck/Native/MediaAppWindows.cs, src/BrimDeck/Native/ProcessWindows.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck.Core/DshSessions.cs:64 — `!_cache.TryGetValue(file, out var cached) || start < cached.Cutoff || info.Length < cached.Length || info.Length == cached.Length && info.La…` appears character-identically in 2 files — src/BrimDeck.Core/DshSessions.cs, src/BrimDeck.Core/KimiSessions.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/DevicesPanel.cs:136 — `!double.IsFinite(width) || !double.IsFinite(height)` appears character-identically in 4 files — src/BrimDeck/DevicesPanel.cs, src/BrimDeck/MainWindow.Shelf.cs, src/BrimDeck/MainWindow.ShelfArrange.cs, src/BrimDeck/MonitorPanel.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck.Core/MiMoUsage.cs:32 — `!string.IsNullOrWhiteSpace(xdgData) && Path.IsPathFullyQualified(xdgData)` appears character-identically in 2 files — src/BrimDeck.Core/MiMoUsage.cs, src/BrimDeck.Core/OpenCodeUsage.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/MainWindow.Hover.cs:33 — `Collapsed.Style == CompactStyle.Capsule && _frame.Edge != ScreenEdge.Top` appears character-identically in 2 files — src/BrimDeck/MainWindow.Hover.cs, src/BrimDeck/MainWindow.xaml.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck.Core/CodeAgentUsage.cs:9 — `ExpiresAt is { } expires && expires <= now` appears character-identically in 3 files — src/BrimDeck.Core/CodeAgentUsage.cs, src/BrimDeck.Core/KimiUsage.cs, src/BrimDeck.Core/OpenCodeUsage.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/SettingsApplications.cs:172 — `Keyboard.Modifiers != ModifierKeys.Alt || e.Key != Key.System || e.SystemKey is not (Key.Up or Key.Down)` appears character-identically in 2 files — src/BrimDeck/SettingsApplications.cs, src/BrimDeck/SettingsMonitorExpanded.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/MainWindow.CompactColumn.cs:33 — `Settings.ShowsMusic(EffectiveStyle) && _mediaTrack is { State: not MediaState.Stopped }` appears character-identically in 2 files — src/BrimDeck/MainWindow.CompactColumn.cs, src/BrimDeck/MainWindow.Music.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/MainWindow.CompactColumn.cs:47 — `Settings.ShowsSummary(EffectiveStyle) && !notice` appears character-identically in 2 files — src/BrimDeck/MainWindow.CompactColumn.cs, src/BrimDeck/MainWindow.Music.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/MainWindow.Shelf.cs:90 — `_expanded && !_pointerInside && !ShelfHolds` appears character-identically in 4 files — src/BrimDeck/MainWindow.Shelf.cs, src/BrimDeck/MainWindow.ShelfArrange.cs, src/BrimDeck/MainWindow.ShelfDetail.cs, src/BrimDeck/MainWindow.ShelfSelect.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/MainWindow.Shelf.cs:728 — `_flash is { } flash && flash.Id == clip.Id && flash.Until > Environment.TickCount64` appears character-identically in 2 files — src/BrimDeck/MainWindow.Shelf.cs, src/BrimDeck/MainWindow.ShelfViews.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck.Core/DshSessions.cs:55 — `_merged is not { } kept || kept.Start != start` appears character-identically in 2 files — src/BrimDeck.Core/DshSessions.cs, src/BrimDeck.Core/KimiSessions.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/MainWindow.ShelfDetail.cs:671 — `_picked.Contains(file.Id) && _picked.Count > 1` appears character-identically in 2 files — src/BrimDeck/MainWindow.ShelfDetail.cs, src/BrimDeck/MainWindow.ShelfViews.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck.Core/Brands/Alienware.cs:21 — `actual == page || actual == ((page & 0xFF) << 8 | page >> 8)` appears character-identically in 4 files — src/BrimDeck.Core/Brands/Alienware.cs, src/BrimDeck.Core/Brands/Lofree.cs, src/BrimDeck.Core/Brands/SonixQuery.cs, src/BrimDeck.Core/Brands/Urx.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/Native/CorsairReader.cs:26 — `collections.Count == 0 && _thread is null` appears character-identically in 2 files — src/BrimDeck/Native/CorsairReader.cs, src/BrimDeck/Native/PushEvents.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/MonitorDraw.cs:210 — `count < 3 || area.Width < 8 || area.Height < 4 || !(top > 0)` appears character-identically in 2 files — src/BrimDeck/MonitorDraw.cs, src/BrimDeck/PowerGlyphs.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/SettingsAppLists.cs:68 — `detail.Length > 0 && !string.Equals(detail, name, StringComparison.OrdinalIgnoreCase)` appears character-identically in 2 files — src/BrimDeck/SettingsAppLists.cs, src/BrimDeck/SettingsFullscreen.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/DeviceStrip.cs:91 — `device.Charging && device.Lowest is not null` appears character-identically in 2 files — src/BrimDeck/DeviceStrip.cs, src/BrimDeck/DevicesView.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck.Core/CollapsedGeometry.cs:235 — `double.IsFinite(pixelsPerDip) && pixelsPerDip > 0` appears character-identically in 2 files — src/BrimDeck.Core/CollapsedGeometry.cs, src/BrimDeck/RingLetter.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck.Core/MiMoUsage.cs:275 — `double.TryParse(row[i], NumberStyles.Float, CultureInfo.InvariantCulture, out var value) && double.IsFinite(value)` appears character-identically in 2 files — src/BrimDeck.Core/MiMoUsage.cs, src/BrimDeck.Core/OpenCodeUsage.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/MainWindow.ShelfDetail.cs:205 — `e.Key == Key.Enter && Keyboard.Modifiers.HasFlag(ModifierKeys.Control)` appears character-identically in 2 files — src/BrimDeck/MainWindow.ShelfDetail.cs, src/BrimDeck/SettingsShelf.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck.Core/MiMoUsage.cs:176 — `e.Time >= start && e.Time <= now && e.Total > 0` appears character-identically in 3 files — src/BrimDeck.Core/MiMoUsage.cs, src/BrimDeck.Core/OpenCodeUsage.cs, src/BrimDeck.Core/ZCodeUsage.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck.Core/DshSessions.cs:78 — `entry.Time >= start && entry.Time <= now && entry.Total > 0` appears character-identically in 2 files — src/BrimDeck.Core/DshSessions.cs, src/BrimDeck.Core/KimiSessions.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck/MainWindow.Shelf.cs:812 — `exists && ShelfFiles.IsFolder(file.Path)` appears character-identically in 2 files — src/BrimDeck/MainWindow.Shelf.cs, src/BrimDeck/MainWindow.ShelfViews.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/BrimDeck.Core/DshSessions.cs:67 — `info.Length != cached.Length || info.LastWriteTimeUtc != cached.Modified` appears character-identically in 3 files — src/BrimDeck.Core/DshSessions.cs, src/BrimDeck.Core/KimiSessions.cs, src/BrimDeck.Core/LogReader.cs. 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.
  • + 11 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×24
  • Silent fallback default in catch src/BrimDeck.Core/AntigravityUsage.cs:86 — `SafeFiles` swallows `Exception` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/AntigravityUsage.cs:152 — `Bytes` swallows `FormatException` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/AppleMusicLyrics.cs:169 — `AppleCacheFiles` swallows `Exception` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/AppUpdates.cs:308 — `SaveState` swallows `Exception` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/AudioTags.cs:194 — `Fill` swallows `EndOfStreamException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/ClaudeQuotaCache.cs:60 — `Entries` swallows `JsonException` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/DataLocations.cs:116 — `Left` swallows `Exception` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/KimiUsage.cs:137 — `Account` swallows `Exception` into `return "";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/KugouLyrics.cs:37 — `DownloadKugou` swallows `FormatException` into `return Lyrics.Empty;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/PanelThemes.Files.cs:71 — `InAddedOrder` swallows `Exception` into `return DateTime.MaxValue;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/PortableUpdate.cs:64 — `CanWrite` swallows `Exception` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/ScriptProvider.cs:388 — `ReadSecret` swallows `Exception` into `return "";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/SensorStops.cs:71 — `Parse` swallows `JsonException` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/SensorStops.cs:85 — `ParsePending` swallows `JsonException` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/Shelf.cs:158 — `LooksLikeCode` swallows `RegexMatchTimeoutException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/ShelfRules.cs:169 — `Search` swallows `RegexMatchTimeoutException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/UsageLastSeen.cs:187 — `Read` swallows `Exception` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck.Core/UsageService.cs:1120 — `CursorAccount` swallows `Exception` into `return "";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck/App.UpdateChecks.cs:42 — `CheckUpdatesIfDue` swallows `NetworkInformationException` and sets `online = false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck/DroppedFiles.cs:26 — `Paths` swallows `Exception` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck/MainWindow.MusicGestures.cs:126 — `TouchpadReversed` swallows `Exception` into `return true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck/Native/AppIdentity.cs:135 — `Resolve` swallows `COMException` into `return "";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck/Native/AppleBatteries.cs:72 — `Update` swallows every exception and sets `_watcher = null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch src/BrimDeck/Native/BluetoothBatteries.cs:368 — `Follow` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
D24 · Comment Value · redundant comment · ×23
  • redundant comment src/BrimDeck.Core/ClipboardExclusions.cs:8 — "The process name an entry names: the file name of a path, without ".exe"." repeats the code it sits on: 7 of its 8 words (process, name, entry, names, file, path, exe) are already in `public static string ProcessName(string entry)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck.Core/Devices.cs:336 — "The steady order: by kind, then by name, then by key." repeats the code it sits on: 4 of its 5 words (order, kind, name, key) are already in `public static IComparer<DeviceBattery> Order { get; } = Comparer<DeviceBattery>.Create((a, b) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck.Core/Devices.cs:585 — "The columns the devices take: the tiles' on a row, or the list's." repeats the code it sits on: 5 of its 6 words (columns, devices, tiles, row, list) are already in `public int Columns(int devices, double width) => Form switch`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck.Core/KimiUsage.cs:69 — "True for a kimi.ai host, false for a kimi.com one, null for any other or none." repeats the code it sits on: 7 of its 8 words (true, kimi, ai, host, false, com, null) are already in `private static bool? RegionOfHost(string? address)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck.Core/PanelThemes.Daylight.cs:21 — ""HH:mm" (or "H:mm") within a day, or null." repeats the code it sits on: 4 of its 4 words (hh, mm, day, null) are already in `public static TimeSpan? ParseTimeOfDay(string? text)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck.Core/Settings.cs:794 — "The saved width of the notch or the capsule, or the line's length." repeats the code it sits on: 5 of its 6 words (width, notch, capsule, line, length) are already in `public void SetCompactWidth(CompactStyle style, double width)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/AssemblyInfo.cs:4 — "where theme specific resource dictionaries are located" is Visual Studio AssemblyInfo template text, left in place. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/AssemblyInfo.cs:5 — "(used if a resource is not found in the page, or application resource dictionaries)" is Visual Studio AssemblyInfo template text, left in place. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/AssemblyInfo.cs:7 — "where the generic resource dictionary is located" is Visual Studio AssemblyInfo template text, left in place. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/AssemblyInfo.cs:8 — "(used if a resource is not found in the page, app, or any theme specific resource dictionaries)" is Visual Studio AssemblyInfo template text, left in place. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/MainWindow.ShelfViews.cs:460 — "The entry's own lines that have text: what its rows count as its lines." repeats the code it sits on: 4 of its 5 words (entry, lines, text, count) are already in `private static int TextLines(ClipEntry clip) => clip.Text.Replace("\r\n", "\n").Split('\n').Count(text => text.Trim().Le …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/Native/FrameRates.cs:262 — "The window's class name, read into the caller's buffer." repeats the code it sits on: 5 of its 6 words (window, class, name, read, buffer) are already in `private static ReadOnlySpan<char> ClassName(IntPtr window, Span<char> buffer) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/Native/HidBatteries.cs:659 — "Headsets.Channel: an interface, a usage page, or (VendorPages) any vendor-defined page." repeats the code it sits on: 7 of its 8 words (headsets, channel, interface, usage, page, vendor, pages) are already in `private static bool Matches(HidInfo info, (int Interface, int UsagePage) channel)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/Native/HidBatteries.cs:1713 — "A request; the reply's parameters, or TimeoutException, or HidppError." repeats the code it sits on: 7 of its 7 words (request, reply, parameters, timeout, exception, hidpp, error) are already in `public byte[] Request(byte index, byte feature, int function, byte[] parameters, int timeoutMs = TimeoutMs)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/Native/ProcessSnapshot.cs:13 — "Each process's parent and executable file name." repeats the code it sits on: 4 of its 5 words (process, parent, file, name) are already in `public static Dictionary<int, (int Parent, string File)> Read()`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/SettingsMonitorExpanded.cs:129 — "The text of a block or a row of the sketch, in the accent." repeats the code it sits on: 4 of its 5 words (text, block, sketch, accent) are already in `private static TextBlock SketchText(string name)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/SettingsWindow.cs:429 — "The surface's transparency (DeckSettings.SurfaceTransparency)." repeats the code it sits on: 4 of its 4 words (surface, transparency, deck, settings) are already in `var transparency = SliderRow(Loc.T("背景透明度", "Background transparency"), S.SurfaceTransparency, 0, DeckSettings.MaxSurfac …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/BrimDeck/ShelfViewPreview.cs:72 — "An icon with its name under it, both about the middle x." repeats the code it sits on: 3 of its 3 words (icon, name, middle) are already in `void Tile(double middle, double top, double icon, double name) { Icon(middle - icon / 2, top, icon); Bar(canvas, middle …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/BrimDeck.Tests/DaylightTests.cs:119 — "The settings keep "system", hours, or nothing." repeats the code it sits on: 4 of its 5 words (settings, keep, system, hours) are already in `check("The daylight setting keeps \"system\" and valid hours, and drops anything else",`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/BrimDeck.Tests/EqualizerSpectrumTests.cs:13 — "The mean level of each bar over the last seconds of the run." repeats the code it sits on: 5 of its 6 words (level, bar, last, seconds, run) are already in `private static double[] Averages(List<(double Time, double[] Levels)> run, double lastSeconds, int bars)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/BrimDeck.Tests/PixelBlocksTests.cs:54 — "Steps: whole device pixels, a half rounding up." repeats the code it sits on: 5 of its 6 words (whole, device, pixels, half, rounding) are already in `check("A pixel size is whole device pixels, at least one, a half rounding up",`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/BrimDeck.Tests/PowerTests.cs:68 — "Memory from its own meter is added; a zero memory meter is left out." repeats the code it sits on: 4 of its 5 words (memory, meter, added, zero) are already in `check("Power: memory with its own meter is added, a zero one is not", PowerResolver.Resolve(new PowerInputs { Cpu = W(10 …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/BrimDeck.Tests/PowerTests.cs:162 — "Battery saver and the power mode pass through." repeats the code it sits on: 4 of its 5 words (battery, saver, power, mode) are already in `var saver = BatteryModel.Build(new BatteryInputs([Cell(30_000, 60_000, 66_000, -8_000, discharging: true)], AcOnline: fa …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×15
  • Silent fallback default on parse failure src/BrimDeck.Core/ClipboardSync/ClipboardHtml.cs:27 — `Offset` falls back to `-1` when `int.TryParse(html.AsSpan(digits, end - digits), out int value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/ClipboardSync/DoubaoSyncClient.cs:73 — `Number` falls back to `0` when `value.ValueKind == JsonValueKind.String && long.TryParse(value.GetString(), out …` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/CpuSensors.cs:58 — `Parse` falls back to `double.NaN` when `double.TryParse(item, NumberStyles.Float, CultureInfo.InvariantCulture, out doub…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/DshSessions.cs:52 — `Read` falls back to `0` when `f.Match.Groups[1].Success` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/GpuAdapters.cs:90 — `Number` falls back to `-1` when `int.TryParse(end < 0 ? rest : rest[..end], out int number)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/Loc.cs:50 — `Label` falls back to `""` when `minutes.Groups[2].Success` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/Lyrics.cs:287 — `FindNeteaseId` falls back to `Lyrics.Empty` when `value.TryGetProperty("lrc", out var lrc)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/MiMoUsage.cs:275 — `Parse` falls back to `0` when `double.TryParse(row[i], NumberStyles.Float, CultureInfo.InvariantCulture, out va…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/OpenCodeUsage.cs:135 — `Parse` falls back to `0` when `double.TryParse(row[i], NumberStyles.Float, CultureInfo.InvariantCulture, out va…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/Pricing.cs:562 — `FindGeminiFamily` falls back to `new Version()` when `Version.TryParse(x.Match.Groups[1].Value.Contains('.') ? x.Match.Groups[1].Value…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/QueMusicLyrics.cs:85 — `ReadQueMusicLatest` falls back to `-1` when `entry.TryGetProperty("source", out var s) && s.TryGetInt32(out int value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/Usage.cs:65 — `Get` falls back to `default` when `obj.ValueKind == JsonValueKind.Object && obj.TryGetProperty(name, out var v)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/ZCodeUsage.cs:81 — `DeviceMid` falls back to `""` when `Guid.TryParse(doc.RootElement.Get("deviceMid").Text(), out var id)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck.Core/ZCodeUsage.cs:186 — `Parse` falls back to `0` when `long.TryParse(row[i], out var value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure src/BrimDeck/MainWindow.Shelf.cs:659 — `DropOnTab` falls back to `Guid.Empty` when `Guid.TryParse(part, out var g)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
C4 · Data Retention · Partial data-retention evidence · ×1
  • Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: a scheduled purge / cleanup job (PurgeOlderThan / CleanupJob).
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 28 significant file(s) lose their only recent owner: scripts/readme-media/Program.cs, src/BrimDeck/Native/MediaSessions.cs, src/BrimDeck.Core/ProviderScripts.cs, src/BrimDeck.Core/ZCodeUsage.cs, src/BrimDeck/Native/NeteaseCdpConnection.cs, src/BrimDeck.Core/AppUpdates.cs, src/BrimDeck/SettingsUpdates.cs, src/BrimDeck.Core/InstallerUpdates.cs (+20 more). Pair on, review, or document these before any departure.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found scripts/icon/Icon.csproj:3 — 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 `scripts/icon/Icon.csproj` makes this repository a deployable product (line 3).
D21 · Naming Consistency · `Follow` returns an awaitable but lacks the `Async` suffix its 75 peers carry · ×1
  • `Follow` returns an awaitable but lacks the `Async` suffix its 75 peers carry src/BrimDeck/Native/BluetoothBatteries.cs:359 — 75 of the 77 awaitable methods of project BrimDeck are named with an affix the repository binds to awaitables (75 of 77; unit: awaitable methods of project BrimDeck). Peers: ClipboardSyncService.UnpairLanAsync (src/BrimDeck/ClipboardSyncService.Lan.cs:29); ClipboardSyncService.RunLanAsync (src/BrimDeck/ClipboardSyncService.Lan.cs:79); ClipboardSyncService.ExchangeLanAsync (src/BrimDeck/ClipboardSyncService.Lan.cs:135); ClipboardSyncService.RefreshWeTypeNamesAsync (src/BrimDeck/ClipboardSyncService.cs:81); ClipboardSyncService.PairWeTypeAsync (src/BrimDeck/ClipboardSyncService.cs:131). Rename to `FollowAsync`. [rule N4b]
D21 · Naming Consistency · `Read` returns an awaitable but lacks the `Async` suffix its 75 peers carry · ×1
  • `Read` returns an awaitable but lacks the `Async` suffix its 75 peers carry src/BrimDeck/Native/BluetoothBatteries.cs:405 — 75 of the 77 awaitable methods of project BrimDeck are named with an affix the repository binds to awaitables (75 of 77; unit: awaitable methods of project BrimDeck). Peers: ClipboardSyncService.UnpairLanAsync (src/BrimDeck/ClipboardSyncService.Lan.cs:29); ClipboardSyncService.RunLanAsync (src/BrimDeck/ClipboardSyncService.Lan.cs:79); ClipboardSyncService.ExchangeLanAsync (src/BrimDeck/ClipboardSyncService.Lan.cs:135); ClipboardSyncService.RefreshWeTypeNamesAsync (src/BrimDeck/ClipboardSyncService.cs:81); ClipboardSyncService.PairWeTypeAsync (src/BrimDeck/ClipboardSyncService.cs:131). Rename to `ReadAsync`. [rule N4b]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion src/BrimDeck.Core/BrimDeck.Core.csproj:1 — `BrimDeck.Core` overshoots its size bounds (28918 LoC, 591 public types across 2 namespaces). 1 of 9 project(s) overshoot their size bounds, lowering Project Cohesion to 7.8/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
IC1 · Incompleteness & stubs · Placeholder data left in code · ×1
  • Placeholder data left in code src/BrimDeck.Core/ShelfRules.cs:233 — A placeholder e-mail address ("name@example.com") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P12 · CI test-gate honesty · Sleep-based test synchronization · ×1
  • Sleep-based test synchronization — 11 Task.Delay/Thread.Sleep call(s) in test code synchronize with background work by sleeping — a known flakiness precursor on slow runners. Prefer polling with a deadline or completion signals.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 3/4 service-like projects use logging (pure contract/DTO projects are excluded — they have nothing to log). Of those 4, 3 ship a process this repository operates; the rest are libraries their consumer hosts, where the logging decision belongs to the host.
P2 · Observability · Console output used as the logging channel · ×1
  • Console output used as the logging channel src/BrimDeck.Sensors/Program.cs:26 — `src/BrimDeck.Sensors/Program.cs` reports through `Console.Write…` at line 26 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:7 — No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation src/BrimDeck.Core/BrimDeck.Core.csproj:23 — `src/BrimDeck.Core/BrimDeck.Core.csproj` 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`.
P6 · Release Hygiene · Changelog looks stale/thin · ×1
  • Changelog looks stale/thin — The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
X2 · Cancellation propagation · Not all async methods take a CancellationToken · ×1
  • Not all async methods take a CancellationToken — Only 160/252 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
X5 · Nullable reference types · Nullable reference types not enabled everywhere · ×1
  • Nullable reference types not enabled everywhere — 5/6 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
X5 · Nullable reference types · Null-forgiving operator (`!`) suppressions override nullable warnings · ×1
  • Null-forgiving operator (`!`) suppressions override nullable warnings — ~0.5 `!` suppressions per 1k syntax nodes — 436 suppression(s) across the 796650 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
X7 · Silent fallback defaults · Silent fallback default on lookup miss · ×1
  • Silent fallback default on lookup miss src/BrimDeck.Core/DashboardUsage.cs:18 — `Find` answers a miss of `snapshots.FirstOrDefault(snapshot => snapshot.Id == id && !snapshot.Configuratio…` with `new ProviderSnapshot(id)` — an entity fabricated around `id`, which the caller cannot tell from a stored one. Return null or a not-found result, or throw.
X9 · Subsumed condition operand · Subsumed condition operand · ×1
  • Subsumed condition operand src/BrimDeck/Native/QqMediaConnection.cs:328 — `uri.Host.Equals("y.gtimg.cn", StringComparison.OrdinalIgnoreCase)` can never decide this `||` — every value satisfying `uri.Host.Equals("y.gtimg.cn", StringComparison.OrdinalIgnoreCase)` also satisfies `uri.Host.EndsWith(".gtimg.cn", StringComparison.OrdinalIgnoreCase)`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Minor — 5 finding(s)
D12 · Dependency Hygiene · Outdated · ×5
  • Outdated: Jint — Jint 4.16.3 → 4.18.0 available (referenced by BrimDeck.Core).
  • Outdated: NAudio.Wasapi — NAudio.Wasapi 2.2.1 → 3.3.0 available (referenced by BrimDeck).
  • Outdated: System.IO.Ports — System.IO.Ports 10.0.0 → 11.0.0 available (referenced by BrimDeck).
  • Outdated: System.Management — System.Management 10.0.0 → 11.0.0 available (referenced by BrimDeck).
  • Outdated: System.ServiceProcess.ServiceController — System.ServiceProcess.ServiceController 10.0.0 → 11.0.0 available (referenced by BrimDeck).

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-38f1e2298f39422c95415dcf074601d7/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-38f1e2298f39422c95415dcf074601d7/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=65" --report-format json --report-path /tmp/watchdog-gitleaks-38f1e2298f39422c95415dcf074601d7/history-2.json --exit-code 0 --source .0artifacts/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-38f1e2298f39422c95415dcf074601d7/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .7artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnuget—nuget: not applicable — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan0—
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 112 file(s) — `scripts/readme-media/Program.cs`, `src/BrimDeck.Core/AntigravityUsage.cs`, `src/BrimDeck.Core/AppUpdates.cs`, `src/BrimDeck.Core/BackgroundPrices.cs`, `src/BrimDeck.Core/BrandFamilies.cs`, … (+107 more) — 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 Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-78c8ec0d541044d982eee1e0a0705b7c0artifacts/raw/osv-scanner.json

Run 01a1ebaf-de5a-7649-be5d-403d42bd3ce7 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Appendix C — Personal-data map

Every field, property and record parameter whose name is conventional personal data — 2 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.

Name — 2 field(s)
  • AppleMusicRepeat._lastName src/BrimDeck.Core/AppleMusicRepeat.cs:12
  • Card.FullName src/BrimDeck/DevicesView.cs:36

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