Public report of fpsacha/zomboid-control-panel, 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, 15:17 UTC · Survey ID cd_3b5c13f9c3c3494dad7d61fb60332ea1

fpsacha/zomboid-control-panel

Measured 17 November 2026, 15:15 UTC, at code version c5f8b9f

First survey, so nothing to compare with yet Code coverage: not measured

Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).

CAI score 49.6out of 100 Weak
CriticalWeakAdequateStrongExemplary

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

A large codebase: 270,557 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 3.5 person-years · Weakest lens: Code Health, 38.3

Findings by how serious they are

50 critical 2184 serious 501 minor

5 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, 15:15 UTC

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

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

81of 81 dimensions measured by tools.
2713of 2735 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.
81dimensions across 7 lenses, read from 270,557 lines of product code in 2 projects.
Chapters

Executive summary

fpsacha/zomboid-control-panel falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 49.6 out of 100 and is rated Weak, and 38 of its 50 critical findings are security problems.

Code Health, at 38.3, is the weakest lens and counts most in the score. The best first step is simplifying the hardest methods, worth about 5.4 points. Splitting the oversized files would lift Code Health itself, worth about 4.2 points. Raising Code Health to 70 would lift the score to about 59.3.

Thirty weaknesses in the code could be used by an attacker. Four settings leave the servers or containers unsafe, and three controls can't be used without a mouse. Fixing the weaknesses the scanner points to, correcting the unsafe settings and making the controls work with a keyboard would close these risks. Hashing passwords with a password-hashing function such as Argon2, bcrypt or PBKDF2 would fix the two places where passwords are scrambled with a fast general-purpose hash, and the password or key in the code's history needs replacing, with the old one switched off. The four loops of files that import each other need breaking.

The product code is 270,557 lines, about €510,000 to rebuild.

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

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

If Code Health rose from 38.3 to 70, the lowest score rated Strong, the score would rise from 49.6 to about 59.3.

Code composition: what the lines of code are
Product code 49%Tests 51%
Rebuild cost: about €510,000 · Estimate
Cost to rebuild€170,000 to €850,000, for 2,819 to 8,942 hours of work, about 3.5 person-years for 2 to 7 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 50. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 270,557 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Bring the 298 bodies over 30 down to 30 or less in Cognitive Complexity — start with Debug.Debug (cognitive 1148), Mods.Mods (cognitive 954), WorldMap.WorldMap (cognitive 659).
Raises the score by about 5.4 points · High effort · Cognitive Complexity
2
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 4.2 points · Medium effort · Large Files
3
Interpolated log message defeats structured logging
Raises the score by about 3.4 points · Medium effort · Structured logging

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 €510,000 to build again, about 3.5 person-years of work. Its weakest lens is Code Health, at 38.3 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Bring the 298 bodies over 30 down to 30 or less in Cognitive Complexity. Of all the actions in this report, it raises the score most for the work it takes: about 5.4 points for high 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 4.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 9% to 20% on every change. The history of the code shows how much it changes: about 684,635 lines over the last 90 days, which is about 2,776,575 lines a year. At that pace, the extra work comes to an estimated 629.9 to 3779.2 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 · 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: 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.

271 modules, with 224 dependencies between them. Every module uses only modules listed above it, so there are no loops.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 components.AddServerChoices2 components.ServerHeader3 components.mods.useModHealth4 components.mods.useOrderRules5 components.players6 components.scheduler.taskDraft7 components.templates8 components.ui9 lib.api10 lib.bridgeDeliveryTypes11 lib.modGroupTools12 lib.navigation13 types14 types.files15 components.MountDiscoveryBanner16 components.PageHeader17 components.PageSkeleton18 components.bridge.BridgeChecksumDialog19 components.bridge.BridgeDeliverySwitchDialog20 components.dashboard21 components.diagnostics.problemFixes22 components.files.FileDetailsPopover23 components.files.FileEditorDialog24 components.files.FileRowMenu25 components.mods.DuplicateItemsNotice26 components.mods.LoadOrderList27 components.mods.conflictSuggestions28 components.mods.useLoadOrderPlan29 components.mods.useModGroupsStore30 components.scheduler31 hooks32 lib33 pages34 components35 components.bridge36 components.diagnostics37 components.files38 components.mods.ModGroupsPanel39 components.mods.SmartSortPreview40 components.mods
1 components.AddServerChoices
2 components.ServerHeader
3 components.mods.useModHealth
4 components.mods.useOrderRules
5 components.players
6 components.scheduler.taskDraft
7 components.templates
8 components.ui
9 lib.api
10 lib.bridgeDeliveryTypes
11 lib.modGroupTools
12 lib.navigation
13 types
14 types.files
15 components.MountDiscoveryBanner2
16 components.PageHeader1
17 components.PageSkeleton1
18 components.bridge.BridgeChecksumDialog1
19 components.bridge.BridgeDeliverySwitchDialog1
20 components.dashboard1
21 components.diagnostics.problemFixes2
22 components.files.FileDetailsPopover1
23 components.files.FileEditorDialog4
24 components.files.FileRowMenu1
25 components.mods.DuplicateItemsNotice1
26 components.mods.LoadOrderList11
27 components.mods.conflictSuggestions11
28 components.mods.useLoadOrderPlan1
29 components.mods.useModGroupsStore1
30 components.scheduler1
31 hooks1
32 lib1744422
33 pages22
34 components11211
35 components.bridge21
36 components.diagnostics25
37 components.files4111
38 components.mods.ModGroupsPanel11
39 components.mods.SmartSortPreview11
40 components.mods11521212211
Uses a module listed above itPart of a loopThe module itself
1 components.AddServerChoices2 components.ServerHeader3 components.mods.useModHealth4 components.mods.useOrderRules5 components.players6 components.scheduler.taskDraft7 components.templates8 components.ui9 lib.api10 lib.bridgeDeliveryTypes11 lib.modGroupTools12 lib.navigation13 types14 types.files15 components.MountDiscoveryBanner16 components.PageHeader17 components.PageSkeleton18 components.bridge.BridgeChecksumDialog19 components.bridge.BridgeDeliverySwitchDialog20 components.dashboard21 components.diagnostics.problemFixes22 components.files.FileDetailsPopover23 components.files.FileEditorDialog24 components.files.FileRowMenu25 components.mods.DuplicateItemsNotice26 components.mods.LoadOrderList27 components.mods.conflictSuggestions28 components.mods.useLoadOrderPlan29 components.mods.useModGroupsStore30 components.scheduler31 hooks32 lib33 pages34 components35 components.bridge36 components.diagnostics37 components.files38 components.mods.ModGroupsPanel39 components.mods.SmartSortPreview40 components.modscomponents.AddServerChoices1components.ServerHeader2components.mods.useModHealth3components.mods.useOrderRules4components.players5components.scheduler.taskDraft6components.templates7components.ui8lib.api9lib.bridgeDeliveryTypes10lib.modGroupTools11lib.navigation12types13types.files14components.MountDiscoveryBanner15components.PageHeader16components.PageSkeleton17components.bridge.BridgeChecksumDialog18components.bridge.BridgeDeliverySwitchDialog19components.dashboard20components.diagnostics.problemFixes21components.files.FileDetailsPopover22components.files.FileEditorDialog23components.files.FileRowMenu24components.mods.DuplicateItemsNotice25components.mods.LoadOrderList26components.mods.conflictSuggestions27components.mods.useLoadOrderPlan28components.mods.useModGroupsStore29components.scheduler30hooks31lib32pages33components34components.bridge35components.diagnostics36components.files37components.mods.ModGroupsPanel38components.mods.SmartSortPreview39components.mods4021111121411111111111744422221121121254111111111521212211+231 more modules (most-connected shown)

At a glance — Code Health · 38.3 · Weak · gated by D1, D2, R3, X4 ·

At a glance — Architecture · 64.5 · Adequate · gated by D26, R9 ·

At a glance — Maturity · 65.7 · Adequate · gated by D15 ·

At a glance — Readiness · 61.5 · Adequate · gated by P7 ·

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

At a glance — Accessibility · 56.2 · Adequate ·

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 — Injection161High / Critical
A02:2025 — Security Misconfiguration9High / Critical
A03:2025 — Software Supply Chain Failures5Medium
A07:2025 — Authentication Failures3High / Critical

Roadmap

Top priorities: Bring the 298 bodies over 30 down to 30 or less in Cognitive Complexity — start with Debug.Debug (cognitive 1148), Mods.Mods (cognitive 954), WorldMap.WorldMap (cognitive 659); Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package; Interpolated log message defeats structured logging.

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

Do thisHelpsEffortDimension
Bring the 298 bodies over 30 down to 30 or less in Cognitive Complexity — start with Debug.Debug (cognitive 1148), Mods.Mods (cognitive 954), WorldMap.WorldMap (cognitive 659).+5.4 ptsHighCognitive Complexity
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+4.2 ptsMediumLarge Files
Interpolated log message defeats structured logging+3.4 ptsMediumStructured logging
Resolve the 103 FunctionTooLong finding(s) in God Classes — start with REDACTED (14), REDACTED (5), REDACTED (4).+1.9 ptsHighGod Classes
Bring the 69 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with Mods.Mods (cyclomatic 1152), Debug.Debug (cyclomatic 753), WorldMap.WorldMap (cyclomatic 637).+1.8 ptsHighCyclomatic Complexity
Resolve the 1 finding(s) in Type Safety.+1.6 ptsMediumType Safety
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+1.4 ptsMediumKeyboard semantics
Resolve the 65 FileTooLong finding(s) in God Classes — start with REDACTED (2), REDACTED, REDACTED.+1.2 ptsHighGod Classes

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.2SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.1MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

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

Critical — 50

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

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

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

Could not be resolved — 5

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 81 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 — 81 dimensions across the health lenses
D1D2D3D5D6D7D10D12D13D14D15D17D19D20D24D26D27D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AX10AX3AX4AX6C2GD1IC1M1M2M3M4P1P10P2P3P4P5P6P7PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X14X16X17X2X21X23X25X28X29X3X30X4X5

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1ea14-0cda-738c-b99f-d17ff63af1d5.

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.

  • D11 Test Reliability — evaluation did not complete — Test Reliability not included (check did not complete) — excluded from the score.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (12 contributor(s) across 3697 commit(s) sampled, automation and bot accounts excluded). One of them holds 97% of the history; the other 11 hold 0.3% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • 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. `client/src/App.tsx`, `client/src/components/Layout.tsx`, `client/src/lib/api.ts`, `client/src/pages/Events.tsx`, `client/src/pages/Mods.tsx`, … (+6 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.
  • AC2 Forms & labels — 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. 1 further occurrence(s) are not listed individually; the score already reflects all 41.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. User interface: 181 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. Boot: crawled PUBLIC routes only — add a Playwright storageState (e.g. playwright/.auth/user.json) or a test auth-setup to crawl authenticated screens rendered 0/1 surface(s) × 2 renders render failed for http://127.0.0.1:3001: page.addScriptTag: Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'sha256-QWPYjNCmvJ6v.
  • 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.
  • PF3 Async & latency hygiene — 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. 493 further occurrence(s) are not listed individually; the score already reflects all 533.
  • R10 Code Duplication — 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. 799 further occurrence(s) are not listed individually; the score already reflects all 839.
  • R2 Cyclomatic Complexity — 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. 944 further occurrence(s) are not listed individually; the score already reflects all 984.
  • R3 Large Files — 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. 84 further occurrence(s) are not listed individually; the score already reflects all 124.
  • R7 Dead Code — 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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
  • X10 Duplicated predicate — 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. 60 further occurrence(s) are not listed individually; the score already reflects all 100.
  • X26 Unsynchronised callback handoff — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Kotlin, Scala, Go, Swift, Python and Ruby source only, and no C# was loaded, no Java, Kotlin, Scala, Go, Swift, Python or Ruby was found, and this repository's Lua is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala, Kotlin, PHP and Go source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala, Kotlin, PHP or Go was found, and this repository's Lua is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • 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. 403 further occurrence(s) are not listed individually; the score already reflects all 443.
  • X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1644 further occurrence(s) are not listed individually; the score already reflects all 1684.

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.
  • 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.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • 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").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

800 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Mods.Mods at 1152. A further 9 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 Events.getEventSuccessCopy at 55 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: client/src/lib/bridgeDeliveryView.ts (bridgeDeliveryView.isDeliveryStatus at 19). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

(anonymous) (cyclomatic 23) · ×8REDACTED:4745
(anonymous) (cyclomatic 22) · ×7REDACTED:2490
(anonymous) (cyclomatic 19) · ×7REDACTED:995
(anonymous) (cyclomatic 16) · ×7REDACTED:5875
(anonymous) (cyclomatic 18) · ×6REDACTED:518

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

What to do

  1. Bring the 69 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with Mods.Mods (cyclomatic 1152), Debug.Debug (cyclomatic 753), WorldMap.WorldMap (cyclomatic 637). — 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 69 together lifts Cyclomatic Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

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

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

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

1004 method(s) exceeded the cognitive complexity threshold of 15; the worst was Debug.Debug at 1148.

(anonymous) (cognitive 17) · ×10REDACTED:995
(anonymous) (cognitive 18) · ×8REDACTED:9498
(anonymous) (cognitive 29) · ×7REDACTED:518
(anonymous) (cognitive 23) · ×5REDACTED:2791
(anonymous) (cognitive 21) · ×5REDACTED:1830

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

What to do

  1. Bring the 298 bodies over 30 down to 30 or less in Cognitive Complexity — start with Debug.Debug (cognitive 1148), Mods.Mods (cognitive 954), WorldMap.WorldMap (cognitive 659). — 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 298 together lifts Cognitive Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

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

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

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

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

199 god class(es) detected.

FunctionTooLong: ChunkCleaner.ChunkCleaner · ×103client/src/pages/ChunkCleaner.tsx:320
FileTooLong: REDACTED · ×65REDACTED
ClassTooLong: ChunkCleaner · ×16client/src/pages/ChunkCleaner.tsx:1
TooManyMethods: RconService · ×8server/services/rcon.js:697
MethodTooLong: PanelUpdateChecker.spawnWindowsApplyHelper · ×7server/services/panelUpdateChecker.js:1276

What to do

  1. Resolve the 103 FunctionTooLong finding(s) in God Classes — start with REDACTED (14), REDACTED (5), REDACTED (4). — One of this dimension's main actionable groups (103 warning-level).
  2. Resolve the 65 FileTooLong finding(s) in God Classes — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (65 warning-level).
  3. Resolve the 16 ClassTooLong finding(s) in God Classes — start with ChunkCleaner.tsx, Events.tsx, panelUpdateChecker.js. — One of this dimension's main actionable groups (16 warning-level).

Detailed fixes: d3_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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.1 / 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.1 / 10 · rule-coverage 100% · ceiling Verified

2 of 27 classes have LCOM4 above 3.

Low cohesion: AuthService (LCOM4 4) · ×2REDACTED:668

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with REDACTED, fakeSftp.js. — 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.

D7 · Architectural Integrity6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

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

No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).

Detailed fixes: d7_recommendation.md.

D10 · Test Quality10.0 / 10Stronggated by 35 serious findings✓ Tool-verified

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

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

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

137 skipped (134 with a documented reason), 21 zero-assertion, 11 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 12254 tests.

No assertions: was found in the /diagnostics handler at all · ×21server/tests/diagnosticsCheckRegistry.test.js:553
Fixed-sleep synchronisation: a reconcile started during the apply waits for it, then follows the new method (I3) · ×11server/tests/bridgeDeliveryApply.test.js:285
Skipped test: every registered ErrorCode has a matching key in client/src/locales/en/errors.json -- · ×3server/tests/errorCodeRegistry.test.js:363
Mock-dominated test: refuses before saving or stopping the active server · ×97server/tests/aioMultiServer.test.js:207
Skipped (documented): (unnamed test) · ×134server/tests/adminPasswordOutOfScripts.test.js:114

What to do

  1. Resolve the 21 No assertions finding(s) in Test Quality — start with eslintRuleNoFailOpenCheckServerRunning.test.js (3), diagnosticsCheckRegistry.test.js, eslintRuleResultHandling.test.js. — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 11 Fixed-sleep synchronisation finding(s) in Test Quality — start with discordStartUnderConfigMutex.test.js (2), bridgeDeliveryApply.test.js, fileManagerSftp.test.js. — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 3 Skipped test finding(s) in Test Quality — start with errorCodeRegistry.test.js (2), supervisor-restart.test.js. — One of this dimension's main actionable groups (3 warning-level).

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

D12 · Dependency Hygiene8.9 / 10Strong✓ Tool-verified

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

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

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

12 outdated direct production npm dependency(ies) of 54 graded, 0 pinning defect(s), across 2 package.json (2 of them the product) and 2 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 1 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Deprecated: eslint · ×2client/package.json:56
Deprecated: prebuild-installpackage-lock.json:5524
Outdated (npm): dotenv · ×12

What to do

  1. Resolve the 2 Deprecated finding(s) in Dependency Hygiene — start with package.json (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with package-lock.json. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

REDACTED scan ran and found no leaked secrets. 1 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.

✓ 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 396 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 396 package(s) this repository's committed lockfile installs for a consumer — its 54 production, optional and peer dependency(ies), across 2 product package.json manifest(s), and everything those install in turn. Its 30 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. No third-party code was found shipping without a manifest entry (vendored or copied-in directories, licence comments preserved in committed bundles, bundled module paths, compiled wasm modules).

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots2.2 / 10Critical✓ 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 2.2 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: client/src/pages/Mods.tsx (68×1152=78336); REDACTED (102×662=67524); client/src/pages/ServerConfig.tsx (88×664=58432) Repeated repair below the complexity floor: server/services/logTailer.js (14 of 14 changes were fixes); client/src/lib/bridgeDeliveryView.ts (13 of 13 changes were fixes); server/services/lifecycleCoordinator.js (12 of 16 changes were fixes)

Hotspot: client/src/pages/Mods.tsx · ×136client/src/pages/Mods.tsx:301
Repeated repair: server/services/logTailer.js · ×45server/services/logTailer.js:229

What to do

  1. Resolve the 136 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (136 warning-level).
  2. Resolve the 45 Repeated repair finding(s) in Churn × Complexity Hotspots — start with logTailer.js, bridgeDeliveryView.ts, lifecycleCoordinator.js. — One of this dimension's main actionable groups (45 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality10.0 / 10Exemplary○ Nothing flagged

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

0 of 1 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

D24 · Comment Value9.6 9.5 / 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.5 / 10 · rule-coverage 98% · ceiling Documented

61 of 16056 judged comments only repeat the code they sit on (0.4 %). 334 comment(s) in another language or script were not judged.

redundant comment · ×51client/src/components/SpawnBrowser.tsx:791
doc comments repeat the names · ×2server/services/backupService.js:1799

✓ On the Gold path — maintain.

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

D26 · Project Cohesion0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

2 of 2 build units (npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×2package.json:1

What to do

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

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

D27 · Navigability10.0 / 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
  3. 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)0.0 / 10Critical✓ Tool-verified

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

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

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

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

171 finding(s): 0 critical, 31 high, 140 medium, 0 low. semgrep hit a parse error in 25 file(s) — `client/src/App.tsx` (lines 83–575), `client/src/components/Layout.tsx` (line 87), `client/src/lib/__tests__/restoreOutcome.test.ts` (lines 41–43, line 43), `client/src/lib/api.ts`, `client/src/pages/Backups.tsx`, … (+20 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 22 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (9), REDACTED (6), REDACTED (3). — One of this dimension's main actionable groups (22 issue-level).
  2. Resolve the 8 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (8). — One of this dimension's main actionable groups (8 issue-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

1 of 432 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is server/utils/diskSpace.js. Counted over 432 of the 553 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned files with no living knowledge
Orphaned fileserver/utils/diskSpace.js:1

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.9 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

Strongest change-coupling: ItemPicker.tsx↔VehiclePicker.tsx 70%; docker.js↔dockerClient.js 67%

Boundary-crossing change coupling: docker.js ↔ dockerClient.jsserver/routes/docker.js:1
Change coupling: ItemPicker.tsx ↔ VehiclePicker.tsxclient/src/components/ItemPicker.tsx:1

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with docker.js. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Change coupling finding(s) in Change Coupling — start with ItemPicker.tsx. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives5.8 / 10Adequate✓ Tool-verified

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

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

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

  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — client/src/pages/WorldMap.tsx:412

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels5.3 / 10Adequate✓ Tool-verified

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

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

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

  • This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×11) — client/src/components/DiscoverySetup.tsx:157, client/src/pages/Debug.tsx:4524, client/src/pages/Debug.tsx:5138, …
  • This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×4) — client/src/components/WorkshopCollectionPanel.tsx:548, client/src/components/players/CharacterImportExportDialog.tsx:291, client/src/components/templates/ImportTemplateDialog.tsx:97, …
  • This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×12) — client/src/components/players/CharacterImportExportDialog.tsx:258, client/src/pages/Debug.tsx:5330, client/src/pages/Players.tsx:2699, …
  • This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it. (×11) — client/src/pages/ChunkCleaner.tsx:2456, client/src/pages/Debug.tsx:6399, client/src/pages/Players.tsx:2679, …
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). — client/src/pages/Debug.tsx:6511
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — client/src/pages/WorldMap.tsx:4466

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure7.3 / 10Strong✓ Tool-verified

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

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

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

  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). — client/src/pages/Leaderboard.tsx:515
  • A <tr> may hold only <td>/<th> cells. Text or a value written between the cells is moved out of the table by the browser, so it is read detached from its row. Wrap it in a <td>. — client/src/pages/Leaderboard.tsx:517

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics4.3 / 10Weak✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. — client/src/components/mods/ModRow.tsx:140
  • A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. (×2) — client/src/pages/Debug.tsx:6129, client/src/pages/Debug.tsx:6478

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC6 · Visual & motion safety5.3 / 10Adequate✓ Tool-verified

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

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

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

  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×3) — client/src/components/CommandPalette.tsx:213, client/src/components/ItemPicker.tsx:412, client/src/components/VehiclePicker.tsx:376
  • <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×2) — client/src/components/ItemPicker.tsx:525, client/src/components/VehiclePicker.tsx:440

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition9.8 / 10Exemplary✓ Tool-verified

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

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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.

C2 · Access Controls10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of 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.

  • A placeholder string ("changeme") is still in shipped code — typical of generated boilerplate that was never filled in. (×2) — server/services/passwordPolicy.js:41, server/utils/resetTokenStrength.js:626
  • A placeholder string ("CHANGE_ME") is still in shipped code — typical of generated boilerplate that was never filled in. — server/services/rcon.js:163

What to do

  • Finish or delete the functions that still throw "not implemented", and replace placeholder text before shipping.
IC1 · Incompleteness & stubs7.8 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

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 this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. — client/src/pages/Debug.tsx:4832
  • `buildEnvironmentReport` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:840
  • `restoreArchivedBridgeFiles` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — server/services/bridgeDisk.js:366
  • The guard above `return false;` also returns `false`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — REDACTED:1236
  • `close` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — server/services/fileManagerSftpPool.js:486
  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×4) — server/tests/errorCodeRegistry.test.js:363, server/tests/errorCodeRegistry.test.js:369, server/tests/extensionBundleCurrentCopy.test.js:221, …

What to do

  • Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
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.

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

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

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

  • 1 ADR-shaped document(s) detected by content — `ARCHITECTURE.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.

What to do

  • Move ADRs under docs/adr/ (or docs/adrs/) and name them NNNN-title.md so they're easy to find.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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

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

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

P2 · Observability8.0 / 10Strong✓ Tool-verified

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

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

  • `REDACTED` reports through `console.*` at line 168 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:168
  • `server/utils/paths.js` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — server/utils/paths.js:64
  • `server/utils/paths.js` reports through `console.*` at line 93 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — server/utils/paths.js:93
  • `docker/all-in-one/updater/server.js` reports through `console.*` at line 148 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — docker/all-in-one/updater/server.js:148
  • `docker/all-in-one/updater/server.js` reports through `console.*` at line 150 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — docker/all-in-one/updater/server.js:150
  • `docker/all-in-one/updater/server.js` reports through `console.*` at line 186 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — docker/all-in-one/updater/server.js:186
  • `docker/all-in-one/updater/server.js` reports through `console.*` at line 191 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — docker/all-in-one/updater/server.js:191
  • `docker/all-in-one/updater/server.js` reports through `console.*` at line 201 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — docker/all-in-one/updater/server.js:201
  • `docker/all-in-one/updater/server.js` reports through `console.*` at line 235 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — docker/all-in-one/updater/server.js:235

What to do

  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
P3 · Security & performance tooling7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.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.

  • Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it. — REDACTED:191

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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.

  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — REDACTED:4479, server/routes/serverFinder.js:481, server/routes/serverFinder.js:899

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
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.

  • `fs.existsSync` in `cleanDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build.js:163
  • `fs.rmSync` in `cleanDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build.js:164
  • `fs.readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — build.js:1667, build.js:1766, build.js:1768
  • `fs.existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×11) — build.js:1703, build.js:1708, build.js:1765, …
  • `fs.mkdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×5) — build.js:1704, build.js:1709, build.js:1887, …
  • `execSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — build.js:1714, build.js:1831, build.js:2001
  • `fs.writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×4) — build.js:1820, build.js:1941, build.js:1980, …
  • `fs.copyFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×6) — build.js:1853, build.js:1892, build.js:1919, …
  • `fs.chmodSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — build.js:1855, build.js:2022
  • `fs.cpSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — build.js:1870, build.js:1986, build.js:1992
  • `fs.readdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build.js:1889

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety4.1 / 10Weak✓ Tool-verified

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

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

  • 941 typed · 1341 plain JS — the untyped files are browser-extension/popup.js, REDACTED, build.js, client/scripts/de-lint.mjs, client/scripts/extract-pz-character-names.mjs, client/scripts/extract-pz-sandbox-ground-truth.mjs (+1335 more).
R10 · Code Duplication6.1 / 10Adequate✓ Tool-verified

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

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

  • 82 duplicated blocks under client/src/ have copies in at least two of the sibling directories components, hooks, lib, pages, types — 26 of them are reported below, and 56 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 82 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 82 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 82 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — client/src/components/WorkshopCollectionPanel.tsx:946
  • 36 duplicated blocks under server/ have copies in at least two of the sibling directories database, routes, services, utils — 27 of them are reported below, and 9 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 36 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 36 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 36 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — server/services/dockerClient.js:274
  • 18 duplicated blocks under client/src/components/ have copies in at least two of the sibling directories backups, bridge, dashboard, diagnostics, files, mods (+4 more sibling(s) not listed) — 11 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 18 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — client/src/components/diagnostics/problemFixes.ts:150
  • 14 duplicated blocks under the repository root have copies in at least two of the sibling directories browser-extension, client, scripts, server — 10 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 14 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 14 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 14 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — client/src/lib/leaderboardDiagnostics.ts:96
  • client/src/components/ItemPicker.tsx:278 · client/src/components/VehiclePicker.tsx:247 — the two spans are one implementation copied and then locally edited — 1357 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — client/src/components/ItemPicker.tsx:278
  • REDACTED:1484 · REDACTED:2009 — the two spans are one implementation copied and then locally edited — 711 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:1484
  • client/src/components/ItemPicker.tsx:102 · client/src/components/VehiclePicker.tsx:92 — the two spans are one implementation copied and then locally edited — 761 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — client/src/components/ItemPicker.tsx:102
  • client/src/pages/Events.tsx:2764 · client/src/pages/Events.tsx:2921 — the two spans are one implementation copied and then locally edited — 795 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — client/src/pages/Events.tsx:2764
  • client/src/components/WorkshopCollectionPanel.tsx:946 · REDACTED:7552 — the two spans are one implementation copied and then locally edited — 619 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — client/src/components/WorkshopCollectionPanel.tsx:946
  • REDACTED:4131 · REDACTED:5607 — the two spans are one implementation copied and then locally edited — 449 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:4131
  • client/src/pages/Mods.tsx:4179 · client/src/pages/Mods.tsx:5460 — the two spans are one implementation copied and then locally edited — 495 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — client/src/pages/Mods.tsx:4179
  • scripts/jar-audit/extract-sandbox-options.mjs:57 · scripts/jar-audit/extract-server-options.mjs:46 — the two spans are one implementation copied and then locally edited — 599 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/jar-audit/extract-sandbox-options.mjs:57
  • client/src/components/ErrorBoundary.tsx:10 · client/src/components/FeatureErrorBoundary.tsx:23 — the two spans are one implementation copied and then locally edited — 368 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — client/src/components/ErrorBoundary.tsx:10
  • client/src/components/templates/CreateTemplateDialog.tsx:25 · client/src/components/templates/ImportTemplateDialog.tsx:21 — the two spans are one implementation copied and then locally edited — 423 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — client/src/components/templates/CreateTemplateDialog.tsx:25
  • REDACTED:9606 · REDACTED:9922 — the two spans are one implementation copied and then locally edited — 399 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:9606
  • REDACTED:4093 · REDACTED:5350 — the two spans are one implementation copied and then locally edited — 231 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:4093
  • REDACTED:4609 · REDACTED:5794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:4609
  • client/src/pages/ServerConfig.tsx:3788 · client/src/pages/ServerConfig.tsx:3835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — client/src/pages/ServerConfig.tsx:3788
  • client/src/pages/Players.tsx:2733 · client/src/pages/Players.tsx:2785 · client/src/pages/Players.tsx:2829 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — client/src/pages/Players.tsx:2733
  • client/src/pages/Login.tsx:472 · client/src/pages/Login.tsx:598 — the two spans are one implementation copied and then locally edited — 263 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — client/src/pages/Login.tsx:472
  • REDACTED:5761 · REDACTED:6040 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:5761
  • REDACTED:5122 · REDACTED:5181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:5122
  • REDACTED:3976 · REDACTED:4834 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:3976
  • client/src/pages/Debug.tsx:7322 · client/src/pages/Debug.tsx:7359 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — client/src/pages/Debug.tsx:7322
  • server/routes/panelBridge.js:789 · server/routes/panelBridge.js:986 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — server/routes/panelBridge.js:789
  • server/routes/panelBridge.js:3802 · server/routes/panelBridge.js:3842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — server/routes/panelBridge.js:3802
  • client/src/lib/leaderboardDiagnostics.ts:96 · server/services/leaderboardDiagnostics.js:46 — the two spans are one implementation copied and then locally edited — 288 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — client/src/lib/leaderboardDiagnostics.ts:96
  • client/src/pages/Players.tsx:2548 · client/src/pages/Players.tsx:2620 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — client/src/pages/Players.tsx:2548
  • REDACTED:2415 · REDACTED:2616 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — REDACTED:2415
  • server/services/rcon.js:399 · server/services/rcon.js:500 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — server/services/rcon.js:399
  • server/services/logTailer.js:316 · server/services/logTailer.js:407 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — server/services/logTailer.js:316
  • scripts/jar-audit/classfile-parser.mjs:21 · scripts/jar-audit/constructor-bytecode.mjs:18 — the two spans are one implementation copied and then locally edited — 404 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/jar-audit/classfile-parser.mjs:21
  • client/src/pages/Mods.tsx:985 · client/src/pages/Mods.tsx:1018 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — client/src/pages/Mods.tsx:985
  • REDACTED:3896 · REDACTED:4777 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:3896
  • server/routes/serverFinder.js:759 · server/routes/serverFinder.js:815 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — server/routes/serverFinder.js:759
  • REDACTED:3199 · REDACTED:3266 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:3199
  • server/routes/panelBridge.js:4860 · server/routes/panelBridge.js:4892 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — server/routes/panelBridge.js:4860
  • REDACTED:2835 · REDACTED:2967 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:2835
  • client/src/pages/Events.tsx:3134 · client/src/pages/Events.tsx:3170 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — client/src/pages/Events.tsx:3134
  • client/src/pages/RolesPermissions.tsx:522 · client/src/pages/Users.tsx:539 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — client/src/pages/RolesPermissions.tsx:522

What to do

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

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • client/src/lib/__tests__/noDeadDisabledTitleRule.test.ts:5 reaches past another workspace package's public entry into its internals with a relative path (../../../../eslint-rules/no-dead-disabled-title.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — client/src/lib/__tests__/noDeadDisabledTitleRule.test.ts:5
  • client/src/lib/__tests__/noDuplicateInterfaceNameRule.test.ts:5 reaches past another workspace package's public entry into its internals with a relative path (../../../../eslint-rules/no-duplicate-interface-name.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — client/src/lib/__tests__/noDuplicateInterfaceNameRule.test.ts:5
  • client/src/lib/__tests__/noRawDateFormatRule.test.ts:4 reaches past another workspace package's public entry into its internals with a relative path (../../../../eslint-rules/no-raw-date-format.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — client/src/lib/__tests__/noRawDateFormatRule.test.ts:4
  • client/src/lib/__tests__/noRawErrorMessageRule.test.ts:4 reaches past another workspace package's public entry into its internals with a relative path (../../../../eslint-rules/no-raw-error-message.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — client/src/lib/__tests__/noRawErrorMessageRule.test.ts:4

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity8.0 / 10Strong✓ Tool-verified

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

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

  • Settings has cyclomatic complexity 382 and cognitive complexity 315; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:370
  • (anonymous) has cyclomatic complexity 265 and cognitive complexity 544; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3451
  • Events has cyclomatic complexity 256 and cognitive complexity 221; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Events.tsx:1082
  • Players has cyclomatic complexity 245 and cognitive complexity 205; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Players.tsx:288
  • Dashboard has cyclomatic complexity 220 and cognitive complexity 214; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Dashboard.tsx:264
  • (anonymous) has cyclomatic complexity 210 and cognitive complexity 261; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/lib/demo.ts:1665
  • Servers has cyclomatic complexity 192 and cognitive complexity 164; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Servers.tsx:334
  • Discord has cyclomatic complexity 154 and cognitive complexity 139; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Discord.tsx:337
  • WorldMap has cyclomatic complexity 147 and cognitive complexity 136; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/WorldMap.tsx:657
  • ServerConfig has cyclomatic complexity 141 and cognitive complexity 126; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/ServerConfig.tsx:1011
  • computeModHealth has cyclomatic complexity 140 and cognitive complexity 237; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/utils/modHealth.js:168
  • (anonymous) has cyclomatic complexity 135 and cognitive complexity 203; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1795
  • (anonymous) has cyclomatic complexity 121 and cognitive complexity 210; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:441
  • Debug has cyclomatic complexity 121 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Debug.tsx:1028
  • current has cyclomatic complexity 117 and cognitive complexity 199; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/ChunkCleaner.tsx:1236
  • (anonymous) has cyclomatic complexity 117 and cognitive complexity 177; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/WorldMap.tsx:1734
  • performRestart has cyclomatic complexity 112 and cognitive complexity 178; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/services/scheduler.js:1946
  • findServerErrors has cyclomatic complexity 108 and cognitive complexity 208; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/utils/serverErrorFinder.js:763
  • Console has cyclomatic complexity 97 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Console.tsx:242
  • (anonymous) has cyclomatic complexity 92 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/routes/panelBridge.js:1584
  • (anonymous) has cyclomatic complexity 90 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2014
  • Files has cyclomatic complexity 88 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Files.tsx:187
  • decide has cyclomatic complexity 84 and cognitive complexity 119; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/utils/modClassification.js:273
  • checkForUpdates has cyclomatic complexity 81 and cognitive complexity 140; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/services/modChecker.js:1953
  • (anonymous) has cyclomatic complexity 80 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/ServerConfig.tsx:390
  • (anonymous) has cyclomatic complexity 77 and cognitive complexity 91; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1410
  • getDiagnosticsFixAction has cyclomatic complexity 77 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Debug.tsx:390
  • solve has cyclomatic complexity 72 and cognitive complexity 136; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/utils/modSmartSort.js:538
  • (anonymous) has cyclomatic complexity 71 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1489
  • TaskDialog has cyclomatic complexity 68 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/components/scheduler/TaskDialog.tsx:69
  • ChunkCleaner has cyclomatic complexity 68 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/ChunkCleaner.tsx:320
  • startServer has cyclomatic complexity 67 and cognitive complexity 105; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2427
  • (anonymous) has cyclomatic complexity 67 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Debug.tsx:1340
  • (anonymous) has cyclomatic complexity 66 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:6122
  • (anonymous) has cyclomatic complexity 63 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/components/mods/healthText.ts:117
  • Scheduler has cyclomatic complexity 62 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Scheduler.tsx:112
  • (anonymous) has cyclomatic complexity 61 and cognitive complexity 58; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — client/src/pages/Mods.tsx:4917
  • (anonymous) has cyclomatic complexity 60 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:8347
  • (anonymous) has cyclomatic complexity 60 and cognitive complexity 77; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:474
  • WorkshopCollectionSyncCard has cyclomatic complexity 59 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:6532
R3 · Large Files1.3 / 10Critical✓ Tool-verified

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

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

  • REDACTED has 9852 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 8141 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 7566 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • client/src/pages/Debug.tsx has 7202 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/Debug.tsx:1
  • REDACTED has 7142 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • client/src/pages/Mods.tsx has 7017 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/Mods.tsx:1
  • REDACTED has 5170 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • client/src/lib/serverConfigSchema.ts has 5106 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/lib/serverConfigSchema.ts:1
  • client/src/lib/api.ts has 5104 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/lib/api.ts:1
  • client/src/pages/ServerConfig.tsx has 4710 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/ServerConfig.tsx:1
  • server/routes/panelBridge.js has 4692 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/routes/panelBridge.js:1
  • client/src/pages/WorldMap.tsx has 4681 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/WorldMap.tsx:1
  • REDACTED has 3981 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • client/src/pages/Events.tsx has 3836 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/Events.tsx:1
  • client/src/pages/Servers.tsx has 3728 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/Servers.tsx:1
  • client/src/pages/Players.tsx has 3438 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/Players.tsx:1
  • server/services/panelUpdateChecker.js has 3364 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/services/panelUpdateChecker.js:1
  • client/src/pages/ChunkCleaner.tsx has 3349 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/ChunkCleaner.tsx:1
  • server/database/init.js has 3204 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/database/init.js:1
  • REDACTED has 3089 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • server/services/scheduler.js has 3041 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/services/scheduler.js:1
  • REDACTED has 3000 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 2787 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 2531 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • server/services/backupService.js has 2523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/services/backupService.js:1
  • REDACTED has 2487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • server/services/modChecker.js has 2444 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/services/modChecker.js:1
  • server/services/rcon.js has 2390 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/services/rcon.js:1
  • client/src/pages/Dashboard.tsx has 2385 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/Dashboard.tsx:1
  • client/src/pages/Discord.tsx has 2373 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/Discord.tsx:1
  • REDACTED has 2296 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • client/src/lib/demo.ts has 2229 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/lib/demo.ts:1
  • client/src/pages/Backups.tsx has 2159 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/Backups.tsx:1
  • server/services/fileManagerSftpBackend.js has 2046 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/services/fileManagerSftpBackend.js:1
  • server/services/fileManagerService.js has 1962 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/services/fileManagerService.js:1
  • build.js has 1941 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — build.js:1
  • client/src/pages/Files.tsx has 1794 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/Files.tsx:1
  • client/src/components/mods/ConflictsPanel.tsx has 1714 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/components/mods/ConflictsPanel.tsx:1
  • client/src/pages/Console.tsx has 1614 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — client/src/pages/Console.tsx:1
  • server/services/bridgeDelivery.js has 1578 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/services/bridgeDelivery.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage9.9 / 10Exemplary✓ Tool-verified

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

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×4) — client/scripts/de-lint.mjs:1, client/scripts/extract-pz-character-names.mjs:1, eslint-rules/no-orphan-translation-default.js:1, …

What to do

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

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

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

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

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

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

R7 · Dead Code8.0 / 10Strong✓ Tool-verified

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

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

  • Nothing imports this binding — it is safe to review for removal. (×40) — client/src/components/diagnostics/problemFixes.ts:187, client/src/components/files/filesUi.ts:248, client/src/components/mods/VirtualRows.tsx:6, …

What to do

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

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

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

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — server/tests/helpers/opensshSftpServer.js:54, server/tests/corsExtensionOriginLoginsOff.test.js:3
  • Only test files import it (first: server/tests/authSessionLifecycle.test.js:2) — move it to devDependencies. — package.json:39

What to do

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

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

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

  • client/src/components/PageHeader.tsx → client/src/lib/navigation.ts → client/src/pages/Backups.tsx → client/src/components/PageHeader.tsx (one verified cycle inside a mutually-dependent group of 28 files) — client/src/components/PageHeader.tsx:5
  • client/src/lib/api.ts → client/src/types/index.ts → client/src/lib/api.ts — client/src/lib/api.ts:2147
  • REDACTED → REDACTED (one verified cycle inside a mutually-dependent group of 2 files) — REDACTED:12
  • REDACTED → server/services/scheduler.js → REDACTED → REDACTED — REDACTED:20

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture5.0 / 10Adequate✓ Tool-verified

Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.

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

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×4) — REDACTED:7277, server/services/bridgeDisk.js:168, server/utils/modConflictRules.js:120, …
  • `activeServer.rconPassword !== ini.RCONPassword` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account. — REDACTED:4655
  • `own.password === transport.password` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account. — server/services/fileManagerSftpPool.js:234
  • This code fixes scrypt at N=16,384 (r=8, p=1), Node's default. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price. (×2) — server/services/adminPasswordLaunch.js:72, server/services/adminPasswordLaunch.js:82

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 4 sites, not one: `REDACTED:7277` (createHash("md5")), `server/services/bridgeDisk.js:168` (createHash("sha1")), `server/utils/modConflictRules.js:120` (createHash("md5")), `server/utils/modDefinitionExtractors.js:226` (createHash("md5")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Store passwords with a salted, deliberately slow KDF — scrypt or PBKDF2 from node:crypto, or bcrypt/Argon2 — and compare with a constant-time check. A fast digest of a password, however it is encoded, is reversed by precomputed tables or GPU guessing. Start in `REDACTED:4655`.
  • Raise the cost parameter to current guidance — PBKDF2 at 1,300,000 (HMAC-SHA1), 600,000 (SHA-256) or 210,000 (SHA-512) iterations; scrypt at N=2^17, r=8, p=1; bcrypt at a work factor of 10 or more — or move to a memory-hard KDF (Argon2id, scrypt) where the platform offers one. Read the parameter from configuration and tune it to roughly 100 ms per derivation on the slowest hardware that must run it, so the price can be raised again without shipping new code. This repository constructs a key derivation priced below the floor at 2 sites, not one: `server/services/adminPasswordLaunch.js:72` (scrypt, N=16,384 (r=8, p=1), Node's default), `server/services/adminPasswordLaunch.js:82` (scrypt, N=16,384 (r=8, p=1), Node's default). Each is a separate decision — fixing only the line this row cites leaves the others in place.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X13 · Undrained process stream6.2 / 10Adequate✓ Tool-verified

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.

  • `spawn` pipes `stdout` here — it is given no `stdio` option, or `'pipe'` — but nothing in this scope ever reads `child.stdout`, while `child.stderr` is read and the child's end is awaited. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to stdout (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles, the request never returns, and the stuck child holds its resources until something kills it. Consume both streams (`child.stdout.on('data', …)`, or `child.stdout.resume()` to discard it), or stop piping the one you do not want — `stdio: ['pipe', 'pipe', 'inherit']` or `'ignore'` in that slot. — server/services/panelUpdateChecker.js:1725

What to do

  • Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
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.

X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified

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

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

  • `canonicalFixParams` is exported and takes `value: unknown` from its caller, and it calls itself at line 21 (`canonicalFixParams`) with a piece of `value` (and at line 24) — and nowhere in `canonicalFixParams` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalFixParams` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — client/src/components/mods/healthText.ts:21

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X2 · Cancellation propagation8.3 / 10Strong✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (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 21/29 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `probeDownloadHostReachable` awaits `https.request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `https.request(url, { signal })`. — server/services/panelUpdateChecker.js:2473
  • `provisionSteamCmdWindows` awaits `https.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `https.get(url, { signal })`. — REDACTED:560
  • `fetchWithFilter` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — server/routes/serverFinder.js:478
  • `poll` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:1270
  • `fetchAuthStatus` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — client/src/contexts/AuthContext.tsx:66
  • `confirmPanelIdentity` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — browser-extension/popup.js:343
  • `loginToPanel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — browser-extension/popup.js:372
  • `pushCookies` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — browser-extension/popup.js:425

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
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.

X23 · Unguarded diagnostic materialisation7.2 / 10Strong✓ Tool-verified

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

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

  • `debug` at line 649 is called with an argument built by `installPaths.join(" or ")` (line 649), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — server/services/modChecker.js:649
  • `debug` at line 576 is called with an argument built by `safeMessage(err)` (line 576), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — server/services/modSteamKnowledge.js:576
  • `debug` at line 585 is called with an argument built by `safeMessage(err)` (line 585), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — server/services/modSteamKnowledge.js:585
  • `debug` at line 628 is called with an argument built by `safeMessage(err)` (line 628), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — server/services/modSteamKnowledge.js:628
  • `debug` at line 719 is called with an argument built by `safeMessage(err)` (line 719), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — server/services/modSteamKnowledge.js:719
  • `debug` at line 854 is called with an argument built by `safeMessage(err, secret)` (line 854), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — server/services/modSteamKnowledge.js:854
  • `debug` at line 1156 is called with an argument built by `safeMessage(err)` (line 1156), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — server/services/modSteamKnowledge.js:1156
  • `debug` at line 1179 is called with an argument built by `safeMessage(err)` (line 1179), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — server/services/modSteamKnowledge.js:1179
  • `debug` at line 1212 is called with an argument built by `safeMessage(err)` (line 1212), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — server/services/modSteamKnowledge.js:1212
  • `debug` at line 1220 is called with an argument built by `safeMessage(err)` (line 1220), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — server/services/modSteamKnowledge.js:1220
  • `debug` at line 920 is called with an argument built by `JSON.stringify(args)` (line 920), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — REDACTED:920
  • `debug` at line 2791 is called with an argument built by `args.join(" ")` (line 2792), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — REDACTED:2791
  • `debug` at line 3186 is called with an argument built by `errors.join("; ")` (line 3187), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — REDACTED:3186
  • `debug` at line 7486 is called with an argument built by `map((m) => m.id)` (line 7487), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — REDACTED:7486

What to do

  • Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call — that is JavaScript's evaluation order, not a guess — then put the construction behind the level check the logger offers (`if (logger.isLevelEnabled('debug'))` for pino and winston, `isDebugEnabled()` for log4js, the repository's own debug flag where it has one), or hand the logger the object and a format string (`logger.debug({ payload }, 'raw request')`) so the serialising happens only when the line is written. Moving the call is not the fix: it is the join/projection/stringify in the argument that is paid, wherever the call sits.
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.

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

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

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

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

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

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

X3 · Exception handling5.2 / 10Adequate✓ 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(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×10) — REDACTED:222, REDACTED:307, REDACTED:1764, …
  • 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. (×29) — REDACTED:740, REDACTED:837, REDACTED:2400, …
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — server/utils/embeddedClient.js:178

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

X4 · Structured logging1.9 / 10Critical✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

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

  • `error` at line 206 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:206
  • `info` at line 257 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:257
  • `warn` at line 434 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:434
  • `info` at line 444 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:444
  • `warn` at line 467 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:467
  • `info` at line 706 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:706
  • `warn` at line 855 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:855
  • `error` at line 939 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:939
  • `error` at line 962 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:962
  • `error` at line 1000 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1000
  • `error` at line 1004 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1004
  • `info` at line 1017 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1017
  • `error` at line 1020 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1020
  • `warn` at line 1139 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1139
  • `warn` at line 1235 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1235
  • `debug` at line 1632 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1632
  • `info` at line 1648 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1648
  • `warn` at line 1651 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1651
  • `debug` at line 1658 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1658
  • `info` at line 1666 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1666
  • `warn` at line 1669 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1669
  • `debug` at line 1735 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1735
  • `debug` at line 1829 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1829
  • `debug` at line 1845 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1845
  • `warn` at line 1897 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:1897
  • `warn` at line 2115 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2115
  • `info` at line 2186 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2186
  • `warn` at line 2195 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2195
  • `info` at line 2227 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2227
  • `error` at line 2264 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2264
  • `warn` at line 2312 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2312
  • `error` at line 2328 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2328
  • `info` at line 2338 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2338
  • `error` at line 2369 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2369
  • `error` at line 2476 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2476
  • `error` at line 2523 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2523
  • `error` at line 2758 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2758
  • `debug` at line 2829 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2829
  • `error` at line 2959 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2959
  • `error` at line 2975 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:2975

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types9.8 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

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

  • ~0.6 `!` null assertions per 1k TypeScript source lines — 70 assertion(s) across the 126587 source line(s) of the 302 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: client/src/components/mods/ConflictsPanel.tsx (15), client/src/pages/WorldMap.tsx (12), client/src/lib/demoSmart.ts (11). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. 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

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

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

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

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

Reference — by lens

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

LensScoreRatingImpact
Code Health38.3Weak — gated by D1, D2, R3, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture64.5Adequate — gated by D26, R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity65.7Adequate — gated by D15Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness61.5Adequate — gated by P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security67.4Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility56.2AdequateAcceptable, with room to improve.
Performance60.0AdequateStrongest area.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 39 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 47 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.

  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — The runtime tier booted this repository's service, but crawled PUBLIC routes only — add a Playwright storageState (e.g. playwright/.auth/user.json) or a test auth-setup to crawl authenticated screens rendered 0/1 surface(s) × 2 renders render failed for http://127.0.0.1:3001: page.addScriptTag: Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'sha256-QWPYjNCmvJ6v. This repository also has a user interface (181 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates) that the booted service does not serve, and this scan has no strategy that reaches it — so no WCAG success criterion was verified in a rendered page on this run. That is a gap in OUR tooling, not a finding about your application: nothing here says the interface is inaccessible. The static accessibility checks still ran.
  • AXS1 Runtime exposed surface — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D11 Test Reliability — Test Reliability not included (check did not complete)
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 8 candidate(s) found and not reported.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed JavaScript surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • D32 Data Compliance (PII/GDPR) — 11 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D4 Code Duplication — This repository's production source (.js, .mjs, .ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication. The rest — .lua (10,476 lines, 3.8% of production source) — is compared by neither card, so duplication there is unmeasured; it is a corner of this repository, not its product.
  • 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.
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • 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
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 50 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×3
  • Click handler on a non-interactive <div> client/src/components/mods/ModRow.tsx:140 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> client/src/pages/Debug.tsx:6129 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
  • Click handler on a non-interactive <div> client/src/pages/Debug.tsx:6478 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
R9 · Circular Imports · Import cycle (3 files) · ×2
  • Import cycle (3 files) client/src/components/PageHeader.tsx:5 — client/src/components/PageHeader.tsx → client/src/lib/navigation.ts → client/src/pages/Backups.tsx → client/src/components/PageHeader.tsx (one verified cycle inside a mutually-dependent group of 28 files)
  • Import cycle (3 files) REDACTED:20 — REDACTED → server/services/scheduler.js → REDACTED → REDACTED
S1 · Web-Security Posture · Password hashing without a KDF · ×2
  • Password hashing without a KDF REDACTED:4655 — `activeServer.rconPassword !== ini.RCONPassword` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account.
  • Password hashing without a KDF server/services/fileManagerSftpPool.js:234 — `own.password === transport.password` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account.
AC2 · Forms & labels · <button> with no accessible text · ×1
  • <button> with no accessible text client/src/pages/Debug.tsx:6511 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels · <select> without a programmatic label · ×1
  • <select> without a programmatic label client/src/pages/WorldMap.tsx:4466 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×1
  • Boundary-crossing change coupling: docker.js ↔ dockerClient.js server/routes/docker.js:1 — `server/routes/docker.js` (context routes) and `server/services/dockerClient.js` (context services) sit in DIFFERENT parts of the tree yet change together 67% of the time (8 of the 12 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `a5a631d2` fix(mods): cancel a pending mod-update restart once the server restar…; `56854960` fix(docker): container action route no longer reports a Docker API fa…; `c689f2b9` fix(docker): surface the real Docker error instead of "Docker action … — run `git show` on any of them.
R8 · Dependency Hygiene · Unlisted import 'ssh2' · ×1
  • Unlisted import 'ssh2' server/tests/helpers/opensshSftpServer.js:54 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'ws' · ×1
  • Unlisted import 'ws' server/tests/corsExtensionOriginLoginsOff.test.js:3 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) client/src/lib/api.ts:2147 — client/src/lib/api.ts → client/src/types/index.ts → client/src/lib/api.ts
R9 · Circular Imports · Import cycle (1 files) · ×1
  • Import cycle (1 files) REDACTED:12 — REDACTED → REDACTED (one verified cycle inside a mutually-dependent group of 2 files)
Serious — 2184 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×136
  • Hotspot: client/src/pages/Mods.tsx client/src/pages/Mods.tsx:301 — client/src/pages/Mods.tsx changed 68 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 1152 in Mods.Mods at line 301. 44 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/Mods.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:370 — REDACTED changed 102 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 662 in Settings.Settings at line 370. 74 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: client/src/pages/ServerConfig.tsx client/src/pages/ServerConfig.tsx:1011 — client/src/pages/ServerConfig.tsx changed 88 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 664 in ServerConfig.ServerConfig at line 1011. 60 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/ServerConfig.tsx`: 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: client/src/pages/Debug.tsx client/src/pages/Debug.tsx:1028 — client/src/pages/Debug.tsx changed 72 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 753 in Debug.Debug at line 1028. 53 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/Debug.tsx`: 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: client/src/pages/Servers.tsx client/src/pages/Servers.tsx:334 — client/src/pages/Servers.tsx changed 86 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 599 in Servers.Servers at line 334. 65 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/Servers.tsx`: 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: client/src/pages/Dashboard.tsx client/src/pages/Dashboard.tsx:264 — client/src/pages/Dashboard.tsx changed 86 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 483 in Dashboard.Dashboard at line 264. 61 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/Dashboard.tsx`: 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: client/src/pages/WorldMap.tsx client/src/pages/WorldMap.tsx:657 — client/src/pages/WorldMap.tsx changed 57 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 637 in WorldMap.WorldMap at line 657. 43 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/WorldMap.tsx`: 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: client/src/pages/Players.tsx client/src/pages/Players.tsx:288 — client/src/pages/Players.tsx changed 66 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 473 in Players.Players at line 288. 45 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/Players.tsx`: 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: client/src/pages/Events.tsx client/src/pages/Events.tsx:1082 — client/src/pages/Events.tsx changed 59 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 513 in Events.Events at line 1082. 44 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/Events.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:3451 — REDACTED changed 99 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 264 in debug.router.get("/diagnostics") at line 3451. 64 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:4643 — REDACTED changed 145 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 115 in index.start at line 4643. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:3805 — REDACTED changed 161 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 95 in server.router.post("/install") at line 3805. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: client/src/pages/Backups.tsx client/src/pages/Backups.tsx:155 — client/src/pages/Backups.tsx changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 312 in Backups.Backups at line 155. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/Backups.tsx`: 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: client/src/pages/ChunkCleaner.tsx client/src/pages/ChunkCleaner.tsx:320 — client/src/pages/ChunkCleaner.tsx changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 413 in ChunkCleaner.ChunkCleaner at line 320. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/ChunkCleaner.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:303 — REDACTED changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 290 in ServerSetup.ServerSetup at line 303. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1795 — REDACTED changed 71 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 136 in servers.router.put("/:id") at line 1795. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: client/src/pages/Console.tsx client/src/pages/Console.tsx:242 — client/src/pages/Console.tsx changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 229 in Console.Console at line 242. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/Console.tsx`: 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: client/src/pages/Scheduler.tsx client/src/pages/Scheduler.tsx:112 — client/src/pages/Scheduler.tsx changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 159 in Scheduler.Scheduler at line 112. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/Scheduler.tsx`: 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: server/services/scheduler.js server/services/scheduler.js:1946 — server/services/scheduler.js changed 69 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in Scheduler.performRestart at line 1946. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/services/scheduler.js`: 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: client/src/components/Layout.tsx client/src/components/Layout.tsx:178 — client/src/components/Layout.tsx changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 172 in Layout.Layout at line 178. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/components/Layout.tsx`: 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: client/src/pages/Discord.tsx client/src/pages/Discord.tsx:337 — client/src/pages/Discord.tsx changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 260 in Discord.Discord at line 337. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/pages/Discord.tsx`: 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: client/src/lib/demo.ts client/src/lib/demo.ts:1660 — client/src/lib/demo.ts changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 212 in demo.installDemoFetchShim at line 1660. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/lib/demo.ts`: 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: client/src/components/mods/ConflictsPanel.tsx client/src/components/mods/ConflictsPanel.tsx:73 — client/src/components/mods/ConflictsPanel.tsx changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 401 in ConflictsPanel.ConflictsPanel at line 73. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/components/mods/ConflictsPanel.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:7660 — REDACTED changed 91 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in mods.detectConflicts at line 7660. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: server/routes/panelBridge.js server/routes/panelBridge.js:1584 — server/routes/panelBridge.js changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 86 in panelBridge.router.post("/command") at line 1584. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/routes/panelBridge.js`: 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.
  • + 111 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×103
  • FunctionTooLong: ChunkCleaner.ChunkCleaner client/src/pages/ChunkCleaner.tsx:320 — FunctionTooLong — ChunkCleaner runs 2366 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2266 over it, 23.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Events.Events client/src/pages/Events.tsx:1082 — FunctionTooLong — Events runs 2216 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2116 over it, 22.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ConflictsPanel.ConflictsPanel client/src/components/mods/ConflictsPanel.tsx:73 — FunctionTooLong — ConflictsPanel runs 1440 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1340 over it, 14.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Files.Files client/src/pages/Files.tsx:187 — FunctionTooLong — Files runs 1321 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1221 over it, 13.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: fileManagerSftpBackend.createSftpBackend server/services/fileManagerSftpBackend.js:668 — FunctionTooLong — createSftpBackend runs 1054 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 954 over it, 10.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Layout.Layout client/src/components/Layout.tsx:178 — FunctionTooLong — Layout runs 902 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 802 over it, 9.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.
  • FunctionTooLong: build.generateStartBat build.js:399 — FunctionTooLong — generateStartBat runs 695 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 595 over it, 6.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: WorkshopCollectionPanel.WorkshopCollectionPanel client/src/components/WorkshopCollectionPanel.tsx:127 — FunctionTooLong — WorkshopCollectionPanel runs 654 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 554 over it, 6.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ServerFinder.ServerFinder client/src/pages/ServerFinder.tsx:129 — FunctionTooLong — ServerFinder runs 649 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 549 over it, 6.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SpawnBrowser.SpawnBrowser client/src/components/SpawnBrowser.tsx:81 — FunctionTooLong — SpawnBrowser runs 570 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 470 over it, 5.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Login.Login client/src/pages/Login.tsx:86 — FunctionTooLong — Login runs 511 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 411 over it, 5.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: demo.installDemoFetchShim client/src/lib/demo.ts:1660 — FunctionTooLong — installDemoFetchShim runs 491 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 391 over it, 4.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.start REDACTED:4643 — FunctionTooLong — start runs 478 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 378 over it, 4.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: FileEditorDialog.FileEditorDialog client/src/components/files/FileEditorDialog.tsx:106 — FunctionTooLong — FileEditorDialog runs 418 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 318 over it, 4.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ItemPicker.ItemPicker client/src/components/ItemPicker.tsx:98 — FunctionTooLong — ItemPicker runs 410 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 310 over it, 4.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.
  • FunctionTooLong: ServersOverview.ServersOverview client/src/components/dashboard/ServersOverview.tsx:78 — FunctionTooLong — ServersOverview runs 410 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 310 over it, 4.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.
  • FunctionTooLong: panelBridge.router.get("/commands") server/routes/panelBridge.js:2782 — FunctionTooLong — router.get("/commands") runs 380 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 280 over it, 3.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ModGroupsPanel.ModGroupsPanel client/src/components/mods/ModGroupsPanel.tsx:94 — FunctionTooLong — ModGroupsPanel runs 376 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 276 over it, 3.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: modHealth.computeModHealth server/utils/modHealth.js:168 — FunctionTooLong — computeModHealth runs 358 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 258 over it, 3.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: CharacterImportExportDialog.CharacterImportExportDialog client/src/components/players/CharacterImportExportDialog.tsx:58 — FunctionTooLong — CharacterImportExportDialog runs 352 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 252 over it, 3.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ModGroupDialog.ModGroupDialog client/src/components/mods/ModGroupDialog.tsx:73 — FunctionTooLong — ModGroupDialog runs 345 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 245 over it, 3.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: VehiclePicker.VehiclePicker client/src/components/VehiclePicker.tsx:89 — FunctionTooLong — VehiclePicker runs 339 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 239 over it, 3.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Setup.Setup client/src/pages/Setup.tsx:43 — FunctionTooLong — Setup runs 335 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 235 over it, 3.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: build.generateStartSh build.js:1294 — FunctionTooLong — generateStartSh runs 332 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 232 over it, 3.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: chunks.router.post("/delete-region") REDACTED:2014 — FunctionTooLong — router.post("/delete-region") runs 327 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 227 over it, 3.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 78 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×65
  • FileTooLong: REDACTED REDACTED — FileTooLong — 6626 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 6126 over it, 13.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 6305 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5805 over it, 12.61× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pages/Debug.tsx client/src/pages/Debug.tsx — FileTooLong — 5948 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5448 over it, 11.90× 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: pages/Mods.tsx client/src/pages/Mods.tsx — FileTooLong — 5746 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5246 over it, 11.49× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 4626 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 4126 over it, 9.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 4540 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 4040 over it, 9.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: lib/api.ts client/src/lib/api.ts — FileTooLong — 3731 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3231 over it, 7.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: pages/WorldMap.tsx client/src/pages/WorldMap.tsx — FileTooLong — 3634 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3134 over it, 7.27× 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: pages/ServerConfig.tsx client/src/pages/ServerConfig.tsx — FileTooLong — 3578 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3078 over it, 7.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pages/Events.tsx client/src/pages/Events.tsx — FileTooLong — 3059 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: Events (1082-4024). The bar is 500 significant lines; this is 2559 over it, 6.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: routes/panelBridge.js server/routes/panelBridge.js — FileTooLong — 2994 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 2494 over it, 5.99× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pages/Servers.tsx client/src/pages/Servers.tsx — FileTooLong — 2873 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2373 over it, 5.75× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 2830 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 2330 over it, 5.66× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pages/Players.tsx client/src/pages/Players.tsx — FileTooLong — 2827 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2327 over it, 5.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pages/ChunkCleaner.tsx client/src/pages/ChunkCleaner.tsx — FileTooLong — 2598 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: ChunkCleaner (320-3555). The bar is 500 significant lines; this is 2098 over it, 5.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 2145 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1645 over it, 4.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pages/Discord.tsx client/src/pages/Discord.tsx — FileTooLong — 2019 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1519 over it, 4.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: REDACTED REDACTED — FileTooLong — 2010 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1510 over it, 4.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: database/init.js server/database/init.js — FileTooLong — 1854 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1354 over it, 3.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: services/panelUpdateChecker.js server/services/panelUpdateChecker.js — FileTooLong — 1836 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 85% of them inside a single declaration: PanelUpdateChecker (276-3549). The bar is 500 significant lines; this is 1336 over it, 3.67× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1798 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1298 over it, 3.60× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1798 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1298 over it, 3.60× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/demo.ts client/src/lib/demo.ts — FileTooLong — 1751 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1251 over it, 3.50× 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: ./build.js build.js — FileTooLong — 1599 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1099 over it, 3.20× 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: pages/Dashboard.tsx client/src/pages/Dashboard.tsx — FileTooLong — 1587 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1087 over it, 3.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 40 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×45
  • Repeated repair: server/services/logTailer.js server/services/logTailer.js:229 — server/services/logTailer.js changed 14 times in last 90 days and 14 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is LogTailer.findLogPath at line 229), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): read relayed chat only from whole delivery lines”; “fix(logs): keep a UTF-8 decoder per tailed file across reads”; “fix(logtailer): do not replay chat, user and console logs after a repoint”; “fix(security): count only what the game writes in a world (W4 paths round 2)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/services/logTailer.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: client/src/lib/bridgeDeliveryView.ts client/src/lib/bridgeDeliveryView.ts:202 — client/src/lib/bridgeDeliveryView.ts changed 13 times in last 90 days and 13 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is bridgeDeliveryView.resolveStateActions at line 202), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(bridge): a loose PanelBridge newer than the bundled one no longer needs an update”; “fix(server-settings): review round for #188 -- whole-file rejects, cut secrets, game-order reads”; “fix(delivery-client): no Restart/Start for remote servers, and restart only the server the prompt named”; “fix(bridge): keep Steam's listing in proportion and name a launch without Steam”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/lib/bridgeDeliveryView.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/services/lifecycleCoordinator.js server/services/lifecycleCoordinator.js:424 — server/services/lifecycleCoordinator.js changed 16 times in last 90 days and 12 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is lifecycleCoordinator.lifecycleActivityCovers at line 424), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): keep the admin password out of the start scripts”; “fix(restart-if-down): a quit the panel sends over RCON is the panel's stop”; “fix(restart): a failed relaunch is remembered per server (#269 follow-up)”; “fix(lifecycle): Stop and Force stop cancel a running restart instead of being refused”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/services/lifecycleCoordinator.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/services/templateService.js server/services/templateService.js:119 — server/services/templateService.js changed 13 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is templateService.saveTemplate at line 119), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(templates): a template exported by v1.4.17 imports again”; “fix(security): templates stay inside templates.manage; preview is gated”; “fix(templates): applying a template that changes nothing writes nothing (#197)”; “fix(sandbox): one scope-aware SandboxVars.lua reader/editor for every writer (#197)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/services/templateService.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/utils/serverStatusModel.js server/utils/serverStatusModel.js:150 — server/utils/serverStatusModel.js changed 11 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is serverStatusModel.buildHostSignal at line 150), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(docker): a paused or restarting game container is not "running"”; “fix(scheduler): a remote server with a Docker container mapped is still restartable”; “fix(bridge): a running server is no longer reported stopped while PanelBridge is silent”; “fix(status): an OpenRC unit mid-stop is not stopped; a fresh heartbeat outlives a blind scan”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/utils/serverStatusModel.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/routes/serverStatus.js server/routes/serverStatus.js:21 — server/routes/serverStatus.js changed 12 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is serverStatus.router.get("/active/status") at line 21), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): the RCON host and port reach only roles that work with RCON”; “fix(docker): a paused or restarting game container is not "running"”; “fix(status): an OpenRC unit mid-stop is not stopped; a fresh heartbeat outlives a blind scan”; “fix(status): never report another process's start time; uptime fits phones”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/routes/serverStatus.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/routes/files.js server/routes/files.js:332 — server/routes/files.js changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is files.router.use() at line 332), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): any letter case of /api goes through authentication”; “fix(security): audit fixes — auth case bypass, socket leaks, SFTP pinning, restore staging”; “fix(files): give a zip's slot back before its response ends”; “fix(files): the logins-off message says how to turn logins back on”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/routes/files.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/utils/configBackup.js server/utils/configBackup.js:147 — server/utils/configBackup.js changed 9 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is configBackup.createBackup at line 147), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): redact a failed backup's reason in Server Files and wipe answers (HT2)”; “fix(security): hide host folders from custom roles that work with them”; “fix(ini): writeIniWithBackup keeps the on-disk line ending, so mod saves and the raw editor stop rewriting CRLF files as LF”; “fix(consistency): display/junk-file timestamp orderings get a deterministic tie-break; raw .bak listing stops re-deriving the birthtime method configBackup.js already rejected”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/utils/configBackup.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:16 — REDACTED changed 9 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is configMutationGuard.resolveLocalPathReachability at line 16), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(server): templates apply + config-mutation guards force a real reload before trusting the process check”; “fix(services): four fail-open/fail-silent guards found in the server/services sweep”; “fix(safety): requireStoppedForLocalConfigMutation no longer trusts a computed isRemote toward destruction”; “fix(rcon,config): honest RCON failure banner + close the last checkServerRunning fallback”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/services/panelBridgeInstaller.js server/services/panelBridgeInstaller.js:205 — server/services/panelBridgeInstaller.js changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is panelBridgeInstaller.installBridge at line 205), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(bridge): a loose PanelBridge newer than the bundled one no longer needs an update”; “fix(security): chown/chmod PanelBridge files through a no-follow descriptor”; “fix(server): auto-install PanelBridge.lua before every start/restart, not just on activate”; “fix(panelbridge): checkBridgeInstalled/installBridge compare CONTENT, not VERSION”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/services/panelBridgeInstaller.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:243 — REDACTED changed 8 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is sanitize.hostFolderEntry at line 243), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): redact every path of a ';' list; FILE:/// URLs too”; “fix(security): redact paths after ':' and with apostrophes; keep API routes”; “fix(security): let folder names below a configured folder hold spaces”; “fix(security): redact configured folders and spaced paths from error text”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/services/dockerClient.js server/services/dockerClient.js:68 — server/services/dockerClient.js changed 7 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is dockerClient.parseContainerStats at line 68), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): read Docker stats only for a panel-managed container”; “fix(dashboard): plot anonymous memory for the PZ Memory row, not cache-inclusive usage”; “fix(mods): cancel a pending mod-update restart once the server restarts another way (fixes #189)”; “fix(docker): container action route no longer reports a Docker API failure as a confident "not managed"”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/services/dockerClient.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/services/remoteConfigFiles.js server/services/remoteConfigFiles.js:51 — server/services/remoteConfigFiles.js changed 7 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is remoteConfigFiles.validateRemoteConfigTransport at line 51), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(sandbox): live changes on a world with a map_sand.bin are kept in it, and say so (#197)”; “fix(sandbox): the map_sand.bin warning reaches remote servers and follows live edits (#197)”; “fix(bridge): the SFTP sync survives a host whose sftp-server exits or stops answering”; “security(codeql): first full triage of 214 open alerts -- 3 real fixed, 211 verdicted”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/services/remoteConfigFiles.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/utils/serverConfigPath.js server/utils/serverConfigPath.js:55 — server/utils/serverConfigPath.js changed 7 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is serverConfigPath.serverConfigPathIsConfined at line 55), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): judge a network config folder before resolving it”; “fix(security): keep 1.4.5 Map Cleanup data folders working after the update (W5 paths P1, P2)”; “fix(security): count only what the game writes in a world (W4 paths round 2)”; “fix(security): say why a server's folders are refused, everywhere they are”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/utils/serverConfigPath.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: docker/all-in-one/updater/server.js docker/all-in-one/updater/server.js:206 — docker/all-in-one/updater/server.js changed 7 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is server.server at line 206), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(aio-updater): no unhandled rejection after the 202; one update at a time”; “fix(docker): the all-in-one updater gives up on a stalled release download”; “fix(security): a refused update checksum shows in the updater log; docs”; “fix(security): audit follow-ups — modStatus allow-list, chat gate, host-key recovery”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- docker/all-in-one/updater/server.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: browser-extension/popup.js browser-extension/popup.js:494 — browser-extension/popup.js changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is popup.doSend at line 494), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): the Steam Sync popup checks a plain-http:// panel is the panel before sending”; “fix(security): the Steam Sync popup keeps its access token with its panel and account”; “fix(extension): never send the panel password or Steam cookies over public http”; “fix(extension): keep the default credentials mode for a proxy that signs people in”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- browser-extension/popup.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/utils/templateFiles.js server/utils/templateFiles.js:102 — server/utils/templateFiles.js changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is templateFiles.mergeSandboxSections at line 102), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ini): write values to .ini files as typed, not as a replace() template”; “fix(sandbox): one scope-aware SandboxVars.lua reader/editor for every writer (#197)”; “fix(templates): keep decimal format and the full nested-block list when applying sandbox values”; “fix(templates): match nested sandbox keys only at an identifier boundary when applying a template”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/utils/templateFiles.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/services/bridgeDisk.js server/services/bridgeDisk.js:506 — server/services/bridgeDisk.js changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is bridgeDisk.checkWorkshopItemServerLua at line 506), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mods): read a Steam-library server's own Workshop ACF, and start the checker once it appears”; “fix(security): chown/chmod PanelBridge files through a no-follow descriptor”; “fix(bridge): group profiles that reach one game folder by different paths”; “fix(bridge): archive a root mod.info that carries the Workshop mod id”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/services/bridgeDisk.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/services/activeSteamOperations.js server/services/activeSteamOperations.js:226 — server/services/activeSteamOperations.js changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is activeSteamOperations.rehydrateActiveSteamOperationsFromDisk at line 226), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(steam): a Steam operation recorded before a reboot no longer blocks starts”; “fix(steam): a version check no longer blocks a server start (#269)”; “fix(restart): wait out a Steam operation that holds the relaunch (#269)”; “fix(start): a Workshop item download no longer blocks a server start”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/services/activeSteamOperations.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: client/src/components/ui/dialog.tsx client/src/components/ui/dialog.tsx:18 — client/src/components/ui/dialog.tsx changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is dialog.DialogOverlay at line 18), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(client): every dialog header stays clear of the close button”; “fix(client): dialogs keep one column at their own width and wrap long titles”; “fix(client): keep World Map's item and vehicle pickers inside the window”; “fix(client): keep the footer of list dialogs and Add Server on screen; rule off DialogBody”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- client/src/components/ui/dialog.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/services/fileManagerSftpPool.js server/services/fileManagerSftpPool.js:374 — server/services/fileManagerSftpPool.js changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is FileManagerSftpPool.#selectTransfer at line 374), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): audit fixes — auth case bypass, socket leaks, SFTP pinning, restore staging”; “fix(files): clear the PR's new CodeQL alerts”; “fix(files): remote saves, uploads and copies are flushed to disk before they land”; “fix(files): a transfer whose SFTP connection goes fails at once”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/services/fileManagerSftpPool.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/utils/certs.js server/utils/certs.js:325 — server/utils/certs.js changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is certs.loadOrCreateCerts at line 325), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(https): cert self-heal now checks SAN coverage of current addresses, not mere presence”; “fix(https): self-signed cert now carries a real SubjectAltName, not CN-only”; “fix(https): self-signed cert serial can produce a non-minimal DER INTEGER that OpenSSL rejects”; “fix(secrets): harden three Linux file-mode gaps found in the secrets/SFTP hunt”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- server/utils/certs.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:55 — REDACTED changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is workshopLogScan.scanWorkshopFailures at line 55), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(bridge): keep Steam's listing in proportion and name a launch without Steam”; “fix(workshop-log): size and read server-console.txt through one handle”; “fix(bridge): don't offer the switch back when the server couldn't reach Steam”; “fix(bridge): guard both sides of a -nosteam Workshop folder; read Mods/WorkshopItems like 42.20”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:17 — REDACTED changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is system.buildRuntimeInfo at line 17), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): hide host folders from roles that can't change them”; “fix(security): keep paused sign-ins paused when the throttle is full; hide disk paths”; “fix(single-signal-sweep): dedupe pid-liveness in db.json tmp sweep, close cgroup-fallback gap in container detection”; “fix(updater): preserve game servers during panel restarts”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:110 — REDACTED changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is bridgeIni.readGameIniList at line 110), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(server-settings): read server.ini values as the game does (#182)”; “fix(bridge): guard both sides of a -nosteam Workshop folder; read Mods/WorkshopItems like 42.20”; “fix(bridge): baseline restarts per server, read DoLuaChecksum like the game”; “fix(bridge): harden the Workshop switch for shared game folders and rollbacks”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 18:22:39 +00:00' --until='2026-11-15 18:22:39 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 20 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 17 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking build.js:163 — `fs.existsSync` in `cleanDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:164 — `fs.rmSync` in `cleanDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1667 — `fs.readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1703 — `fs.existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1704 — `fs.mkdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1708 — `fs.existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1709 — `fs.mkdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1714 — `execSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1765 — `fs.existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1766 — `fs.readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1768 — `fs.readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1820 — `fs.writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1831 — `execSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1853 — `fs.copyFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1855 — `fs.chmodSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1869 — `fs.existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1870 — `fs.cpSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1886 — `fs.existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1887 — `fs.mkdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1889 — `fs.readdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1892 — `fs.copyFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1915 — `fs.mkdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1918 — `fs.existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1919 — `fs.copyFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build.js:1941 — `fs.writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×39
  • Swallowed exception (empty catch) REDACTED:222 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:307 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:740 — 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) REDACTED:837 — 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) REDACTED:1764 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1770 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1776 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1808 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1837 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2400 — 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) REDACTED:3681 — 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) REDACTED:3710 — 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) REDACTED:4171 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:4206 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:5180 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) server/utils/autoExportFolders.js: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) server/utils/autoExportFolders.js:58 — 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) REDACTED:134 — 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) REDACTED:298 — 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) REDACTED:339 — 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) REDACTED:431 — 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) server/utils/certs.js:413 — 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) server/utils/certs.js:428 — 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) server/utils/configBackup.js:324 — 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) server/utils/cronNextRun.js:204 — 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.
  • + 14 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 13 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×27
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 2 more in this group — see findings.md.
AC2 · Forms & labels · <Select> field component without a label · ×22
  • <Select> field component without a label client/src/components/DiscoverySetup.tsx:157 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label client/src/pages/ChunkCleaner.tsx:2456 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label client/src/pages/Debug.tsx:4524 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label client/src/pages/Debug.tsx:5138 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label client/src/pages/Debug.tsx:5341 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label client/src/pages/Debug.tsx:6310 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label client/src/pages/Debug.tsx:6399 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label client/src/pages/Debug.tsx:6414 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label client/src/pages/Players.tsx:2679 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label client/src/pages/Players.tsx:3503 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label client/src/pages/RolesPermissions.tsx:786 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label client/src/pages/RolesPermissions.tsx:920 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label client/src/pages/ServerConfig.tsx:589 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label client/src/pages/ServerConfig.tsx:808 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label client/src/pages/ServerFinder.tsx:743 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label client/src/pages/Servers.tsx:2950 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label client/src/pages/Servers.tsx:3354 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label client/src/pages/Servers.tsx:3538 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label client/src/pages/Servers.tsx:3759 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label REDACTED:358 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label REDACTED:5296 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label client/src/pages/Users.tsx:740 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
D10 · Test Quality · No assertions · ×21
  • No assertions: was found in the /diagnostics handler at all server/tests/diagnosticsCheckRegistry.test.js:553 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: flags every call site with no suppression -- there is no central allowlist to fall back on server/tests/eslintRuleNoFailOpenCheckServerRunning.test.js:36 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: does not flag a call with a correctly-placed eslint-disable-next-line for this exact rule server/tests/eslintRuleNoFailOpenCheckServerRunning.test.js:66 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: a disable comment covers only the ONE line below it -- a second call right after is still caught server/tests/eslintRuleNoFailOpenCheckServerRunning.test.js:79 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: flags only discarded results server/tests/eslintRuleResultHandling.test.js:10 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: flags a capability-gated Radix item onClick with no matching early-return guard, and nothing else server/tests/eslintRuleUnguardedCapabilityMenuItem.test.js:14 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: needs an sftp-server binary server/tests/fileManagerSftpOpenssh.test.js:141 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: needs an sftp-server binary server/tests/fileManagerSftpOpensshConformance.test.js:17 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: flags any handler that claims to act without a documented verify outcome server/tests/panelBridgeHandlerVerifyEnforcement.test.js:243 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: needs an sftp-server binary server/tests/panelBridgeSftpOpenssh.test.js:26 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: needs an sftp-server binary server/tests/remoteWorldSandboxSnapshot197.test.js:24 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: the same name in another data folder, another name in the same folder, a remote copy, and two with no folder are all fine server/tests/serverDuplicateCreate.test.js:113 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: still writes ordinary warnings to combined.log (only the flagged entry is held back) server/tests/setupTokenConsoleOnly.test.js:78 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: was found in the /worldmap handler at all server/tests/worldMapCheckRegistry.test.js:250 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: recovers via the Recheck button after a disconnect, and stays online on the next command client/src/pages/__tests__/Console.rconDisconnectCode.test.tsx:175 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: does flip the offline banner back to online on a successful rcon:response broadcast client/src/pages/__tests__/Console.rconResponseHandling.test.tsx:235 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: shows the real reason the clear failed, not a generic fallback client/src/pages/__tests__/Console.test.tsx:141 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: shows a "Checked Xd ago" qualifier next to a 3-day-old update-available result client/src/pages/__tests__/Dashboard.updateCheckAgeQualifier.test.tsx:136 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: still shows the generic failure card for an ordinary (non-sequence-shaped) bridge failure client/src/pages/__tests__/Events.eventSequencePartialState.test.tsx:256 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: renders the modifier/day/nights-survived inputs behind powerOn/waterOn, including the documented never-shuts-off sentinel client/src/pages/__tests__/Events.utilitiesShutoffReasoning.test.tsx:130 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: also fires on a non-Windows runtime -- unknown is not platform-gated client/src/pages/__tests__/Settings.noHelperLogPlatformGateAndUnknownFallback.test.tsx:190 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D3 · God Classes · ClassTooLong · ×16
  • ClassTooLong: ChunkCleaner client/src/pages/ChunkCleaner.tsx:1 — ClassTooLong — 2366 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 1966 over it, 5.92× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Events client/src/pages/Events.tsx:1 — ClassTooLong — 2216 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 1816 over it, 5.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PanelUpdateChecker server/services/panelUpdateChecker.js:276 — ClassTooLong — 1568 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 1168 over it, 3.92× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ConflictsPanel client/src/components/mods/ConflictsPanel.tsx:1 — ClassTooLong — 1440 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 1040 over it, 3.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DiscordBot REDACTED:334 — ClassTooLong — 1324 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 924 over it, 3.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Files client/src/pages/Files.tsx:1 — ClassTooLong — 1321 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 921 over it, 3.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PanelBridge REDACTED:134 — ClassTooLong — 1170 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 400 significant lines; this is 770 over it, 2.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Layout client/src/components/Layout.tsx:1 — ClassTooLong — 902 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 502 over it, 2.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WorkshopCollectionPanel client/src/components/WorkshopCollectionPanel.tsx:1 — ClassTooLong — 654 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 254 over it, 1.64× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ServerFinder client/src/pages/ServerFinder.tsx:1 — ClassTooLong — 649 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 249 over it, 1.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SpawnBrowser client/src/components/SpawnBrowser.tsx:1 — ClassTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 170 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UpdateChecker REDACTED:43 — ClassTooLong — 538 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 138 over it, 1.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Login client/src/pages/Login.tsx:1 — ClassTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 111 over it, 1.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FileEditorDialog client/src/components/files/FileEditorDialog.tsx:1 — ClassTooLong — 418 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 18 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ItemPicker client/src/components/ItemPicker.tsx:1 — ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 10 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.
  • ClassTooLong: ServersOverview client/src/components/dashboard/ServersOverview.tsx:1 — ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 10 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.
D10 · Test Quality · Fixed-sleep synchronisation · ×11
  • Fixed-sleep synchronisation: a reconcile started during the apply waits for it, then follows the new method (I3) server/tests/bridgeDeliveryApply.test.js:285 — This test starts work it did not wait for (`applying`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 50))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: a wipe sent while the bot is logging in leaves no bot connected with the wiped token server/tests/discordStartUnderConfigMutex.test.js:102 — This test starts work it did not wait for (`starting`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 20))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: a stop sent while the bot is logging in waits for it and stops it server/tests/discordStartUnderConfigMutex.test.js:123 — This test starts work it did not wait for (`starting`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 20))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: takes the config mirror lock and resets its session for writes under the config folder only server/tests/fileManagerSftp.test.js:792 — This test starts work it did not wait for (`saving`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 20))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: REJECTS a server list from an endpoint that is not the queried master, even targeting the exact port the query used server/tests/jimServerFinderMasterSpoof.test.js:42 — This test starts work it did not wait for (`queryPromise`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 50))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: REJECTS an A2S_INFO reply from an endpoint that is not the queried server, even targeting the exact port the query used server/tests/jimServerFinderQueryInfoSpoof.test.js:56 — This test starts work it did not wait for (`queryPromise`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 50))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: resets isChecking instead of hanging forever when res never fires 'end' and req never fires 'error' server/tests/panelUpdateCheckerReleaseCheckAbortHang.test.js:52 — This test starts work it did not wait for (`checkPromise`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 10))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: still reports already_downloading synchronously for a call made while a real download is in flight server/tests/panelUpdateDownloadConcurrencyGuard.test.js:87 — This test starts work it did not wait for (`checker`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: waits for a concurrent holder of the SAME live path's lock instead of writing through it server/tests/serverFilesRestoreFileLock.test.js:90 — This test starts work it did not wait for (`holderPromise`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 20))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: runs ONE scan for a burst of concurrent calls, and every call gets its answer server/tests/serversStatusScanShared.test.js:80 — This test starts work it did not wait for (`pending`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 20))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: handleDeleteOlderThan: closes the dialog and never calls deleteOlderThan after a switch client/src/pages/__tests__/Backups.deleteOlderSaveSettingsToggleServerChanged.test.tsx:121 — This test starts work it did not wait for (`deleteOlderItem`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D2 · Cognitive Complexity · (anonymous) (cognitive 17) · ×10
  • (anonymous) (cognitive 17) REDACTED:995 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 6, error handling 1. Of this number, 16 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • (anonymous) (cognitive 17) REDACTED:9711 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (6 pts), boolean chains 5, if/else 5, ternaries 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 17) REDACTED:3042 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, boolean chains 4, error handling 2 (3 pts), other 3, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous) (cognitive 17) REDACTED:7176 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, loops 1 (2 pts), ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous) (cognitive 17) REDACTED:2299 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), boolean chains 2, error handling 2 (nesting depth added 5). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 2346, 2313, 2312, …). 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.
  • (anonymous) (cognitive 17) REDACTED:2374 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 2460). 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.
  • (anonymous) (cognitive 17) REDACTED:2320 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 17) REDACTED:1345 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, error handling 3, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 17) server/routes/modsSmart.js:306 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 2, error handling 1. 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.
  • (anonymous) (cognitive 17) server/routes/playerCharacter.js:249 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, other 2, ternaries 2, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AC2 · Forms & labels · <NumberInput> field component without a label · ×9
  • <NumberInput> field component without a label client/src/pages/Debug.tsx:5330 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <NumberInput> field component without a label client/src/pages/Players.tsx:2699 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <NumberInput> field component without a label client/src/pages/Servers.tsx:2733 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <NumberInput> field component without a label client/src/pages/Servers.tsx:2757 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <NumberInput> field component without a label client/src/pages/Servers.tsx:3065 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <NumberInput> field component without a label client/src/pages/Servers.tsx:3078 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <NumberInput> field component without a label client/src/pages/Servers.tsx:3333 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <NumberInput> field component without a label client/src/pages/Servers.tsx:3467 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <NumberInput> field component without a label client/src/pages/Servers.tsx:3479 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D29 · Static Analysis (SAST) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 23) · ×8
  • (anonymous) (cyclomatic 23) REDACTED:4745 — (anonymous) has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 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.
  • (anonymous) (cyclomatic 23) REDACTED:5857 — (anonymous) has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 10 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.
  • (anonymous) (cyclomatic 23) server/routes/panelBridge.js:3911 — (anonymous) has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 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.
  • (anonymous) (cyclomatic 23) REDACTED:3185 — (anonymous) has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to 7 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.
  • (anonymous) (cyclomatic 23) REDACTED:1003 — (anonymous) 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.
  • (anonymous) (cyclomatic 23) REDACTED:538 — (anonymous) 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous) (cyclomatic 23) REDACTED:576 — (anonymous) 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.
  • (anonymous) (cyclomatic 23) REDACTED:856 — (anonymous) 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.
D2 · Cognitive Complexity · (anonymous) (cognitive 18) · ×8
  • (anonymous) (cognitive 18) REDACTED:9498 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 4, ternaries 4, error handling 2, loops 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 6 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.
  • (anonymous) (cognitive 18) REDACTED:2370 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 2 (4 pts), error handling 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 2 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.
  • (anonymous) (cognitive 18) REDACTED:6915 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: error handling 6 (13 pts), other 2, boolean chains 1, if/else 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 18) server/routes/panelBridge.js:1255 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (6 pts), boolean chains 5, if/else 3 (4 pts), other 2, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 18) server/routes/panelBridge.js:2648 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • (anonymous) (cognitive 18) REDACTED:1596 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8, if/else 6, boolean chains 3, error handling 1. Of this number, 14 points are the body's own statements and 4 belong to 2 function items 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.
  • (anonymous) (cognitive 18) REDACTED:3090 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 5, error handling 2, ternaries 2. Of this number, 16 points are the body's own statements and 2 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.
  • (anonymous) (cognitive 18) REDACTED:322 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (6 pts), error handling 4 (5 pts), if/else 5, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D29 · Static Analysis (SAST) · REDACTED · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×8
  • TooManyMethods: RconService server/services/rcon.js:697 — TooManyMethods — 84 methods. The bar is 30 methods; this is 54 over it, 2.80× 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: PanelBridge REDACTED:134 — TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Scheduler server/services/scheduler.js:318 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× 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: ServerManager REDACTED:1285 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PanelUpdateChecker server/services/panelUpdateChecker.js:276 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DiscordBot REDACTED:334 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ModChecker server/services/modChecker.js:421 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× 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: BackupService server/services/backupService.js:422 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
X2 · Cancellation propagation · Async function without AbortSignal · ×8
  • Async function without AbortSignal: probeDownloadHostReachable server/services/panelUpdateChecker.js:2473 — `probeDownloadHostReachable` awaits `https.request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `https.request(url, { signal })`.
  • Async function without AbortSignal: provisionSteamCmdWindows REDACTED:560 — `provisionSteamCmdWindows` awaits `https.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `https.get(url, { signal })`.
  • Async function without AbortSignal: fetchWithFilter server/routes/serverFinder.js:478 — `fetchWithFilter` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: poll REDACTED:1270 — `poll` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchAuthStatus client/src/contexts/AuthContext.tsx:66 — `fetchAuthStatus` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: confirmPanelIdentity browser-extension/popup.js:343 — `confirmPanelIdentity` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: loginToPanel browser-extension/popup.js:372 — `loginToPanel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: pushCookies browser-extension/popup.js:425 — `pushCookies` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
AC2 · Forms & labels · <Textarea> field component without a label · ×7
  • <Textarea> field component without a label client/src/components/WorkshopCollectionPanel.tsx:548 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label client/src/components/players/CharacterImportExportDialog.tsx:258 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label client/src/components/players/CharacterImportExportDialog.tsx:291 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label client/src/components/templates/ImportTemplateDialog.tsx:97 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label client/src/pages/ServerConfig.tsx:520 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label client/src/pages/ServerConfig.tsx:3441 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label REDACTED:7259 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 22) · ×7
  • (anonymous) (cyclomatic 22) REDACTED:2490 — (anonymous) has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 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.
  • (anonymous) (cyclomatic 22) REDACTED:4936 — (anonymous) 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.
  • (anonymous) (cyclomatic 22) REDACTED:5195 — (anonymous) 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.
  • (anonymous) (cyclomatic 22) REDACTED:9421 — (anonymous) 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.
  • (anonymous) (cyclomatic 22) REDACTED:2779 — (anonymous) has cyclomatic 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous) (cyclomatic 22) REDACTED:1313 — (anonymous) 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.
  • (anonymous) (cyclomatic 22) REDACTED:672 — (anonymous) 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 · (anonymous) (cyclomatic 19) · ×7
  • (anonymous) (cyclomatic 19) REDACTED:995 — (anonymous) has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • (anonymous) (cyclomatic 19) REDACTED:4641 — (anonymous) has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 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.
  • (anonymous) (cyclomatic 19) server/routes/panelBridge.js:1255 — (anonymous) 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.
  • (anonymous) (cyclomatic 19) REDACTED:1596 — (anonymous) has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 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.
  • (anonymous) (cyclomatic 19) REDACTED:2189 — (anonymous) has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 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.
  • (anonymous) (cyclomatic 19) server/routes/serverFinder.js:634 — (anonymous) has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 5 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 19) server/routes/modsSmart.js:306 — (anonymous) has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 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 · (anonymous) (cyclomatic 16) · ×7
  • (anonymous) (cyclomatic 16) REDACTED:5875 — (anonymous) has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 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.
  • (anonymous) (cyclomatic 16) REDACTED:2370 — (anonymous) has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 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.
  • (anonymous) (cyclomatic 16) server/routes/panelBridge.js:2081 — (anonymous) 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.
  • (anonymous) (cyclomatic 16) REDACTED:1172 — (anonymous) has cyclomatic complexity 16 (threshold 15). Of this number, 15 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.
  • (anonymous) (cyclomatic 16) REDACTED:1345 — (anonymous) 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.
  • (anonymous) (cyclomatic 16) REDACTED:322 — (anonymous) 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.
  • (anonymous) (cyclomatic 16) server/routes/playerCharacter.js:249 — (anonymous) has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous) (cognitive 29) · ×7
  • (anonymous) (cognitive 29) REDACTED:518 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, loops 3 (6 pts), error handling 2 (4 pts), ternaries 1 (nesting depth added 11). Of this number, 27 points are the body's own statements and 2 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.
  • (anonymous) (cognitive 29) REDACTED:10507 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), error handling 4 (7 pts), boolean chains 4 (nesting depth added 9). Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 10573, 10553, 10528, …). 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.
  • (anonymous) (cognitive 29) REDACTED:538 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (7 pts), boolean chains 6, error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 9). Of this number, 27 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.
  • (anonymous) (cognitive 29) REDACTED:1313 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 2 (6 pts), boolean chains 5, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 29) REDACTED:385 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 11, error handling 2 (3 pts), other 1 (nesting depth added 4). Of this number, 28 points are the body's own statements and 1 belongs 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.
  • (anonymous) (cognitive 29) REDACTED:856 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4, error handling 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 29) REDACTED:150 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 10, error handling 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D3 · God Classes · MethodTooLong · ×7
  • MethodTooLong: PanelUpdateChecker.spawnWindowsApplyHelper server/services/panelUpdateChecker.js:1276 — MethodTooLong — spawnWindowsApplyHelper runs 833 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 733 over it, 8.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PanelUpdateChecker.preflight server/services/panelUpdateChecker.js:1958 — MethodTooLong — preflight runs 231 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 131 over it, 2.31× 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: PanelUpdateChecker.downloadUpdate server/services/panelUpdateChecker.js:716 — MethodTooLong — downloadUpdate runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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: UpdateChecker.runAutoUpdate REDACTED:648 — MethodTooLong — runAutoUpdate runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× 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: DiscordBot._doStart REDACTED:2312 — MethodTooLong — _doStart runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PanelBridge.getConnectionDiagnostics REDACTED:531 — MethodTooLong — getConnectionDiagnostics runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PanelUpdateChecker.downloadFile server/services/panelUpdateChecker.js:1738 — MethodTooLong — downloadFile runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 18) · ×6
  • (anonymous) (cyclomatic 18) REDACTED:518 — (anonymous) has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 18) REDACTED:5971 — (anonymous) has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 10 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.
  • (anonymous) (cyclomatic 18) REDACTED:9498 — (anonymous) 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.
  • (anonymous) (cyclomatic 18) REDACTED:3042 — (anonymous) 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.
  • (anonymous) (cyclomatic 18) REDACTED:2374 — (anonymous) has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 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.
  • (anonymous) (cyclomatic 18) REDACTED:140 — (anonymous) 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.
AC6 · Visual & motion safety · Focus outline removed inline · ×5
  • Focus outline removed inline client/src/components/CommandPalette.tsx:213 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline client/src/components/ItemPicker.tsx:412 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline client/src/components/ItemPicker.tsx:525 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline client/src/components/VehiclePicker.tsx:376 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline client/src/components/VehiclePicker.tsx:440 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 17) · ×5
  • (anonymous) (cyclomatic 17) REDACTED:2369 — (anonymous) has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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.
  • (anonymous) (cyclomatic 17) REDACTED:5322 — (anonymous) has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 5360, a function literal at line 5370, a function literal at line 5371, …). 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.
  • (anonymous) (cyclomatic 17) REDACTED:3531 — (anonymous) has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous) (cyclomatic 17) server/routes/panelBridge.js:3464 — (anonymous) 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.
  • (anonymous) (cyclomatic 17) REDACTED:892 — (anonymous) has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 933, 939, 961). 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 · (anonymous) (cognitive 23) · ×5
  • (anonymous) (cognitive 23) REDACTED:2791 — (anonymous) has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9, if/else 8, boolean chains 5, error handling 1. 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: 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.
  • (anonymous) (cognitive 23) REDACTED:6994 — (anonymous) has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 4 (8 pts), boolean chains 2, loops 1 (nesting depth added 11). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 7028, 7067). 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.
  • (anonymous) (cognitive 23) server/routes/panelBridge.js:3911 — (anonymous) has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8, boolean chains 5, error handling 4, ternaries 2 (3 pts), other 2, loops 1 (nesting depth added 1). Of this number, 21 points are the body's own statements and 2 belong to 2 function items 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.
  • (anonymous) (cognitive 23) REDACTED:1003 — (anonymous) has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, error handling 2, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • (anonymous) (cognitive 23) REDACTED:672 — (anonymous) has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 6 (7 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · (anonymous) (cognitive 21) · ×5
  • (anonymous) (cognitive 21) REDACTED:1830 — (anonymous) has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 4, error handling 2 (nesting depth added 1). Of this number, 18 points are the body's own statements and 3 belong to 13 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.
  • (anonymous) (cognitive 21) REDACTED:5322 — (anonymous) has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 3 (5 pts), boolean chains 4, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 5360, a function literal at line 5370, a function literal at line 5371, …). 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.
  • (anonymous) (cognitive 21) REDACTED:5875 — (anonymous) has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (7 pts), error handling 2 (3 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 5889, 5878, 5892, …). 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.
  • (anonymous) (cognitive 21) REDACTED:6473 — (anonymous) has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, error handling 3, ternaries 2, loops 1 (nesting depth added 1). Of this number, 20 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous) (cognitive 21) REDACTED:9790 — (anonymous) has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 6, error handling 5 (6 pts), if/else 5 (6 pts), ternaries 3 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 16) · ×5
  • (anonymous) (cognitive 16) REDACTED:1579 — (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 3, ternaries 3, error handling 1, loops 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 1 belongs 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.
  • (anonymous) (cognitive 16) REDACTED:3531 — (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 4, error handling 1. Of this number, 12 points are the body's own statements and 4 belong to 6 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.
  • (anonymous) (cognitive 16) server/routes/panelBridge.js:4569 — (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, error handling 2 (3 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 16) REDACTED:1172 — (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, error handling 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous) (cognitive 16) REDACTED:797 — (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1, loops 1 (nesting depth added 3). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 39) · ×4
  • (anonymous) (cyclomatic 39) REDACTED:9882 — (anonymous) has cyclomatic complexity 39 (threshold 15). Of this number, 31 points are the body's own statements and 8 belong to 11 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 39) REDACTED:2664 — (anonymous) has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous) (cyclomatic 39) REDACTED:2157 — (anonymous) has cyclomatic complexity 39 (threshold 15). Of this number, 25 points are the body's own statements and 14 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous) (cyclomatic 39) REDACTED:2569 — (anonymous) has cyclomatic complexity 39 (threshold 15). Of this number, 35 points are the body's own statements and 4 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 · (anonymous) (cyclomatic 31) · ×4
  • (anonymous) (cyclomatic 31) REDACTED:3939 — (anonymous) has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body's own statements and 10 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.
  • (anonymous) (cyclomatic 31) REDACTED:10080 — (anonymous) has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 belong to 10 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.
  • (anonymous) (cyclomatic 31) REDACTED:6744 — (anonymous) has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 14 of the 31 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 6788, 6802, 6885, …). 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.
  • (anonymous) (cyclomatic 31) REDACTED:546 — (anonymous) 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 · (anonymous) (cyclomatic 21) · ×4
  • (anonymous) (cyclomatic 21) REDACTED:1830 — (anonymous) has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 13 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.
  • (anonymous) (cyclomatic 21) REDACTED:10507 — (anonymous) has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 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.
  • (anonymous) (cyclomatic 21) REDACTED:6624 — (anonymous) has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 21) REDACTED:3090 — (anonymous) has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 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.
D2 · Cognitive Complexity · (anonymous) · ×4
  • (anonymous)::searchForBridge (cognitive 36) server/routes/panelBridge.js:1389 — (anonymous)::searchForBridge has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 3 (9 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::buildLocalModIndex (cognitive 21) REDACTED:4669 — (anonymous)::buildLocalModIndex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), error handling 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::walk (cognitive 21) REDACTED:6848 — (anonymous)::walk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, error handling 1 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::pollOnce (cognitive 20) REDACTED:2510 — (anonymous)::pollOnce has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 3 (7 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 33) · ×4
  • (anonymous) (cognitive 33) REDACTED:1129 — (anonymous) has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, error handling 3 (5 pts), loops 2 (3 pts), ternaries 2 (3 pts), other 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 33) REDACTED:2636 — (anonymous) has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 6, ternaries 2 (3 pts), loops 2, error handling 1 (nesting depth added 7). Of this number, 22 points are the body's own statements and 11 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.
  • (anonymous) (cognitive 33) REDACTED:6744 — (anonymous) has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 12, ternaries 3 (5 pts), error handling 1 (nesting depth added 6). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 6788, 6885, 6802, …). 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.
  • (anonymous) (cognitive 33) REDACTED:340 — (anonymous) has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 6, error handling 2 (3 pts), other 1 (nesting depth added 8). Of this number, 31 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 · (anonymous) (cognitive 32) · ×4
  • (anonymous) (cognitive 32) REDACTED:9421 — (anonymous) has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (6 pts), boolean chains 5, error handling 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 32) REDACTED:5857 — (anonymous) has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 6 (11 pts), boolean chains 4, ternaries 2 (nesting depth added 9). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 6021, a function literal at line 5984, a function literal at line 6065, …). 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.
  • (anonymous) (cognitive 32) REDACTED:6624 — (anonymous) has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 4 (10 pts), boolean chains 4, loops 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 32) REDACTED:355 — (anonymous) has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 8, error handling 3, ternaries 2 (3 pts), other 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D31 · IaC & Container Security · Medium IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R10 · Code Duplication · Duplicated block (31 lines × 2 locations) · ×4
  • Duplicated block (31 lines × 2 locations) client/src/pages/Mods.tsx:985 — client/src/pages/Mods.tsx:985 · client/src/pages/Mods.tsx:1018 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (31 lines × 2 locations) REDACTED:3896 — REDACTED:3896 · REDACTED:4777 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (31 lines × 2 locations) server/routes/serverFinder.js:759 — server/routes/serverFinder.js:759 · server/routes/serverFinder.js:815 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (31 lines × 2 locations) REDACTED:3199 — REDACTED:3199 · REDACTED:3266 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R11 · Import Boundaries · Boundary violation [package · ×4
  • Boundary violation [package:test-cross-package-internals] client/src/lib/__tests__/noDeadDisabledTitleRule.test.ts:5 — client/src/lib/__tests__/noDeadDisabledTitleRule.test.ts:5 reaches past another workspace package's public entry into its internals with a relative path (../../../../eslint-rules/no-dead-disabled-title.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] client/src/lib/__tests__/noDuplicateInterfaceNameRule.test.ts:5 — client/src/lib/__tests__/noDuplicateInterfaceNameRule.test.ts:5 reaches past another workspace package's public entry into its internals with a relative path (../../../../eslint-rules/no-duplicate-interface-name.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] client/src/lib/__tests__/noRawDateFormatRule.test.ts:4 — client/src/lib/__tests__/noRawDateFormatRule.test.ts:4 reaches past another workspace package's public entry into its internals with a relative path (../../../../eslint-rules/no-raw-date-format.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] client/src/lib/__tests__/noRawErrorMessageRule.test.ts:4 — client/src/lib/__tests__/noRawErrorMessageRule.test.ts:4 reaches past another workspace package's public entry into its internals with a relative path (../../../../eslint-rules/no-raw-error-message.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
R4 · Test Coverage · No test reaches this file · ×4
  • No test reaches this file client/scripts/de-lint.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file client/scripts/extract-pz-character-names.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file eslint-rules/no-orphan-translation-default.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file client/src/main.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
S1 · Web-Security Posture · Weak hash algorithm · ×4
  • Weak hash algorithm REDACTED:7277 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm server/services/bridgeDisk.js:168 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm server/utils/modConflictRules.js:120 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm server/utils/modDefinitionExtractors.js:226 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 60) · ×3
  • (anonymous) (cyclomatic 60) REDACTED:8347 — (anonymous) has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous) (cyclomatic 60) REDACTED:474 — (anonymous) has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous) (cyclomatic 60) REDACTED:208 — (anonymous) has cyclomatic complexity 60 (threshold 15). Most of this is not in the body itself: 6 of the 60 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 252, 343). 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 · (anonymous) (cyclomatic 27) · ×3
  • (anonymous) (cyclomatic 27) REDACTED:1129 — (anonymous) 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.
  • (anonymous) (cyclomatic 27) REDACTED:2636 — (anonymous) has cyclomatic complexity 27 (threshold 15). Of this number, 20 points are the body's own statements and 7 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.
  • (anonymous) (cyclomatic 27) REDACTED:385 — (anonymous) has cyclomatic complexity 27 (threshold 15). Of this number, 26 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 · (anonymous) (cyclomatic 24) · ×3
  • (anonymous) (cyclomatic 24) REDACTED:400 — (anonymous) 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.
  • (anonymous) (cyclomatic 24) REDACTED:6473 — (anonymous) has cyclomatic complexity 24 (threshold 15). Of this number, 23 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.
  • (anonymous) (cyclomatic 24) server/routes/panelBridge.js:2475 — (anonymous) 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.
D10 · Test Quality · Skipped test · ×3
  • Skipped test: every registered ErrorCode has a matching key in client/src/locales/en/errors.json -- server/tests/errorCodeRegistry.test.js:363 — Skipped — switched off by it.skip
  • Skipped test: every key in client/src/locales/en/errors.json is a registered ErrorCode value -- server/tests/errorCodeRegistry.test.js:369 — Skipped — switched off by it.skip
  • Skipped test: Start.bat supervisor crash-loop behavior (skipped: ${skipReason}) server/tests/supervisor-restart.test.js:1650 — Skipped — switched off by it.skip
D2 · Cognitive Complexity · (anonymous) (cognitive 28) · ×3
  • (anonymous) (cognitive 28) REDACTED:2316 — (anonymous) has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23 (29 pts), error handling 7 (17 pts), boolean chains 6, other 3, ternaries 3 (nesting depth added 16). 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.
  • (anonymous) (cognitive 28) REDACTED:2779 — (anonymous) has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, ternaries 3 (5 pts), error handling 1 (nesting depth added 7). Of this number, 20 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.
  • (anonymous) (cognitive 28) server/routes/serverFinder.js:634 — (anonymous) has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 4 (8 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 12). Of this number, 25 points are the body's own statements and 3 belong to 5 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.
IC1 · Incompleteness & stubs · Fake-async · ×3
  • Fake-async — async method never awaits REDACTED:840 — `buildEnvironmentReport` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits server/services/bridgeDisk.js:366 — `restoreArchivedBridgeFiles` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits server/services/fileManagerSftpPool.js:486 — `close` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×3
  • Outbound HTTP without resilience REDACTED:4479 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience server/routes/serverFinder.js:481 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience server/routes/serverFinder.js:899 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
R10 · Code Duplication · Duplicated block (37 lines × 2 locations) · ×3
  • Duplicated block (37 lines × 2 locations) client/src/pages/Debug.tsx:7322 — client/src/pages/Debug.tsx:7322 · client/src/pages/Debug.tsx:7359 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (37 lines × 2 locations) server/routes/panelBridge.js:789 — server/routes/panelBridge.js:789 · server/routes/panelBridge.js:986 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (37 lines × 2 locations) server/routes/panelBridge.js:3802 — server/routes/panelBridge.js:3802 · server/routes/panelBridge.js:3842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (34 lines × 2 locations) · ×3
  • Duplicated block (34 lines × 2 locations) client/src/pages/Players.tsx:2548 — client/src/pages/Players.tsx:2548 · client/src/pages/Players.tsx:2620 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (34 lines × 2 locations) REDACTED:2415 — REDACTED:2415 · REDACTED:2616 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (34 lines × 2 locations) server/services/rcon.js:399 — server/services/rcon.js:399 · server/services/rcon.js:500 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 77) · ×2
  • (anonymous) (cyclomatic 77) REDACTED:4308 — (anonymous) has cyclomatic complexity 77 (threshold 15). Of this number, 56 points are the body's own statements and 21 belong to 14 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.
  • (anonymous) (cyclomatic 77) REDACTED:1410 — (anonymous) has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 43) · ×2
  • (anonymous) (cyclomatic 43) REDACTED:8074 — (anonymous) has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous) (cyclomatic 43) server/routes/panelBridge.js:694 — (anonymous) has cyclomatic complexity 43 (threshold 15). Of this number, 30 points are the body's own statements and 13 belong to 11 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 · (anonymous) (cyclomatic 36) · ×2
  • (anonymous) (cyclomatic 36) REDACTED:3463 — (anonymous) has cyclomatic complexity 36 (threshold 15). Of this number, 24 points are the body's own statements and 12 belong to 12 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.
  • (anonymous) (cyclomatic 36) REDACTED:6666 — (anonymous) has cyclomatic complexity 36 (threshold 15). Of this number, 28 points are the body's own statements and 8 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 · (anonymous) (cyclomatic 32) · ×2
  • (anonymous) (cyclomatic 32) REDACTED:1349 — (anonymous) has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 15 of the 32 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 1395, a function literal at line 1369, a function literal at line 1428, …). 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.
  • (anonymous) (cyclomatic 32) server/routes/panelBridge.js:919 — (anonymous) has cyclomatic complexity 32 (threshold 15). Of this number, 19 points are the body's own statements and 13 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 · Servers.Servers · ×2
  • Servers.Servers::handleAddExistingServer (cyclomatic 30) client/src/pages/Servers.tsx:1836 — Servers.Servers::handleAddExistingServer has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (Servers.Servers, Servers.Servers::handleSaveEdit) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • Servers.Servers::handleSaveEdit (cyclomatic 23) client/src/pages/Servers.tsx:1516 — Servers.Servers::handleSaveEdit 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. This shape REPEATS in the file: 2 other methods here (Servers.Servers, Servers.Servers::handleAddExistingServer) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 30) · ×2
  • (anonymous) (cyclomatic 30) REDACTED:355 — (anonymous) 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.
  • (anonymous) (cyclomatic 30) REDACTED:150 — (anonymous) 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 · (anonymous) (cyclomatic 29) · ×2
  • (anonymous) (cyclomatic 29) REDACTED:1457 — (anonymous) has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 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.
  • (anonymous) (cyclomatic 29) REDACTED:662 — (anonymous) has cyclomatic complexity 29 (threshold 15). Of this number, 26 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 · (anonymous) (cyclomatic 28) · ×2
  • (anonymous) (cyclomatic 28) REDACTED:1256 — (anonymous) has cyclomatic complexity 28 (threshold 15). Of this number, 20 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.
  • (anonymous) (cyclomatic 28) REDACTED:340 — (anonymous) has cyclomatic complexity 28 (threshold 15). Of this number, 25 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 · (anonymous) (cyclomatic 26) · ×2
  • (anonymous) (cyclomatic 26) REDACTED:8828 — (anonymous) has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 9 function items inside it that branch (onConflictFound, send, a function literal at line 8866, …). 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.
  • (anonymous) (cyclomatic 26) REDACTED:6401 — (anonymous) has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 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 · BridgeDeliveryPanel.BridgeDeliveryPanel · ×2
  • BridgeDeliveryPanel.BridgeDeliveryPanel::renderChecksum (cyclomatic 25) client/src/components/bridge/BridgeDeliveryPanel.tsx:414 — BridgeDeliveryPanel.BridgeDeliveryPanel::renderChecksum has cyclomatic complexity 25 (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. This shape REPEATS in the file: 2 other methods here (BridgeDeliveryPanel.BridgeDeliveryPanel, BridgeDeliveryPanel.BridgeDeliveryPanel::renderOptionCard) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • BridgeDeliveryPanel.BridgeDeliveryPanel::renderOptionCard (cyclomatic 24) client/src/components/bridge/BridgeDeliveryPanel.tsx:338 — BridgeDeliveryPanel.BridgeDeliveryPanel::renderOptionCard 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. This shape REPEATS in the file: 2 other methods here (BridgeDeliveryPanel.BridgeDeliveryPanel, BridgeDeliveryPanel.BridgeDeliveryPanel::renderChecksum) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ServerSetup.ServerSetup · ×2
  • ServerSetup.ServerSetup::handleQuickSetup (cyclomatic 24) REDACTED:1347 — ServerSetup.ServerSetup::handleQuickSetup has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: 2 other methods here (ServerSetup.ServerSetup, ServerSetup.ServerSetup::stepRequirementMessage) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ServerSetup.ServerSetup::stepRequirementMessage (cyclomatic 20) REDACTED:2695 — ServerSetup.ServerSetup::stepRequirementMessage has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (ServerSetup.ServerSetup, ServerSetup.ServerSetup::handleQuickSetup) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · WorkshopCollectionPanel.WorkshopCollectionPanel · ×2
  • WorkshopCollectionPanel.WorkshopCollectionPanel::runBulk (cyclomatic 23) client/src/components/WorkshopCollectionPanel.tsx:333 — WorkshopCollectionPanel.WorkshopCollectionPanel::runBulk 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. This shape REPEATS in the file: 2 other methods here (WorkshopCollectionPanel.WorkshopCollectionPanel, WorkshopCollectionPanel.WorkshopCollectionPanel::runRowAction) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • WorkshopCollectionPanel.WorkshopCollectionPanel::runRowAction (cyclomatic 20) client/src/components/WorkshopCollectionPanel.tsx:270 — WorkshopCollectionPanel.WorkshopCollectionPanel::runRowAction has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (WorkshopCollectionPanel.WorkshopCollectionPanel, WorkshopCollectionPanel.WorkshopCollectionPanel::runBulk) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Events.Events · ×2
  • Events.Events::buildBridgeArgsFromForm (cyclomatic 21) client/src/pages/Events.tsx:2106 — Events.Events::buildBridgeArgsFromForm 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 shape REPEATS in the file: 2 other methods here (Events.Events, Events.Events::runBridgeOperation) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: Events.getEventSuccessCopy (cyclomatic 55) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • Events.Events::runBridgeOperation (cyclomatic 16) client/src/pages/Events.tsx:2270 — Events.Events::runBridgeOperation has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (Events.Events, Events.Events::buildBridgeArgsFromForm) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: Events.getEventSuccessCopy (cyclomatic 55) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 20) · ×2
  • (anonymous) (cyclomatic 20) REDACTED:9790 — (anonymous) has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 20) server/routes/panelBridge.js:2648 — (anonymous) 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 · LoadOrderList.LoadOrderList · ×2
  • LoadOrderList.LoadOrderList::renderHeader (cyclomatic 19) client/src/components/mods/LoadOrderList.tsx:310 — LoadOrderList.LoadOrderList::renderHeader 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. This shape REPEATS in the file: one other method here (LoadOrderList.LoadOrderList::handleDragOver) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • LoadOrderList.LoadOrderList::handleDragOver (cyclomatic 16) client/src/components/mods/LoadOrderList.tsx:286 — LoadOrderList.LoadOrderList::handleDragOver has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (LoadOrderList.LoadOrderList::renderHeader) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · mods.router.post("/groups/ · ×2
  • mods.router.post("/groups/:id/disable") (cyclomatic 17) REDACTED:5971 — mods.router.post("/groups/:id/disable") has cyclomatic 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: 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.
  • mods.router.post("/groups/:id/enable") (cyclomatic 16) REDACTED:5875 — mods.router.post("/groups/:id/enable") has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 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.
D12 · Dependency Hygiene · Deprecated · ×2
  • Deprecated: eslint client/package.json:56 — eslint 9.39.5, declared in client/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: eslint package.json:65 — eslint 9.39.5, declared in package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
D2 · Cognitive Complexity · (anonymous) (cognitive 64) · ×2
  • (anonymous) (cognitive 64) REDACTED:4670 — (anonymous) has cognitive complexity 64 (threshold 15). Drivers by points: if/else 26 (32 pts), ternaries 10 (19 pts), boolean chains 8, error handling 5 (nesting depth added 15). Of this number, 61 points are the body's own statements and 3 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.
  • (anonymous) (cognitive 64) REDACTED:208 — (anonymous) has cognitive complexity 64 (threshold 15). Drivers by points: if/else 24 (29 pts), boolean chains 22, ternaries 9 (12 pts), error handling 1 (nesting depth added 8). Most of this is not in the body itself: 5 of the 64 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 252, 343). 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 · (anonymous) (cognitive 53) · ×2
  • (anonymous) (cognitive 53) REDACTED:9882 — (anonymous) has cognitive complexity 53 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 9 (14 pts), boolean chains 10, error handling 5 (10 pts), ternaries 3 (nesting depth added 15). Of this number, 44 points are the body's own statements and 9 belong to 11 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.
  • (anonymous) (cognitive 53) REDACTED:7243 — (anonymous) has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 6 (17 pts), boolean chains 14, loops 5 (10 pts), if/else 7, other 3, error handling 2 (nesting depth added 16). Of this number, 52 points are the body's own statements and 1 belongs 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 · (anonymous) (cognitive 46) · ×2
  • (anonymous) (cognitive 46) REDACTED:4110 — (anonymous) has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 7, loops 4 (5 pts), error handling 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 12). Of this number, 27 points are the body's own statements and 19 belong to 5 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.
  • (anonymous) (cognitive 46) REDACTED:6666 — (anonymous) has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 4 (9 pts), ternaries 6 (9 pts), loops 5 (7 pts), boolean chains 5, other 3 (nesting depth added 13). Of this number, 37 points are the body's own statements and 9 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 · (anonymous) (cognitive 42) · ×2
  • (anonymous) (cognitive 42) REDACTED:3939 — (anonymous) has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 7, ternaries 4, loops 1 (2 pts), error handling 1 (nesting depth added 10). Of this number, 19 points are the body's own statements and 23 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.
  • (anonymous) (cognitive 42) REDACTED:10080 — (anonymous) has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (20 pts), loops 4 (7 pts), ternaries 4 (7 pts), boolean chains 6, error handling 2 (nesting depth added 11). Of this number, 31 points are the body's own statements and 11 belong to 10 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 · (anonymous) (cognitive 38) · ×2
  • (anonymous) (cognitive 38) REDACTED:1349 — (anonymous) has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 13, ternaries 4 (8 pts), error handling 2 (3 pts) (nesting depth added 10). Of this number, 16 points are the body's own statements and 22 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.
  • (anonymous) (cognitive 38) REDACTED:3185 — (anonymous) has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 4, ternaries 4, error handling 1, loops 1 (nesting depth added 13). Of this number, 37 points are the body's own statements and 1 belongs to 7 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 · (anonymous) (cognitive 37) · ×2
  • (anonymous) (cognitive 37) REDACTED:5195 — (anonymous) has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 37) server/routes/panelBridge.js:919 — (anonymous) has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 11, loops 2 (5 pts), error handling 2, ternaries 1 (nesting depth added 9). Of this number, 25 points are the body's own statements and 12 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 · Servers.Servers · ×2
  • Servers.Servers::handleAddExistingServer (cognitive 36) client/src/pages/Servers.tsx:1836 — Servers.Servers::handleAddExistingServer has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 9, error handling 2 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (Servers.Servers, Servers.Servers::handleSaveEdit) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • Servers.Servers::handleSaveEdit (cognitive 22) client/src/pages/Servers.tsx:1516 — Servers.Servers::handleSaveEdit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, boolean chains 9, ternaries 2, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (Servers.Servers, Servers.Servers::handleAddExistingServer) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ServerSetup.ServerSetup · ×2
  • ServerSetup.ServerSetup::stepRequirementMessage (cognitive 36) REDACTED:2695 — ServerSetup.ServerSetup::stepRequirementMessage has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (ServerSetup.ServerSetup, ServerSetup.ServerSetup::handleQuickSetup) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ServerSetup.ServerSetup::handleQuickSetup (cognitive 29) REDACTED:1347 — ServerSetup.ServerSetup::handleQuickSetup has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (7 pts), error handling 3 (6 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (ServerSetup.ServerSetup, ServerSetup.ServerSetup::stepRequirementMessage) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · (anonymous) (cognitive 36) · ×2
  • (anonymous) (cognitive 36) REDACTED:3691 — (anonymous) has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 4 (5 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 9). Most of this is not in the body itself: 10 of the 36 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 3725, 3769, 3779, …). 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.
  • (anonymous) (cognitive 36) REDACTED:1457 — (anonymous) has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 7, ternaries 6, error handling 1, loops 1 (nesting depth added 7). Of this number, 25 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 · Events.Events · ×2
  • Events.Events::buildBridgeArgsFromForm (cognitive 33) client/src/pages/Events.tsx:2106 — Events.Events::buildBridgeArgsFromForm has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 8, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (Events.Events, Events.Events::runBridgeOperation) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • Events.Events::runBridgeOperation (cognitive 21) client/src/pages/Events.tsx:2270 — Events.Events::runBridgeOperation has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 7 (8 pts), boolean chains 2, error handling 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (Events.Events, Events.Events::buildBridgeArgsFromForm) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · WorkshopCollectionPanel.WorkshopCollectionPanel · ×2
  • WorkshopCollectionPanel.WorkshopCollectionPanel::runBulk (cognitive 30) client/src/components/WorkshopCollectionPanel.tsx:333 — WorkshopCollectionPanel.WorkshopCollectionPanel::runBulk has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4, error handling 2 (4 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 7). 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. This shape REPEATS in the file: 2 other methods here (WorkshopCollectionPanel.WorkshopCollectionPanel, WorkshopCollectionPanel.WorkshopCollectionPanel::runRowAction) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • WorkshopCollectionPanel.WorkshopCollectionPanel::runRowAction (cognitive 29) client/src/components/WorkshopCollectionPanel.tsx:270 — WorkshopCollectionPanel.WorkshopCollectionPanel::runRowAction has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 4 (9 pts), boolean chains 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (WorkshopCollectionPanel.WorkshopCollectionPanel, WorkshopCollectionPanel.WorkshopCollectionPanel::runBulk) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · (anonymous) (cognitive 30) · ×2
  • (anonymous) (cognitive 30) REDACTED:1256 — (anonymous) has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (11 pts), ternaries 4, loops 2, error handling 1 (nesting depth added 3). Of this number, 21 points are the body's own statements and 9 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.
  • (anonymous) (cognitive 30) REDACTED:140 — (anonymous) has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3 (9 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sandboxLua.parseTokens · ×2
  • sandboxLua.parseTokens::parseTable (cognitive 27) server/utils/sandboxLua.js:307 — sandboxLua.parseTokens::parseTable has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (sandboxLua.parseTokens::parseValue) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • sandboxLua.parseTokens::parseValue (cognitive 17) server/utils/sandboxLua.js:264 — sandboxLua.parseTokens::parseValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (sandboxLua.parseTokens::parseTable) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · (anonymous) (cognitive 26) · ×2
  • (anonymous) (cognitive 26) REDACTED:2369 — (anonymous) has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 4, boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 11). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 2447). 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.
  • (anonymous) (cognitive 26) REDACTED:6724 — (anonymous) has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (23 pts), error handling 6 (10 pts), boolean chains 7, ternaries 4, loops 2, other 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · (anonymous) (cognitive 25) · ×2
  • (anonymous) (cognitive 25) REDACTED:8828 — (anonymous) has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 5, error handling 4 (nesting depth added 1). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 9 function items inside it that branch (send, a function literal at line 8866, onConflictFound, …). 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.
  • (anonymous) (cognitive 25) REDACTED:6401 — (anonymous) has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 8, error handling 1, loops 1 (nesting depth added 2). Of this number, 22 points are the body's own statements and 3 belong to 4 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 · BridgeDeliveryPanel.BridgeDeliveryPanel · ×2
  • BridgeDeliveryPanel.BridgeDeliveryPanel::renderChecksum (cognitive 24) client/src/components/bridge/BridgeDeliveryPanel.tsx:414 — BridgeDeliveryPanel.BridgeDeliveryPanel::renderChecksum has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 14, if/else 5 (6 pts), ternaries 2 (4 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (BridgeDeliveryPanel.BridgeDeliveryPanel::renderOptionCard) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • BridgeDeliveryPanel.BridgeDeliveryPanel::renderOptionCard (cognitive 17) client/src/components/bridge/BridgeDeliveryPanel.tsx:338 — BridgeDeliveryPanel.BridgeDeliveryPanel::renderOptionCard has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, ternaries 7. 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. This shape REPEATS in the file: one other method here (BridgeDeliveryPanel.BridgeDeliveryPanel::renderChecksum) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · RolesPermissions.RolesPermissions · ×2
  • RolesPermissions.RolesPermissions::handleDeleteSubmit (cognitive 20) client/src/pages/RolesPermissions.tsx:397 — RolesPermissions.RolesPermissions::handleDeleteSubmit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (7 pts), boolean chains 5, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (RolesPermissions.RolesPermissions, RolesPermissions.RolesPermissions::applyRoleCapabilities) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • RolesPermissions.RolesPermissions::applyRoleCapabilities (cognitive 17) client/src/pages/RolesPermissions.tsx:225 — RolesPermissions.RolesPermissions::applyRoleCapabilities has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (6 pts), boolean chains 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (RolesPermissions.RolesPermissions, RolesPermissions.RolesPermissions::handleDeleteSubmit) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · (anonymous) (cognitive 20) · ×2
  • (anonymous) (cognitive 20) REDACTED:5971 — (anonymous) has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 3 (4 pts), boolean chains 2, error handling 1, loops 1, other 1 (nesting depth added 3). Of this number, 10 points are the body's own statements and 10 belong to 10 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • (anonymous) (cognitive 20) REDACTED:892 — (anonymous) has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, error handling 1, loops 1, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 933, 939, 961). 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 · LoadOrderList.LoadOrderList · ×2
  • LoadOrderList.LoadOrderList::handleDragOver (cognitive 19) client/src/components/mods/LoadOrderList.tsx:286 — LoadOrderList.LoadOrderList::handleDragOver has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (LoadOrderList.LoadOrderList::renderHeader) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • LoadOrderList.LoadOrderList::renderHeader (cognitive 16) client/src/components/mods/LoadOrderList.tsx:310 — LoadOrderList.LoadOrderList::renderHeader has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 14, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (LoadOrderList.LoadOrderList::handleDragOver) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · (anonymous) (cognitive 19) · ×2
  • (anonymous) (cognitive 19) server/routes/panelBridge.js:3464 — (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • (anonymous) (cognitive 19) server/routes/files.js:332 — (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Console.Console · ×2
  • Console.Console::sendAnnouncement (cognitive 18) client/src/pages/Console.tsx:1057 — Console.Console::sendAnnouncement has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (3 pts), boolean chains 2, error handling 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (Console.Console, Console.Console::handleKeyDown) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • Console.Console::handleKeyDown (cognitive 17) client/src/pages/Console.tsx:1020 — Console.Console::handleKeyDown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (Console.Console, Console.Console::sendAnnouncement) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · mods.router.post("/groups/ · ×2
  • mods.router.post("/groups/:id/disable") (cognitive 18) REDACTED:5971 — mods.router.post("/groups/:id/disable") has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, ternaries 2, error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5988, 5998). 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.
  • mods.router.post("/groups/:id/enable") (cognitive 17) REDACTED:5875 — mods.router.post("/groups/:id/enable") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 2 (3 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 5889). 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.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: AuthService (LCOM4 4) REDACTED:668 — AuthService's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FakeSftpServer (LCOM4 4) server/tests/helpers/fakeSftp.js:88 — FakeSftpServer's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
R10 · Code Duplication · Duplicated block with local edits (70 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (70 matched lines × 2 locations) client/src/pages/Mods.tsx:4179 — client/src/pages/Mods.tsx:4179 · client/src/pages/Mods.tsx:5460 — the two spans are one implementation copied and then locally edited — 495 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (70 matched lines × 2 locations) scripts/jar-audit/extract-sandbox-options.mjs:57 — scripts/jar-audit/extract-sandbox-options.mjs:57 · scripts/jar-audit/extract-server-options.mjs:46 — the two spans are one implementation copied and then locally edited — 599 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (30 lines × 2 locations) · ×2
  • Duplicated block (30 lines × 2 locations) server/routes/panelBridge.js:4860 — server/routes/panelBridge.js:4860 · server/routes/panelBridge.js:4892 — both copies are in the same file, so extract the 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 (30 lines × 2 locations) REDACTED:2835 — REDACTED:2835 · REDACTED:2967 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (29 lines × 2 locations) · ×2
  • Duplicated block (29 lines × 2 locations) client/src/pages/Events.tsx:3134 — client/src/pages/Events.tsx:3134 · client/src/pages/Events.tsx:3170 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (29 lines × 2 locations) client/src/pages/RolesPermissions.tsx:522 — client/src/pages/RolesPermissions.tsx:522 · client/src/pages/Users.tsx:539 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
S1 · Web-Security Posture · Password key derivation is priced too cheaply · ×2
  • Password key derivation is priced too cheaply server/services/adminPasswordLaunch.js:72 — This code fixes scrypt at N=16,384 (r=8, p=1), Node's default. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
  • Password key derivation is priced too cheaply server/services/adminPasswordLaunch.js:82 — This code fixes scrypt at N=16,384 (r=8, p=1), Node's default. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
AC1 · Text alternatives · <canvas> without a text alternative · ×1
  • <canvas> without a text alternative client/src/pages/WorldMap.tsx:412 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC3 · Page structure · Data table has no header cells · ×1
  • Data table has no header cells client/src/pages/Leaderboard.tsx:515 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
AC3 · Page structure · Text directly inside a table row · ×1
  • Text directly inside a table row client/src/pages/Leaderboard.tsx:517 — A <tr> may hold only <td>/<th> cells. Text or a value written between the cells is moved out of the table by the browser, so it is read detached from its row. Wrap it in a <td>.
D1 · Cyclomatic Complexity · Mods.Mods (cyclomatic 1152) · ×1
  • Mods.Mods (cyclomatic 1152) client/src/pages/Mods.tsx:301 — Mods.Mods has cyclomatic complexity 1152 (threshold 15). Of this number, 385 points are the body's own statements and 767 belong to 222 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 · Debug.Debug (cyclomatic 753) · ×1
  • Debug.Debug (cyclomatic 753) client/src/pages/Debug.tsx:1028 — Debug.Debug has cyclomatic complexity 753 (threshold 15). Of this number, 140 points are the body's own statements and 613 belong to 127 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 · WorldMap.WorldMap (cyclomatic 637) · ×1
  • WorldMap.WorldMap (cyclomatic 637) client/src/pages/WorldMap.tsx:657 — WorldMap.WorldMap has cyclomatic complexity 637 (threshold 15). Of this number, 150 points are the body's own statements and 487 belong to 120 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 · Players.Players (cyclomatic 473) · ×1
  • Players.Players (cyclomatic 473) client/src/pages/Players.tsx:288 — Players.Players has cyclomatic complexity 473 (threshold 15). Of this number, 245 points are the body's own statements and 228 belong to 93 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 · ConflictsPanel.ConflictsPanel (cyclomatic 401) · ×1
  • ConflictsPanel.ConflictsPanel (cyclomatic 401) client/src/components/mods/ConflictsPanel.tsx:73 — ConflictsPanel.ConflictsPanel has cyclomatic complexity 401 (threshold 15). Of this number, 123 points are the body's own statements and 278 belong to 56 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 · Settings.Settings (cyclomatic 380) · ×1
  • Settings.Settings (cyclomatic 380) REDACTED:370 — Settings.Settings has cyclomatic complexity 380 (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 shape REPEATS in the file: one other method here (Settings.Settings::handleDownloadPanelUpdate) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Backups.Backups (cyclomatic 312) · ×1
  • Backups.Backups (cyclomatic 312) client/src/pages/Backups.tsx:155 — Backups.Backups has cyclomatic complexity 312 (threshold 15). Of this number, 159 points are the body's own statements and 153 belong to 41 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 · Events.Events (cyclomatic 269) · ×1
  • Events.Events (cyclomatic 269) client/src/pages/Events.tsx:1082 — Events.Events has cyclomatic complexity 269 (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 shape REPEATS in the file: 2 other methods here (Events.Events::buildBridgeArgsFromForm, Events.Events::runBridgeOperation) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 269) · ×1
  • (anonymous) (cyclomatic 269) REDACTED:3451 — (anonymous) has cyclomatic complexity 269 (threshold 15). Of this number, 265 points are the body's own statements and 4 belong to 22 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 · debug.router.get("/diagnostics") (cyclomatic 264) · ×1
  • debug.router.get("/diagnostics") (cyclomatic 264) REDACTED:3451 — debug.router.get("/diagnostics") has cyclomatic complexity 264 (threshold 15). Of this number, 260 points are the body's own statements and 4 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 · Dashboard.Dashboard (cyclomatic 215) · ×1
  • Dashboard.Dashboard (cyclomatic 215) client/src/pages/Dashboard.tsx:264 — Dashboard.Dashboard has cyclomatic complexity 215 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: one other method here (Dashboard.Dashboard::handleAction) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · demo.installDemoFetchShim (cyclomatic 212) · ×1
  • demo.installDemoFetchShim (cyclomatic 212) client/src/lib/demo.ts:1660 — demo.installDemoFetchShim has cyclomatic complexity 212 (threshold 15). Of this number, 62 points are the body's own statements and 150 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 · Servers.Servers (cyclomatic 200) · ×1
  • Servers.Servers (cyclomatic 200) client/src/pages/Servers.tsx:334 — Servers.Servers has cyclomatic complexity 200 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: 2 other methods here (Servers.Servers::handleSaveEdit, Servers.Servers::handleAddExistingServer) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · computeModHealth (cyclomatic 182) · ×1
  • computeModHealth (cyclomatic 182) server/utils/modHealth.js:168 — computeModHealth has cyclomatic complexity 182 (threshold 15). Of this number, 140 points are the body's own statements and 42 belong to 67 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 · ServerConfig.ServerConfig (cyclomatic 176) · ×1
  • ServerConfig.ServerConfig (cyclomatic 176) client/src/pages/ServerConfig.tsx:1011 — ServerConfig.ServerConfig has cyclomatic complexity 176 (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 shape REPEATS in the file: one other method here (ServerConfig.ServerConfig::loadData) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Scheduler.Scheduler (cyclomatic 159) · ×1
  • Scheduler.Scheduler (cyclomatic 159) client/src/pages/Scheduler.tsx:112 — Scheduler.Scheduler has cyclomatic complexity 159 (threshold 15). Of this number, 60 points are the body's own statements and 99 belong to 33 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 · Discord.Discord (cyclomatic 155) · ×1
  • Discord.Discord (cyclomatic 155) client/src/pages/Discord.tsx:337 — Discord.Discord has cyclomatic complexity 155 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: one other method here (Discord.Discord::saveConfig) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 140) · ×1
  • (anonymous) (cyclomatic 140) REDACTED:1795 — (anonymous) has cyclomatic complexity 140 (threshold 15). Of this number, 135 points are the body's own statements and 5 belong to 7 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 · servers.router.put("/ · ×1
  • servers.router.put("/:id") (cyclomatic 136) REDACTED:1795 — servers.router.put("/:id") has cyclomatic complexity 136 (threshold 15). Of this number, 134 points are the body's own statements and 2 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 · (anonymous) (cyclomatic 133) · ×1
  • (anonymous) (cyclomatic 133) REDACTED:441 — (anonymous) has cyclomatic complexity 133 (threshold 15). Of this number, 121 points are the body's own statements and 12 belong to 20 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 · config.router.put("/app-settings") (cyclomatic 129) · ×1
  • config.router.put("/app-settings") (cyclomatic 129) REDACTED:441 — config.router.put("/app-settings") has cyclomatic complexity 129 (threshold 15). Of this number, 121 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 · ServersOverview.ServersOverview (cyclomatic 120) · ×1
  • ServersOverview.ServersOverview (cyclomatic 120) client/src/components/dashboard/ServersOverview.tsx:78 — ServersOverview.ServersOverview has cyclomatic complexity 120 (threshold 15). Of this number, 19 points are the body's own statements and 101 belong to 21 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 · start (cyclomatic 120) · ×1
  • start (cyclomatic 120) REDACTED:4643 — start has cyclomatic complexity 120 (threshold 15). Of this number, 33 points are the body's own statements and 87 belong to 32 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 · performRestart (cyclomatic 115) · ×1
  • performRestart (cyclomatic 115) server/services/scheduler.js:1946 — performRestart has cyclomatic complexity 115 (threshold 15). Of this number, 112 points are the body's own statements and 3 belong to 7 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 · chunks.router.post("/delete-region") (cyclomatic 114) · ×1
  • chunks.router.post("/delete-region") (cyclomatic 114) REDACTED:2014 — chunks.router.post("/delete-region") has cyclomatic complexity 114 (threshold 15). Of this number, 91 points are the body's own statements and 23 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 · (anonymous) (cyclomatic 114) · ×1
  • (anonymous) (cyclomatic 114) REDACTED:2014 — (anonymous) has cyclomatic complexity 114 (threshold 15). Of this number, 90 points are the body's own statements and 24 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 · Chat.Chat (cyclomatic 110) · ×1
  • Chat.Chat (cyclomatic 110) client/src/pages/Chat.tsx:86 — Chat.Chat has cyclomatic complexity 110 (threshold 15). Of this number, 27 points are the body's own statements and 83 belong to 27 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 · RolesPermissions.RolesPermissions (cyclomatic 109) · ×1
  • RolesPermissions.RolesPermissions (cyclomatic 109) client/src/pages/RolesPermissions.tsx:76 — RolesPermissions.RolesPermissions has cyclomatic complexity 109 (threshold 15). Of this number, 26 points are the body's own statements and 83 belong to 27 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 · serverErrorFinder.findServerErrors (cyclomatic 109) · ×1
  • serverErrorFinder.findServerErrors (cyclomatic 109) server/utils/serverErrorFinder.js:763 — serverErrorFinder.findServerErrors has cyclomatic complexity 109 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: one other method here (serverErrorFinder.findServerErrors::record) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · solve (cyclomatic 106) · ×1
  • solve (cyclomatic 106) server/utils/modSmartSort.js:538 — solve has cyclomatic complexity 106 (threshold 15). Of this number, 72 points are the body's own statements and 34 belong to 43 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 · ServerFinder.ServerFinder (cyclomatic 104) · ×1
  • ServerFinder.ServerFinder (cyclomatic 104) client/src/pages/ServerFinder.tsx:129 — ServerFinder.ServerFinder has cyclomatic complexity 104 (threshold 15). Of this number, 19 points are the body's own statements and 85 belong to 17 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 · TaskDialog.TaskDialog (cyclomatic 101) · ×1
  • TaskDialog.TaskDialog (cyclomatic 101) client/src/components/scheduler/TaskDialog.tsx:69 — TaskDialog.TaskDialog has cyclomatic complexity 101 (threshold 15). Of this number, 65 points are the body's own statements and 36 belong to 16 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 · Console.Console (cyclomatic 96) · ×1
  • Console.Console (cyclomatic 96) client/src/pages/Console.tsx:242 — Console.Console has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: one other method here (Console.Console::sendAnnouncement) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 96) · ×1
  • (anonymous) (cyclomatic 96) REDACTED:3805 — (anonymous) has cyclomatic complexity 96 (threshold 15). Of this number, 45 points are the body's own statements and 51 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 · server.router.post("/install") (cyclomatic 95) · ×1
  • server.router.post("/install") (cyclomatic 95) REDACTED:3805 — server.router.post("/install") has cyclomatic complexity 95 (threshold 15). Of this number, 44 points are the body's own statements and 51 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 · FileEditorDialog.FileEditorDialog (cyclomatic 94) · ×1
  • FileEditorDialog.FileEditorDialog (cyclomatic 94) client/src/components/files/FileEditorDialog.tsx:106 — FileEditorDialog.FileEditorDialog has cyclomatic complexity 94 (threshold 15). Of this number, 43 points are the body's own statements and 51 belong to 16 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 · (anonymous) (cyclomatic 92) · ×1
  • (anonymous) (cyclomatic 92) server/routes/panelBridge.js:1584 — (anonymous) has cyclomatic complexity 92 (threshold 15). To reduce it, separate the cases: extract each independent 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 · chunks.router.post("/delete-chunks") (cyclomatic 88) · ×1
  • chunks.router.post("/delete-chunks") (cyclomatic 88) REDACTED:1489 — chunks.router.post("/delete-chunks") has cyclomatic complexity 88 (threshold 15). Of this number, 71 points are the body's own statements and 17 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 · (anonymous) (cyclomatic 88) · ×1
  • (anonymous) (cyclomatic 88) REDACTED:1489 — (anonymous) has cyclomatic complexity 88 (threshold 15). Of this number, 71 points are the body's own statements and 17 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 · modClassification.decide (cyclomatic 86) · ×1
  • modClassification.decide (cyclomatic 86) server/utils/modClassification.js:273 — modClassification.decide has cyclomatic complexity 86 (threshold 15). Of this number, 84 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 · panelBridge.router.post("/command") (cyclomatic 86) · ×1
  • panelBridge.router.post("/command") (cyclomatic 86) server/routes/panelBridge.js:1584 — panelBridge.router.post("/command") has cyclomatic complexity 86 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · checkForUpdates (cyclomatic 86) · ×1
  • checkForUpdates (cyclomatic 86) server/services/modChecker.js:1953 — checkForUpdates has cyclomatic complexity 86 (threshold 15). Of this number, 81 points are the body's own statements and 5 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 · Files.Files (cyclomatic 78) · ×1
  • Files.Files (cyclomatic 78) client/src/pages/Files.tsx:187 — Files.Files has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: one other method here (Files.Files::renderListBody) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Debug.getDiagnosticsFixAction (cyclomatic 77) · ×1
  • Debug.getDiagnosticsFixAction (cyclomatic 77) client/src/pages/Debug.tsx:390 — Debug.getDiagnosticsFixAction has cyclomatic complexity 77 (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 · mods.router.post("/search-workshop-mods") (cyclomatic 77) · ×1
  • mods.router.post("/search-workshop-mods") (cyclomatic 77) REDACTED:4308 — mods.router.post("/search-workshop-mods") has cyclomatic complexity 77 (threshold 15). Of this number, 56 points are the body's own statements and 21 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 · servers.router.post("/") (cyclomatic 77) · ×1
  • servers.router.post("/") (cyclomatic 77) REDACTED:1410 — servers.router.post("/") has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Users.Users (cyclomatic 75) · ×1
  • Users.Users (cyclomatic 75) client/src/pages/Users.tsx:82 — Users.Users has cyclomatic complexity 75 (threshold 15). Most of this is not in the body itself: 15 of the 75 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 603, handleCreate, handleDelete, …). 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 · ServerConfig.IniSettingRow (cyclomatic 73) · ×1
  • ServerConfig.IniSettingRow (cyclomatic 73) client/src/pages/ServerConfig.tsx:390 — ServerConfig.IniSettingRow has cyclomatic complexity 73 (threshold 15). Of this number, 72 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 · buildLoadOrderConstraints (cyclomatic 72) · ×1
  • buildLoadOrderConstraints (cyclomatic 72) server/utils/modSmartSort.js:125 — buildLoadOrderConstraints has cyclomatic complexity 72 (threshold 15). Of this number, 55 points are the body's own statements and 17 belong to 10 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 · ChunkCleaner.ChunkCleaner (cyclomatic 71) · ×1
  • ChunkCleaner.ChunkCleaner (cyclomatic 71) client/src/pages/ChunkCleaner.tsx:320 — ChunkCleaner.ChunkCleaner has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: one other method here (ChunkCleaner.ChunkCleaner::handleDelete) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Login.Login (cyclomatic 71) · ×1
  • Login.Login (cyclomatic 71) client/src/pages/Login.tsx:86 — Login.Login has cyclomatic complexity 71 (threshold 15). Of this number, 40 points are the body's own statements and 31 belong to 11 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 · VehiclePicker.VehiclePicker (cyclomatic 69) · ×1
  • VehiclePicker.VehiclePicker (cyclomatic 69) client/src/components/VehiclePicker.tsx:89 — VehiclePicker.VehiclePicker has cyclomatic complexity 69 (threshold 15). Of this number, 28 points are the body's own statements and 41 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 · planLoadOrder (cyclomatic 69) · ×1
  • planLoadOrder (cyclomatic 69) server/utils/modSmartSort.js:370 — planLoadOrder has cyclomatic complexity 69 (threshold 15). Of this number, 44 points are the body's own statements and 25 belong to 18 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 · startServer (cyclomatic 68) · ×1
  • startServer (cyclomatic 68) REDACTED:2427 — startServer has cyclomatic complexity 68 (threshold 15). Of this number, 67 points are the body's own statements and 1 belongs 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 · (anonymous) (cyclomatic 67) · ×1
  • (anonymous) (cyclomatic 67) REDACTED:6122 — (anonymous) has cyclomatic complexity 67 (threshold 15). Of this number, 66 points are the body's own statements and 1 belongs 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 · Settings.WorkshopCollectionSyncCard (cyclomatic 66) · ×1
  • Settings.WorkshopCollectionSyncCard (cyclomatic 66) REDACTED:6532 — Settings.WorkshopCollectionSyncCard has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: one other method here (Settings.WorkshopCollectionSyncCard::runRowAction) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 66) · ×1
  • (anonymous) (cyclomatic 66) REDACTED:5418 — (anonymous) has cyclomatic complexity 66 (threshold 15). Of this number, 25 points are the body's own statements and 41 belong to 10 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 · server.router.post("/steam-update") (cyclomatic 64) · ×1
  • server.router.post("/steam-update") (cyclomatic 64) REDACTED:5418 — server.router.post("/steam-update") has cyclomatic complexity 64 (threshold 15). Of this number, 24 points are the body's own statements and 40 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 · Layout.Layout (cyclomatic 63) · ×1
  • Layout.Layout (cyclomatic 63) client/src/components/Layout.tsx:178 — Layout.Layout has cyclomatic complexity 63 (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 shape REPEATS in the file: one other method here (Layout.Layout::renderRow) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · debug.router.get("/worldmap") (cyclomatic 63) · ×1
  • debug.router.get("/worldmap") (cyclomatic 63) REDACTED:6122 — debug.router.get("/worldmap") has cyclomatic complexity 63 (threshold 15). Of this number, 62 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 · runAutoUpdate (cyclomatic 63) · ×1
  • runAutoUpdate (cyclomatic 63) REDACTED:648 — runAutoUpdate has cyclomatic complexity 63 (threshold 15). Of this number, 56 points are the body's own statements and 7 belong to 7 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 · healthText.useHealthText.body (cyclomatic 62) · ×1
  • healthText.useHealthText.body (cyclomatic 62) client/src/components/mods/healthText.ts:117 — healthText.useHealthText.body has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModGroupsPanel.ModGroupsPanel (cyclomatic 62) · ×1
  • ModGroupsPanel.ModGroupsPanel (cyclomatic 62) client/src/components/mods/ModGroupsPanel.tsx:94 — ModGroupsPanel.ModGroupsPanel has cyclomatic complexity 62 (threshold 15). Of this number, 37 points are the body's own statements and 25 belong to 10 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 · modGroupSuggestions.computeGroupSuggestions (cyclomatic 62) · ×1
  • modGroupSuggestions.computeGroupSuggestions (cyclomatic 62) server/utils/modGroupSuggestions.js:190 — modGroupSuggestions.computeGroupSuggestions has cyclomatic complexity 62 (threshold 15). Of this number, 47 points are the body's own statements and 15 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 · Events.BridgeResultDisplay (cyclomatic 61) · ×1
  • Events.BridgeResultDisplay (cyclomatic 61) client/src/pages/Events.tsx:681 — Events.BridgeResultDisplay has cyclomatic complexity 61 (threshold 15). Of this number, 26 points are the body's own statements and 35 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 · OidcSettings.OidcSettings (cyclomatic 61) · ×1
  • OidcSettings.OidcSettings (cyclomatic 61) client/src/pages/OidcSettings.tsx:102 — OidcSettings.OidcSettings has cyclomatic complexity 61 (threshold 15). Of this number, 41 points are the body's own statements and 20 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 · extractArchiveToStaging (cyclomatic 61) · ×1
  • extractArchiveToStaging (cyclomatic 61) server/services/backupRestoreExtract.js:210 — extractArchiveToStaging has cyclomatic complexity 61 (threshold 15). Most of this is not in the body itself: 12 of the 61 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 324, entryCapOf, (anonymous)::(anonymous)::transform, …). 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 · discord.router.put("/config") (cyclomatic 60) · ×1
  • discord.router.put("/config") (cyclomatic 60) REDACTED:208 — discord.router.put("/config") has cyclomatic complexity 60 (threshold 15). Most of this is not in the body itself: 6 of the 60 points are its own statements and the rest belongs to one function literal inside it that branches (line 252). 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 · detectConflicts (cyclomatic 60) · ×1
  • detectConflicts (cyclomatic 60) REDACTED:7660 — detectConflicts has cyclomatic complexity 60 (threshold 15). Of this number, 58 points are the body's own statements and 2 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 · HealthView.HealthView (cyclomatic 59) · ×1
  • HealthView.HealthView (cyclomatic 59) client/src/components/mods/HealthView.tsx:53 — HealthView.HealthView has cyclomatic complexity 59 (threshold 15). Of this number, 26 points are the body's own statements and 33 belong to 10 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 · chunks.router.get("/chunks/ · ×1
  • chunks.router.get("/chunks/:saveName") (cyclomatic 59) REDACTED:1119 — chunks.router.get("/chunks/:saveName") has cyclomatic complexity 59 (threshold 15). Of this number, 47 points are the body's own statements and 12 belong to 9 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 · (anonymous) (cyclomatic 59) · ×1
  • (anonymous) (cyclomatic 59) REDACTED:1119 — (anonymous) has cyclomatic complexity 59 (threshold 15). Of this number, 47 points are the body's own statements and 12 belong to 12 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 · ModGroupDialog.ModGroupDialog (cyclomatic 58) · ×1
  • ModGroupDialog.ModGroupDialog (cyclomatic 58) client/src/components/mods/ModGroupDialog.tsx:73 — ModGroupDialog.ModGroupDialog has cyclomatic complexity 58 (threshold 15). Of this number, 24 points are the body's own statements and 34 belong to 12 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 · server.router.post("/wipe") (cyclomatic 58) · ×1
  • server.router.post("/wipe") (cyclomatic 58) REDACTED:8347 — server.router.post("/wipe") has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent 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 · Leaderboard.Leaderboard (cyclomatic 56) · ×1
  • Leaderboard.Leaderboard (cyclomatic 56) client/src/pages/Leaderboard.tsx:196 — Leaderboard.Leaderboard has cyclomatic complexity 56 (threshold 15). Of this number, 29 points are the body's own statements and 27 belong to 7 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 · Setup.Setup (cyclomatic 56) · ×1
  • Setup.Setup (cyclomatic 56) client/src/pages/Setup.tsx:43 — Setup.Setup has cyclomatic complexity 56 (threshold 15). Of this number, 40 points are the body's own statements and 16 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WorkshopCollectionPanel.WorkshopCollectionPanel (cyclomatic 56) · ×1
  • WorkshopCollectionPanel.WorkshopCollectionPanel (cyclomatic 56) client/src/components/WorkshopCollectionPanel.tsx:127 — WorkshopCollectionPanel.WorkshopCollectionPanel has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: 2 other methods here (WorkshopCollectionPanel.WorkshopCollectionPanel::runRowAction, WorkshopCollectionPanel.WorkshopCollectionPanel::runBulk) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · scheduler.router.put("/tasks/ · ×1
  • scheduler.router.put("/tasks/:id") (cyclomatic 56) REDACTED:474 — scheduler.router.put("/tasks/:id") has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent 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 · RconService.execute (cyclomatic 55) · ×1
  • RconService.execute (cyclomatic 55) server/services/rcon.js:1665 — RconService.execute has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CommandPalette.CommandPalette (cyclomatic 54) · ×1
  • CommandPalette.CommandPalette (cyclomatic 54) client/src/components/CommandPalette.tsx:49 — CommandPalette.CommandPalette has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 3 of the 54 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 243, onInputKeyDown, a function literal at line 62, …). 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 · FileDiffViewer.FileDiffViewer (cyclomatic 54) · ×1
  • FileDiffViewer.FileDiffViewer (cyclomatic 54) client/src/components/FileDiffViewer.tsx:100 — FileDiffViewer.FileDiffViewer has cyclomatic complexity 54 (threshold 15). Of this number, 43 points are the body's own statements and 11 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 · SpawnBrowser.SpawnBrowser (cyclomatic 52) · ×1
  • SpawnBrowser.SpawnBrowser (cyclomatic 52) client/src/components/SpawnBrowser.tsx:81 — SpawnBrowser.SpawnBrowser has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (SpawnBrowser.SpawnBrowser::handleKeyDown) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · fileManagerProtectedAreas.buildProtectionContext (cyclomatic 52) · ×1
  • fileManagerProtectedAreas.buildProtectionContext (cyclomatic 52) server/services/fileManagerProtectedAreas.js:181 — fileManagerProtectedAreas.buildProtectionContext has cyclomatic complexity 52 (threshold 15). Of this number, 43 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · triggerModRestart (cyclomatic 52) · ×1
  • triggerModRestart (cyclomatic 52) server/services/modChecker.js:1640 — triggerModRestart has cyclomatic complexity 52 (threshold 15). Of this number, 48 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.router.post("/quick-setup") (cyclomatic 51) · ×1
  • server.router.post("/quick-setup") (cyclomatic 51) REDACTED:4670 — server.router.post("/quick-setup") has cyclomatic complexity 51 (threshold 15). Of this number, 48 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 · (anonymous) (cyclomatic 51) · ×1
  • (anonymous) (cyclomatic 51) REDACTED:4670 — (anonymous) has cyclomatic complexity 51 (threshold 15). Of this number, 48 points are the body's own statements and 3 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 · OrderRuleDialog.OrderRuleDialog (cyclomatic 50) · ×1
  • OrderRuleDialog.OrderRuleDialog (cyclomatic 50) client/src/components/mods/OrderRuleDialog.tsx:50 — OrderRuleDialog.OrderRuleDialog has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 11 of the 50 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 215, onSearchKeyDown, submit, …). 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 · PanelUpdateChecker.preflight (cyclomatic 50) · ×1
  • PanelUpdateChecker.preflight (cyclomatic 50) server/services/panelUpdateChecker.js:1958 — PanelUpdateChecker.preflight has cyclomatic complexity 50 (threshold 15). Of this number, 47 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _doCreateBackup (cyclomatic 50) · ×1
  • _doCreateBackup (cyclomatic 50) server/services/backupService.js:1036 — _doCreateBackup has cyclomatic complexity 50 (threshold 15). Of this number, 20 points are the body's own statements and 30 belong to 19 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 · useFixEverything.useFixEverything (cyclomatic 49) · ×1
  • useFixEverything.useFixEverything (cyclomatic 49) client/src/components/mods/useFixEverything.tsx:61 — useFixEverything.useFixEverything has cyclomatic complexity 49 (threshold 15). Of this number, 38 points are the body's own statements and 11 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mods.router.post("/write-to-ini") (cyclomatic 49) · ×1
  • mods.router.post("/write-to-ini") (cyclomatic 49) REDACTED:2097 — mods.router.post("/write-to-ini") has cyclomatic complexity 49 (threshold 15). Of this number, 43 points are the body's own statements and 6 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 · (anonymous) (cyclomatic 49) · ×1
  • (anonymous) (cyclomatic 49) REDACTED:2097 — (anonymous) has cyclomatic complexity 49 (threshold 15). Of this number, 43 points are the body's own statements and 6 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 · ServerConfig.SandboxSettingRow (cyclomatic 46) · ×1
  • ServerConfig.SandboxSettingRow (cyclomatic 46) client/src/pages/ServerConfig.tsx:720 — ServerConfig.SandboxSettingRow has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · modConflictSuggestions.suggestConflictWinner (cyclomatic 46) · ×1
  • modConflictSuggestions.suggestConflictWinner (cyclomatic 46) server/utils/modConflictSuggestions.js:104 — modConflictSuggestions.suggestConflictWinner has cyclomatic complexity 46 (threshold 15). Of this number, 39 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · extract-pz-sandbox-ground-truth.main (cyclomatic 45) · ×1
  • extract-pz-sandbox-ground-truth.main (cyclomatic 45) client/scripts/extract-pz-sandbox-ground-truth.mjs:350 — extract-pz-sandbox-ground-truth.main has cyclomatic complexity 45 (threshold 15). Of this number, 39 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 · mods.router.post("/remove-from-ini") (cyclomatic 45) · ×1
  • mods.router.post("/remove-from-ini") (cyclomatic 45) REDACTED:3214 — mods.router.post("/remove-from-ini") has cyclomatic complexity 45 (threshold 15). Of this number, 16 points are the body's own statements and 29 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 · (anonymous) (cyclomatic 45) · ×1
  • (anonymous) (cyclomatic 45) REDACTED:3214 — (anonymous) has cyclomatic complexity 45 (threshold 15). Of this number, 16 points are the body's own statements and 29 belong to 13 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 · BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog (cyclomatic 44) · ×1
  • BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog (cyclomatic 44) client/src/components/bridge/BridgeDeliverySwitchDialog.tsx:58 — BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog 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. This shape REPEATS in the file: one other method here (BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog::apply) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · CharacterImportExportDialog.CharacterImportExportDialog (cyclomatic 44) · ×1
  • CharacterImportExportDialog.CharacterImportExportDialog (cyclomatic 44) client/src/components/players/CharacterImportExportDialog.tsx:58 — CharacterImportExportDialog.CharacterImportExportDialog has cyclomatic complexity 44 (threshold 15). Of this number, 17 points are the body's own statements and 27 belong to 13 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mods.router.get("/conflicts/diff") (cyclomatic 44) · ×1
  • mods.router.get("/conflicts/diff") (cyclomatic 44) REDACTED:9069 — mods.router.get("/conflicts/diff") 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 · (anonymous) (cyclomatic 44) · ×1
  • (anonymous) (cyclomatic 44) REDACTED:9069 — (anonymous) 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 · modIniEdit.applyModListFix (cyclomatic 43) · ×1
  • modIniEdit.applyModListFix (cyclomatic 43) REDACTED:166 — modIniEdit.applyModListFix has cyclomatic complexity 43 (threshold 15). Of this number, 31 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.router.post("/wipe/preview") (cyclomatic 43) · ×1
  • server.router.post("/wipe/preview") (cyclomatic 43) REDACTED:8074 — server.router.post("/wipe/preview") has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · servers.readServerStatuses (cyclomatic 43) · ×1
  • servers.readServerStatuses (cyclomatic 43) REDACTED:895 — servers.readServerStatuses has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 10 of the 43 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 939, startedAtFor, a function literal at line 1086). 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 · characterImport.characterImportArgs (cyclomatic 43) · ×1
  • characterImport.characterImportArgs (cyclomatic 43) server/utils/characterImport.js:77 — characterImport.characterImportArgs has cyclomatic complexity 43 (threshold 15). Of this number, 30 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _doStart (cyclomatic 43) · ×1
  • _doStart (cyclomatic 43) REDACTED:2312 — _doStart has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 11 of the 43 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 2358, a function literal at line 2419, a function literal at line 2424, …). 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 · panelBridge.router.post("/auto-configure") (cyclomatic 42) · ×1
  • panelBridge.router.post("/auto-configure") (cyclomatic 42) server/routes/panelBridge.js:694 — panelBridge.router.post("/auto-configure") has cyclomatic complexity 42 (threshold 15). Of this number, 29 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 42) · ×1
  • (anonymous) (cyclomatic 42) REDACTED:2316 — (anonymous) has cyclomatic complexity 42 (threshold 15). Of this number, 26 points are the body's own statements and 16 belong to 9 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 · FixAllDialog.FixAllDialog (cyclomatic 41) · ×1
  • FixAllDialog.FixAllDialog (cyclomatic 41) client/src/components/diagnostics/FixAllDialog.tsx:23 — FixAllDialog.FixAllDialog has cyclomatic complexity 41 (threshold 15). Of this number, 25 points are the body's own statements and 16 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 · mods.router.post("/discover-mod-ids") (cyclomatic 41) · ×1
  • mods.router.post("/discover-mod-ids") (cyclomatic 41) REDACTED:6264 — mods.router.post("/discover-mod-ids") has cyclomatic complexity 41 (threshold 15). Of this number, 40 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 · (anonymous) (cyclomatic 41) · ×1
  • (anonymous) (cyclomatic 41) REDACTED:6264 — (anonymous) has cyclomatic complexity 41 (threshold 15). Of this number, 39 points are the body's own statements and 2 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 · applyDeliverySwitch (cyclomatic 41) · ×1
  • applyDeliverySwitch (cyclomatic 41) server/services/bridgeDelivery.js:1173 — applyDeliverySwitch has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 1 of the 41 points is its own statement and the rest belongs to 13 function items inside it that branch (a function literal at line 1179, a function literal at line 1264, a function literal at line 1292, …). 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 · ServerSetup.ServerSetup (cyclomatic 40) · ×1
  • ServerSetup.ServerSetup (cyclomatic 40) REDACTED:303 — ServerSetup.ServerSetup has cyclomatic complexity 40 (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 shape REPEATS in the file: 2 other methods here (ServerSetup.ServerSetup::handleQuickSetup, ServerSetup.ServerSetup::stepRequirementMessage) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · WorkshopCollectionPanel.Row (cyclomatic 40) · ×1
  • WorkshopCollectionPanel.Row (cyclomatic 40) client/src/components/WorkshopCollectionPanel.tsx:905 — WorkshopCollectionPanel.Row has cyclomatic complexity 40 (threshold 15). Of this number, 39 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 · TrashView.TrashView (cyclomatic 40) · ×1
  • TrashView.TrashView (cyclomatic 40) client/src/components/files/TrashView.tsx:38 — TrashView.TrashView has cyclomatic complexity 40 (threshold 15). Of this number, 19 points are the body's own statements and 21 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 · ServerManager._scanDedicatedServerProcesses (cyclomatic 40) · ×1
  • ServerManager._scanDedicatedServerProcesses (cyclomatic 40) REDACTED:1745 — ServerManager._scanDedicatedServerProcesses has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 1906, 1852, 1766, …). 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 · PanelUpdateChecker.downloadUpdate (cyclomatic 40) · ×1
  • PanelUpdateChecker.downloadUpdate (cyclomatic 40) server/services/panelUpdateChecker.js:716 — PanelUpdateChecker.downloadUpdate has cyclomatic complexity 40 (threshold 15). Of this number, 38 points are the body's own statements and 2 belong to 2 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 · (anonymous) (cyclomatic 40) · ×1
  • (anonymous) (cyclomatic 40) REDACTED:7243 — (anonymous) has cyclomatic complexity 40 (threshold 15). Of this number, 39 points are the body's own statements and 1 belongs 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 · BridgeChecksumDialog.BridgeChecksumDialog (cyclomatic 39) · ×1
  • BridgeChecksumDialog.BridgeChecksumDialog (cyclomatic 39) client/src/components/bridge/BridgeChecksumDialog.tsx:67 — BridgeChecksumDialog.BridgeChecksumDialog has cyclomatic complexity 39 (threshold 15). Of this number, 26 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · chunks.router.get("/stats/ · ×1
  • chunks.router.get("/stats/:saveName") (cyclomatic 39) REDACTED:2569 — chunks.router.get("/stats/:saveName") has cyclomatic complexity 39 (threshold 15). Of this number, 35 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 · modClassification.classifyMods (cyclomatic 39) · ×1
  • modClassification.classifyMods (cyclomatic 39) server/utils/modClassification.js:197 — modClassification.classifyMods has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mods.detectScriptDefinitionConflicts (cyclomatic 39) · ×1
  • mods.detectScriptDefinitionConflicts (cyclomatic 39) REDACTED:7912 — mods.detectScriptDefinitionConflicts has cyclomatic complexity 39 (threshold 15). Of this number, 36 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mods.router.post("/batch-delete-disk-mods") (cyclomatic 39) · ×1
  • mods.router.post("/batch-delete-disk-mods") (cyclomatic 39) REDACTED:9882 — mods.router.post("/batch-delete-disk-mods") has cyclomatic complexity 39 (threshold 15). Of this number, 31 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · serverErrorFinder.fixesFor (cyclomatic 39) · ×1
  • serverErrorFinder.fixesFor (cyclomatic 39) server/utils/serverErrorFinder.js:496 — serverErrorFinder.fixesFor has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.app.post("/api/panel/restart") (cyclomatic 39) · ×1
  • index.app.post("/api/panel/restart") (cyclomatic 39) REDACTED:2157 — index.app.post("/api/panel/restart") has cyclomatic complexity 39 (threshold 15). Of this number, 25 points are the body's own statements and 14 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 · DashboardPerformanceCharts.DashboardPerformanceCharts (cyclomatic 38) · ×1
  • DashboardPerformanceCharts.DashboardPerformanceCharts (cyclomatic 38) client/src/components/DashboardPerformanceCharts.tsx:73 — DashboardPerformanceCharts.DashboardPerformanceCharts has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 14 of the 38 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 110, 224). 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 · chunks.router.get("/saves") (cyclomatic 38) · ×1
  • chunks.router.get("/saves") (cyclomatic 38) REDACTED:688 — chunks.router.get("/saves") has cyclomatic complexity 38 (threshold 15). Of this number, 29 points are the body's own statements and 9 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 · bridgeDelivery.reconcileInner (cyclomatic 38) · ×1
  • bridgeDelivery.reconcileInner (cyclomatic 38) server/services/bridgeDelivery.js:1459 — bridgeDelivery.reconcileInner has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 5 of the 38 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1468, 1485). 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 · browserCookies.pickSteamCookies (cyclomatic 38) · ×1
  • browserCookies.pickSteamCookies (cyclomatic 38) REDACTED:555 — browserCookies.pickSteamCookies has cyclomatic complexity 38 (threshold 15). Of this number, 23 points are the body's own statements and 15 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 38) · ×1
  • (anonymous) (cyclomatic 38) REDACTED:688 — (anonymous) has cyclomatic complexity 38 (threshold 15). Of this number, 29 points are the body's own statements and 9 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 · CharacterInventory.CharacterInventory (cyclomatic 37) · ×1
  • CharacterInventory.CharacterInventory (cyclomatic 37) client/src/components/players/CharacterInventory.tsx:209 — CharacterInventory.CharacterInventory has cyclomatic complexity 37 (threshold 15). Of this number, 29 points are the body's own statements and 8 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 · modLoadOrder.analyzeModOrder (cyclomatic 37) · ×1
  • modLoadOrder.analyzeModOrder (cyclomatic 37) server/utils/modLoadOrder.js:560 — modLoadOrder.analyzeModOrder has cyclomatic complexity 37 (threshold 15). Of this number, 33 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 · fileManagerService.deleteItems (cyclomatic 37) · ×1
  • fileManagerService.deleteItems (cyclomatic 37) server/services/fileManagerService.js:1251 — fileManagerService.deleteItems has cyclomatic complexity 37 (threshold 15). Of this number, 35 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 · fileManagerService.receiveUpload (cyclomatic 37) · ×1
  • fileManagerService.receiveUpload (cyclomatic 37) server/services/fileManagerService.js:1595 — fileManagerService.receiveUpload 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 · containerShutdown.saveAndStopLocalServers (cyclomatic 37) · ×1
  • containerShutdown.saveAndStopLocalServers (cyclomatic 37) server/services/containerShutdown.js:96 — containerShutdown.saveAndStopLocalServers has cyclomatic complexity 37 (threshold 15). Of this number, 25 points are the body's own statements and 12 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 · (anonymous) (cyclomatic 37) · ×1
  • (anonymous) (cyclomatic 37) REDACTED:6724 — (anonymous) has cyclomatic complexity 37 (threshold 15). Of this number, 24 points are the body's own statements and 13 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 · _runRestore (cyclomatic 37) · ×1
  • _runRestore (cyclomatic 37) server/services/backupService.js:2218 — _runRestore has cyclomatic complexity 37 (threshold 15). Of this number, 36 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 · saveText (cyclomatic 37) · ×1
  • saveText (cyclomatic 37) server/services/fileManagerService.js:849 — saveText 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 · Dashboard.Dashboard · ×1
  • Dashboard.Dashboard::handleAction (cyclomatic 36) client/src/pages/Dashboard.tsx:1020 — Dashboard.Dashboard::handleAction has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Dashboard.Dashboard) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · TimezonePicker.TimezonePicker (cyclomatic 36) · ×1
  • TimezonePicker.TimezonePicker (cyclomatic 36) client/src/components/scheduler/TimezonePicker.tsx:66 — TimezonePicker.TimezonePicker has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 13 of the 36 points are its own statements and the rest belongs to 8 function items inside it that branch (handleKeyDown, a function literal at line 99, a function literal at line 83, …). 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 · paths.setDataPaths (cyclomatic 36) · ×1
  • paths.setDataPaths (cyclomatic 36) server/utils/paths.js:307 — paths.setDataPaths has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 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 · sandboxLua.findOverwrittenTableOpeners (cyclomatic 36) · ×1
  • sandboxLua.findOverwrittenTableOpeners (cyclomatic 36) server/utils/sandboxLua.js:747 — sandboxLua.findOverwrittenTableOpeners has cyclomatic complexity 36 (threshold 15). Of this number, 25 points are the body's own statements and 11 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 · modLoadOrder.computeEffectiveModOrder (cyclomatic 36) · ×1
  • modLoadOrder.computeEffectiveModOrder (cyclomatic 36) server/utils/modLoadOrder.js:285 — modLoadOrder.computeEffectiveModOrder has cyclomatic complexity 36 (threshold 15). Of this number, 18 points are the body's own statements and 18 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · demoSmart.demoPlan (cyclomatic 35) · ×1
  • demoSmart.demoPlan (cyclomatic 35) client/src/lib/demoSmart.ts:96 — demoSmart.demoPlan has cyclomatic complexity 35 (threshold 15). Of this number, 26 points are the body's own statements and 9 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 · ItemPicker.ItemPicker (cyclomatic 35) · ×1
  • ItemPicker.ItemPicker (cyclomatic 35) client/src/components/ItemPicker.tsx:98 — ItemPicker.ItemPicker 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. This shape REPEATS in the file: one other method here (ItemPicker.ItemPicker::handleKeyDown) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · GroupSections.GroupSections (cyclomatic 35) · ×1
  • GroupSections.GroupSections (cyclomatic 35) client/src/components/mods/GroupSections.tsx:60 — GroupSections.GroupSections has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 2 of the 35 points are its own statements and the rest belongs to 6 function items inside it that branch (renderGroupHeader, a function literal at line 82, renderRow, …). 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 · mods.router.post("/batch-remove") (cyclomatic 35) · ×1
  • mods.router.post("/batch-remove") (cyclomatic 35) REDACTED:3463 — mods.router.post("/batch-remove") has cyclomatic complexity 35 (threshold 15). Of this number, 23 points are the body's own statements and 12 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 · smartText.useSmartText (cyclomatic 34) · ×1
  • smartText.useSmartText (cyclomatic 34) client/src/components/mods/smartText.ts:31 — smartText.useSmartText has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 40, 74, 91, …). 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 · modContentProfile.summarizeModFiles (cyclomatic 34) · ×1
  • modContentProfile.summarizeModFiles (cyclomatic 34) server/utils/modContentProfile.js:89 — modContentProfile.summarizeModFiles 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 · mods.router.post("/add-all-resolved-deps") (cyclomatic 34) · ×1
  • mods.router.post("/add-all-resolved-deps") (cyclomatic 34) REDACTED:4110 — mods.router.post("/add-all-resolved-deps") has cyclomatic complexity 34 (threshold 15). Of this number, 24 points are the body's own statements and 10 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 · debug.router.post("/clear-stale-locks") (cyclomatic 34) · ×1
  • debug.router.post("/clear-stale-locks") (cyclomatic 34) REDACTED:6724 — debug.router.post("/clear-stale-locks") has cyclomatic complexity 34 (threshold 15). Of this number, 21 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · debug.router.get("/activity") (cyclomatic 34) · ×1
  • debug.router.get("/activity") (cyclomatic 34) REDACTED:7243 — debug.router.get("/activity") has cyclomatic complexity 34 (threshold 15). Of this number, 33 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 · server.router.post("/start") (cyclomatic 34) · ×1
  • server.router.post("/start") (cyclomatic 34) REDACTED:2316 — server.router.post("/start") has cyclomatic complexity 34 (threshold 15). Of this number, 21 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 34) · ×1
  • (anonymous) (cyclomatic 34) REDACTED:4110 — (anonymous) has cyclomatic complexity 34 (threshold 15). Of this number, 24 points are the body's own statements and 10 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 · main (cyclomatic 34) · ×1
  • main (cyclomatic 34) build.js:1664 — main has cyclomatic complexity 34 (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 · buildCharacterView (cyclomatic 34) · ×1
  • buildCharacterView (cyclomatic 34) server/routes/playerCharacter.js:141 — buildCharacterView has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs 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 · RconService._doConnect (cyclomatic 33) · ×1
  • RconService._doConnect (cyclomatic 33) server/services/rcon.js:1295 — RconService._doConnect 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 · mods.router.post("/repair-map-entries") (cyclomatic 33) · ×1
  • mods.router.post("/repair-map-entries") (cyclomatic 33) REDACTED:3691 — mods.router.post("/repair-map-entries") has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 13 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 3725). 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 · mods.buildFileIndex (cyclomatic 33) · ×1
  • mods.buildFileIndex (cyclomatic 33) REDACTED:7331 — mods.buildFileIndex 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 · (anonymous) (cyclomatic 33) · ×1
  • (anonymous) (cyclomatic 33) REDACTED:3691 — (anonymous) has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 13 of the 33 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 3725, 3769, 3779, …). 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 · refreshLaunchTargetBeforeStart (cyclomatic 33) · ×1
  • refreshLaunchTargetBeforeStart (cyclomatic 33) REDACTED:2020 — refreshLaunchTargetBeforeStart 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 · stopOtherServer (cyclomatic 33) · ×1
  • stopOtherServer (cyclomatic 33) server/services/otherServerLifecycle.js:241 — stopOtherServer has cyclomatic complexity 33 (threshold 15). Of this number, 26 points are the body's own statements and 7 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 · FileList.FileList · ×1
  • FileList.FileList::handleKeyDown (cyclomatic 32) client/src/components/files/FileList.tsx:186 — FileList.FileList::handleKeyDown has cyclomatic complexity 32 (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 · CharacterSummary.CharacterSummary (cyclomatic 32) · ×1
  • CharacterSummary.CharacterSummary (cyclomatic 32) client/src/components/players/CharacterSummary.tsx:21 — CharacterSummary.CharacterSummary 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 · TemplatePreviewDialog.TemplatePreviewDialog (cyclomatic 32) · ×1
  • TemplatePreviewDialog.TemplatePreviewDialog (cyclomatic 32) client/src/components/templates/TemplatePreviewDialog.tsx:37 — TemplatePreviewDialog.TemplatePreviewDialog 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 6 function items inside it that branch (a function literal at line 63, handleApply, a function literal at line 137, …). 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 · mods.router.get("/collection/diff") (cyclomatic 32) · ×1
  • mods.router.get("/collection/diff") (cyclomatic 32) REDACTED:1349 — mods.router.get("/collection/diff") has cyclomatic complexity 32 (threshold 15). Of this number, 19 points are the body's own statements and 13 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 · mods.router.post("/add-to-ini-bulk") (cyclomatic 32) · ×1
  • mods.router.post("/add-to-ini-bulk") (cyclomatic 32) REDACTED:6666 — mods.router.post("/add-to-ini-bulk") has cyclomatic complexity 32 (threshold 15). Of this number, 24 points are the body's own statements and 8 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 · panelBridge.router.get("/scan-server/ · ×1
  • panelBridge.router.get("/scan-server/:serverId") (cyclomatic 32) server/routes/panelBridge.js:919 — panelBridge.router.get("/scan-server/:serverId") has cyclomatic complexity 32 (threshold 15). Of this number, 19 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.handlePanelUpdateDownload (cyclomatic 32) · ×1
  • index.handlePanelUpdateDownload (cyclomatic 32) REDACTED:2552 — index.handlePanelUpdateDownload has cyclomatic 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, separate the cases: extract each independent 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 · streamZip (cyclomatic 32) · ×1
  • streamZip (cyclomatic 32) server/services/fileManagerZip.js:238 — streamZip has cyclomatic complexity 32 (threshold 15). Of this number, 25 points are the body's own statements and 7 belong to 7 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 · useSteamBranches.useSteamBranches (cyclomatic 31) · ×1
  • useSteamBranches.useSteamBranches (cyclomatic 31) client/src/hooks/useSteamBranches.ts:43 — useSteamBranches.useSteamBranches has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 80, 144, 116, …). 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 · modGroups.keepTogetherForcedApart (cyclomatic 31) · ×1
  • modGroups.keepTogetherForcedApart (cyclomatic 31) server/utils/modGroups.js:68 — modGroups.keepTogetherForcedApart has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body's own statements and 10 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 · modLoadOrder.computeOrderingConstraints (cyclomatic 31) · ×1
  • modLoadOrder.computeOrderingConstraints (cyclomatic 31) server/utils/modLoadOrder.js:437 — modLoadOrder.computeOrderingConstraints has cyclomatic complexity 31 (threshold 15). Of this number, 18 points are the body's own statements and 13 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 · mods.router.post("/add-missing-dep") (cyclomatic 31) · ×1
  • mods.router.post("/add-missing-dep") (cyclomatic 31) REDACTED:3939 — mods.router.post("/add-missing-dep") has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body's own statements and 10 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 · mods.router.post("/resolve-orphan-workshop") (cyclomatic 31) · ×1
  • mods.router.post("/resolve-orphan-workshop") (cyclomatic 31) REDACTED:10080 — mods.router.post("/resolve-orphan-workshop") has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 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 · server.router.post("/stop") (cyclomatic 31) · ×1
  • server.router.post("/stop") (cyclomatic 31) REDACTED:2664 — server.router.post("/stop") 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 · server.router.post("/browse-folder") (cyclomatic 31) · ×1
  • server.router.post("/browse-folder") (cyclomatic 31) REDACTED:6744 — server.router.post("/browse-folder") has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 14 of the 31 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 6788, 6802, 6885, …). 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 · oidc.router.put("/settings") (cyclomatic 31) · ×1
  • oidc.router.put("/settings") (cyclomatic 31) REDACTED:546 — oidc.router.put("/settings") 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 · fileManagerService.restoreTrashItem (cyclomatic 31) · ×1
  • fileManagerService.restoreTrashItem (cyclomatic 31) server/services/fileManagerService.js:1875 — fileManagerService.restoreTrashItem has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · statusFromContext (cyclomatic 31) · ×1
  • statusFromContext (cyclomatic 31) server/services/bridgeDelivery.js:834 — statusFromContext has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Discord.Discord · ×1
  • Discord.Discord::saveConfig (cyclomatic 30) client/src/pages/Discord.tsx:640 — Discord.Discord::saveConfig has cyclomatic complexity 30 (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. This shape REPEATS in the file: one other method here (Discord.Discord) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · CharacterTab.CharacterTab (cyclomatic 30) · ×1
  • CharacterTab.CharacterTab (cyclomatic 30) client/src/components/players/CharacterTab.tsx:70 — CharacterTab.CharacterTab has cyclomatic complexity 30 (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 · PanelBridge.ensureQueueProtocol (cyclomatic 30) · ×1
  • PanelBridge.ensureQueueProtocol (cyclomatic 30) REDACTED:408 — PanelBridge.ensureQueueProtocol has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mods.detectLuaGlobalClashes (cyclomatic 30) · ×1
  • mods.detectLuaGlobalClashes (cyclomatic 30) REDACTED:8029 — mods.detectLuaGlobalClashes has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mods.computeUnifiedDiff (cyclomatic 30) · ×1
  • mods.computeUnifiedDiff (cyclomatic 30) REDACTED:9298 — mods.computeUnifiedDiff has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rcon.router.post("/connect") (cyclomatic 30) · ×1
  • rcon.router.post("/connect") (cyclomatic 30) REDACTED:150 — rcon.router.post("/connect") 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 · fileManagerLocalBackend.resolve (cyclomatic 30) · ×1
  • fileManagerLocalBackend.resolve (cyclomatic 30) server/services/fileManagerLocalBackend.js:445 — fileManagerLocalBackend.resolve has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fileManagerSftpBackend.streamIntoRemote (cyclomatic 30) · ×1
  • fileManagerSftpBackend.streamIntoRemote (cyclomatic 30) server/services/fileManagerSftpBackend.js:498 — fileManagerSftpBackend.streamIntoRemote has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 13 function literals inside it that branch (lines 616, 499, 531, …). 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 · fileManagerService.deletePreview (cyclomatic 30) · ×1
  • fileManagerService.deletePreview (cyclomatic 30) server/services/fileManagerService.js:1137 — fileManagerService.deletePreview has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · findSteamDeps (cyclomatic 30) · ×1
  • findSteamDeps (cyclomatic 30) REDACTED:8544 — findSteamDeps has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs 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 · stopServer (cyclomatic 30) · ×1
  • stopServer (cyclomatic 30) REDACTED:3126 — stopServer has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs 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 · de-lint.main (cyclomatic 29) · ×1
  • de-lint.main (cyclomatic 29) client/scripts/de-lint.mjs:448 — de-lint.main 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 · CharacterCondition.CharacterCondition (cyclomatic 29) · ×1
  • CharacterCondition.CharacterCondition (cyclomatic 29) client/src/components/players/CharacterCondition.tsx:54 — CharacterCondition.CharacterCondition has cyclomatic 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, 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 · PanelBridge.checkModStatus (cyclomatic 29) · ×1
  • PanelBridge.checkModStatus (cyclomatic 29) REDACTED:1667 — PanelBridge.checkModStatus 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 · scheduler.router.post("/tasks") (cyclomatic 29) · ×1
  • scheduler.router.post("/tasks") (cyclomatic 29) REDACTED:355 — scheduler.router.post("/tasks") 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 · serverFiles.router.put("/sandbox") (cyclomatic 29) · ×1
  • serverFiles.router.put("/sandbox") (cyclomatic 29) REDACTED:1457 — serverFiles.router.put("/sandbox") has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 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 · PanelUpdateChecker.classifyApplyFailure (cyclomatic 29) · ×1
  • PanelUpdateChecker.classifyApplyFailure (cyclomatic 29) server/services/panelUpdateChecker.js:2874 — PanelUpdateChecker.classifyApplyFailure has cyclomatic complexity 29 (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 · servers.router.post("/detect") (cyclomatic 29) · ×1
  • servers.router.post("/detect") (cyclomatic 29) REDACTED:662 — servers.router.post("/detect") has cyclomatic complexity 29 (threshold 15). Of this number, 26 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 · BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog · ×1
  • BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog::apply (cyclomatic 28) client/src/components/bridge/BridgeDeliverySwitchDialog.tsx:148 — BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog::apply 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. This shape REPEATS in the file: one other method here (BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · init.runMigrations (cyclomatic 28) · ×1
  • init.runMigrations (cyclomatic 28) server/database/init.js:281 — init.runMigrations has cyclomatic complexity 28 (threshold 15). Of this number, 27 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 · serverFiles.router.put("/ini") (cyclomatic 28) · ×1
  • serverFiles.router.put("/ini") (cyclomatic 28) REDACTED:1256 — serverFiles.router.put("/ini") has cyclomatic complexity 28 (threshold 15). Of this number, 20 points are the body's own statements and 8 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 · browserCookies.extractSteamCookies (cyclomatic 28) · ×1
  • browserCookies.extractSteamCookies (cyclomatic 28) REDACTED:473 — browserCookies.extractSteamCookies 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 · debug.buildSandboxOptionsDiagnostics (cyclomatic 28) · ×1
  • debug.buildSandboxOptionsDiagnostics (cyclomatic 28) REDACTED:1087 — debug.buildSandboxOptionsDiagnostics has cyclomatic complexity 28 (threshold 15). Of this number, 27 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 · applySheet (cyclomatic 28) · ×1
  • applySheet (cyclomatic 28) server/services/characterStore.js:223 — applySheet 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 · loadHealthExtras (cyclomatic 28) · ×1
  • loadHealthExtras (cyclomatic 28) server/services/modSmartContext.js:286 — loadHealthExtras has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to 10 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Files.Files · ×1
  • Files.Files::renderListBody (cyclomatic 27) client/src/pages/Files.tsx:1451 — Files.Files::renderListBody 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. This shape REPEATS in the file: one other method here (Files.Files) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Templates.Templates (cyclomatic 27) · ×1
  • Templates.Templates (cyclomatic 27) client/src/pages/Templates.tsx:20 — Templates.Templates has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to 6 function items inside it that branch (handleDelete, a function literal at line 65, handleRestore, …). 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 · demoSmart.demoSmartResponse (cyclomatic 27) · ×1
  • demoSmart.demoSmartResponse (cyclomatic 27) client/src/lib/demoSmart.ts:416 — demoSmart.demoSmartResponse has cyclomatic complexity 27 (threshold 15). Of this number, 25 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 · WhyHerePopover.WhyHereBody (cyclomatic 27) · ×1
  • WhyHerePopover.WhyHereBody (cyclomatic 27) client/src/components/mods/WhyHerePopover.tsx:102 — WhyHerePopover.WhyHereBody has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 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 · sandboxLua.tokenize (cyclomatic 27) · ×1
  • sandboxLua.tokenize (cyclomatic 27) server/utils/sandboxLua.js:173 — sandboxLua.tokenize 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 · ModChecker.parseAcfFile (cyclomatic 27) · ×1
  • ModChecker.parseAcfFile (cyclomatic 27) server/services/modChecker.js:701 — ModChecker.parseAcfFile 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 · modSmartSort.solve.breakCycles (cyclomatic 27) · ×1
  • modSmartSort.solve.breakCycles (cyclomatic 27) server/utils/modSmartSort.js:622 — modSmartSort.solve.breakCycles 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, separate the cases: extract each independent 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 · mods.router.post("/batch-toggle-mod-ids") (cyclomatic 27) · ×1
  • mods.router.post("/batch-toggle-mod-ids") (cyclomatic 27) REDACTED:2636 — mods.router.post("/batch-toggle-mod-ids") has cyclomatic complexity 27 (threshold 15). Of this number, 20 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 · serverErrorFinder.readLuaError (cyclomatic 27) · ×1
  • serverErrorFinder.readLuaError (cyclomatic 27) server/utils/serverErrorFinder.js:699 — serverErrorFinder.readLuaError 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 · DiscordBot.updateConfig (cyclomatic 27) · ×1
  • DiscordBot.updateConfig (cyclomatic 27) REDACTED:754 — DiscordBot.updateConfig has cyclomatic complexity 27 (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 · PanelUpdateChecker.downloadFile (cyclomatic 27) · ×1
  • PanelUpdateChecker.downloadFile (cyclomatic 27) server/services/panelUpdateChecker.js:1738 — PanelUpdateChecker.downloadFile has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 1815, 1776, 1869, …). 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 · modsSmart.parsePlanBody (cyclomatic 27) · ×1
  • modsSmart.parsePlanBody (cyclomatic 27) server/routes/modsSmart.js:205 — modsSmart.parsePlanBody 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 · fileManagerLocalBackend.describeRoot (cyclomatic 27) · ×1
  • fileManagerLocalBackend.describeRoot (cyclomatic 27) server/services/fileManagerLocalBackend.js:356 — fileManagerLocalBackend.describeRoot 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 · deriveState (cyclomatic 27) · ×1
  • deriveState (cyclomatic 27) server/services/bridgeDelivery.js:773 — deriveState 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 · mapFsError (cyclomatic 27) · ×1
  • mapFsError (cyclomatic 27) server/services/fileManagerLocalBackend.js:60 — mapFsError has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · solve.breakCycles (cyclomatic 27) · ×1
  • solve.breakCycles (cyclomatic 27) server/utils/modSmartSort.js:622 — solve.breakCycles has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 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 · extract-pz-character-names.main (cyclomatic 26) · ×1
  • extract-pz-character-names.main (cyclomatic 26) client/scripts/extract-pz-character-names.mjs:184 — extract-pz-character-names.main 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 · App.AppContent (cyclomatic 26) · ×1
  • App.AppContent (cyclomatic 26) client/src/App.tsx:254 — App.AppContent has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 284, 381, 348, …). 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 · BridgeDeliveryPanel.BridgeDeliveryPanel (cyclomatic 26) · ×1
  • BridgeDeliveryPanel.BridgeDeliveryPanel (cyclomatic 26) client/src/components/bridge/BridgeDeliveryPanel.tsx:88 — BridgeDeliveryPanel.BridgeDeliveryPanel has cyclomatic complexity 26 (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. This shape REPEATS in the file: 2 other methods here (BridgeDeliveryPanel.BridgeDeliveryPanel::renderOptionCard, BridgeDeliveryPanel.BridgeDeliveryPanel::renderChecksum) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ServerManager.assertNamedStartupScriptLaunchable (cyclomatic 26) · ×1
  • ServerManager.assertNamedStartupScriptLaunchable (cyclomatic 26) REDACTED:3889 — ServerManager.assertNamedStartupScriptLaunchable 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 · PanelBridge.getConnectionDiagnostics (cyclomatic 26) · ×1
  • PanelBridge.getConnectionDiagnostics (cyclomatic 26) REDACTED:531 — PanelBridge.getConnectionDiagnostics has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ModChecker.startPlayerMonitoring (cyclomatic 26) · ×1
  • ModChecker.startPlayerMonitoring (cyclomatic 26) server/services/modChecker.js:1507 — ModChecker.startPlayerMonitoring has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 1558, restartNow, stopThisLoop). 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 · permissions.updateRole (cyclomatic 26) · ×1
  • permissions.updateRole (cyclomatic 26) server/services/permissions.js:916 — permissions.updateRole has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 921). 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 · mods.router.post("/sync-from-server") (cyclomatic 26) · ×1
  • mods.router.post("/sync-from-server") (cyclomatic 26) REDACTED:1129 — mods.router.post("/sync-from-server") 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 · mods.classifyFile (cyclomatic 26) · ×1
  • mods.classifyFile (cyclomatic 26) REDACTED:7039 — mods.classifyFile 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 · mods.findMissingDeps (cyclomatic 26) · ×1
  • mods.findMissingDeps (cyclomatic 26) REDACTED:8424 — mods.findMissingDeps 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 · mods.router.get("/conflicts/stream") (cyclomatic 26) · ×1
  • mods.router.get("/conflicts/stream") (cyclomatic 26) REDACTED:8828 — mods.router.get("/conflicts/stream") has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 8964, send, a function literal at line 8866, …). 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 · server.router.post("/delete-files") (cyclomatic 26) · ×1
  • server.router.post("/delete-files") (cyclomatic 26) REDACTED:6401 — server.router.post("/delete-files") has cyclomatic complexity 26 (threshold 15). Of this number, 21 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 · BackupService.updateSettings (cyclomatic 26) · ×1
  • BackupService.updateSettings (cyclomatic 26) server/services/backupService.js:877 — BackupService.updateSettings 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, 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 · players.router.post("/access-level") (cyclomatic 26) · ×1
  • players.router.post("/access-level") (cyclomatic 26) REDACTED:385 — players.router.post("/access-level") 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, 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 · backup.router.post("/settings") (cyclomatic 26) · ×1
  • backup.router.post("/settings") (cyclomatic 26) REDACTED:340 — backup.router.post("/settings") 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 · fileManagerZip.planZip (cyclomatic 26) · ×1
  • fileManagerZip.planZip (cyclomatic 26) server/services/fileManagerZip.js:142 — fileManagerZip.planZip has cyclomatic complexity 26 (threshold 15). Of this number, 16 points are the body's own statements and 10 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 · checkServerStatusNow (cyclomatic 26) · ×1
  • checkServerStatusNow (cyclomatic 26) REDACTED:3977 — checkServerStatusNow 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 · ChunkCleaner.ChunkCleaner · ×1
  • ChunkCleaner.ChunkCleaner::handleDelete (cyclomatic 25) client/src/pages/ChunkCleaner.tsx:2213 — ChunkCleaner.ChunkCleaner::handleDelete 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. This shape REPEATS in the file: one other method here (ChunkCleaner.ChunkCleaner) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · MoveDialog.MoveDialog (cyclomatic 25) · ×1
  • MoveDialog.MoveDialog (cyclomatic 25) client/src/components/files/MoveDialog.tsx:43 — MoveDialog.MoveDialog has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 60, a function literal at line 67, submit, …). 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 · UploadQueue.UploadQueue (cyclomatic 25) · ×1
  • UploadQueue.UploadQueue (cyclomatic 25) client/src/components/files/UploadQueue.tsx:44 — UploadQueue.UploadQueue has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 82, statusText, a function literal at line 48). 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 · modLoadOrder.computeAutoSortedOrder (cyclomatic 25) · ×1
  • modLoadOrder.computeAutoSortedOrder (cyclomatic 25) client/src/lib/modLoadOrder.ts:103 — modLoadOrder.computeAutoSortedOrder has cyclomatic complexity 25 (threshold 15). Of this number, 23 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 · uiSecretFile.replaceUiSecretFiles (cyclomatic 25) · ×1
  • uiSecretFile.replaceUiSecretFiles (cyclomatic 25) server/utils/uiSecretFile.js:81 — uiSecretFile.replaceUiSecretFiles 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 · modSteamKnowledge.parseRequiredItemsFromPage (cyclomatic 25) · ×1
  • modSteamKnowledge.parseRequiredItemsFromPage (cyclomatic 25) server/services/modSteamKnowledge.js:379 — modSteamKnowledge.parseRequiredItemsFromPage 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 · mods.router.post("/add-to-ini") (cyclomatic 25) · ×1
  • mods.router.post("/add-to-ini") (cyclomatic 25) REDACTED:2791 — mods.router.post("/add-to-ini") has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 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 · OtherServerUpdates.checkAll (cyclomatic 25) · ×1
  • OtherServerUpdates.checkAll (cyclomatic 25) server/services/otherServerUpdates.js:139 — OtherServerUpdates.checkAll has cyclomatic complexity 25 (threshold 15). Of this number, 22 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 · DiscordBot._sendEventNotification (cyclomatic 25) · ×1
  • DiscordBot._sendEventNotification (cyclomatic 25) REDACTED:651 — DiscordBot._sendEventNotification has cyclomatic complexity 25 (threshold 15). Of this number, 22 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 · discovery.router.post("/create-from-discovery") (cyclomatic 25) · ×1
  • discovery.router.post("/create-from-discovery") (cyclomatic 25) server/routes/discovery.js:80 — discovery.router.post("/create-from-discovery") 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 · docker.router.post("/containers/ · ×1
  • docker.router.post("/containers/:id/:action") (cyclomatic 25) server/routes/docker.js:82 — docker.router.post("/containers/:id/:action") has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 25) · ×1
  • (anonymous) (cyclomatic 25) REDACTED:2791 — (anonymous) has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 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 · getDatabaseStatsSync (cyclomatic 25) · ×1
  • getDatabaseStatsSync (cyclomatic 25) server/database/init.js:1306 — getDatabaseStatsSync has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 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 · handleInteraction (cyclomatic 25) · ×1
  • handleInteraction (cyclomatic 25) REDACTED:1243 — handleInteraction has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · fetchWorkshopDetails (cyclomatic 25) · ×1
  • fetchWorkshopDetails (cyclomatic 25) server/services/modChecker.js:312 — fetchWorkshopDetails 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 · moveEntries (cyclomatic 25) · ×1
  • moveEntries (cyclomatic 25) server/services/fileManagerService.js:1002 — moveEntries 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 · createSftpBackend.walk.generate (cyclomatic 25) · ×1
  • createSftpBackend.walk.generate (cyclomatic 25) server/services/fileManagerSftpBackend.js:1883 — createSftpBackend.walk.generate has cyclomatic complexity 25 (threshold 15). Of this number, 21 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 · UnsavedChangesContext.UnsavedChangesProvider (cyclomatic 24) · ×1
  • UnsavedChangesContext.UnsavedChangesProvider (cyclomatic 24) client/src/contexts/UnsavedChangesContext.tsx:36 — UnsavedChangesContext.UnsavedChangesProvider 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 3 function literals inside it that branch (lines 76, 50, 95). 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 · useCharacterSheet.useCharacterSheet (cyclomatic 24) · ×1
  • useCharacterSheet.useCharacterSheet (cyclomatic 24) client/src/components/players/useCharacterSheet.ts:49 — useCharacterSheet.useCharacterSheet 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 8 function literals inside it that branch (lines 162, 151, 133, …). 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 · ServerManager.loadConfig (cyclomatic 24) · ×1
  • ServerManager.loadConfig (cyclomatic 24) REDACTED:1389 — ServerManager.loadConfig 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 · sandboxLua.countSandboxBraces (cyclomatic 24) · ×1
  • sandboxLua.countSandboxBraces (cyclomatic 24) server/utils/sandboxLua.js:669 — sandboxLua.countSandboxBraces 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 · modSteamKnowledge.findRequiredItemsContainer (cyclomatic 24) · ×1
  • modSteamKnowledge.findRequiredItemsContainer (cyclomatic 24) server/services/modSteamKnowledge.js:276 — modSteamKnowledge.findRequiredItemsContainer 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 · mods.router.get("/tracked") (cyclomatic 24) · ×1
  • mods.router.get("/tracked") (cyclomatic 24) REDACTED:400 — mods.router.get("/tracked") 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 · server.ensureRconConfigured (cyclomatic 24) · ×1
  • server.ensureRconConfigured (cyclomatic 24) REDACTED:926 — server.ensureRconConfigured has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 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 · panelBridge.router.post("/time") (cyclomatic 24) · ×1
  • panelBridge.router.post("/time") (cyclomatic 24) server/routes/panelBridge.js:2475 — panelBridge.router.post("/time") 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 · fileManagerSftpBackend.createSftpBackend.list (cyclomatic 24) · ×1
  • fileManagerSftpBackend.createSftpBackend.list (cyclomatic 24) server/services/fileManagerSftpBackend.js:1503 — fileManagerSftpBackend.createSftpBackend.list has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 1528, key, byName, …). 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 · groupIntoPairs (cyclomatic 24) · ×1
  • groupIntoPairs (cyclomatic 24) REDACTED:8126 — groupIntoPairs has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 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 · createSftpBackend.list (cyclomatic 24) · ×1
  • createSftpBackend.list (cyclomatic 24) server/services/fileManagerSftpBackend.js:1503 — createSftpBackend.list has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 1528, key, byName, …). 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 · parseModInfoForGame (cyclomatic 24) · ×1
  • parseModInfoForGame (cyclomatic 24) server/utils/modLoadOrder.js:105 — parseModInfoForGame 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 · AutoUpdateResultBanner.AutoUpdateResultBanner (cyclomatic 23) · ×1
  • AutoUpdateResultBanner.AutoUpdateResultBanner (cyclomatic 23) client/src/components/AutoUpdateResultBanner.tsx:34 — AutoUpdateResultBanner.AutoUpdateResultBanner has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 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 · FolderBrowser.FolderBrowser (cyclomatic 23) · ×1
  • FolderBrowser.FolderBrowser (cyclomatic 23) client/src/components/FolderBrowser.tsx:27 — FolderBrowser.FolderBrowser has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 180, a function literal at line 38, a function literal at line 57, …). 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 · FileRowMenu.FileRowMenu (cyclomatic 23) · ×1
  • FileRowMenu.FileRowMenu (cyclomatic 23) client/src/components/files/FileRowMenu.tsx:42 — FileRowMenu.FileRowMenu has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FileToolbar.FileToolbar (cyclomatic 23) · ×1
  • FileToolbar.FileToolbar (cyclomatic 23) client/src/components/files/FileToolbar.tsx:56 — FileToolbar.FileToolbar has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 87, 125, 169). 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 · PinnedOrderCard.PinnedOrderCard (cyclomatic 23) · ×1
  • PinnedOrderCard.PinnedOrderCard (cyclomatic 23) client/src/components/mods/PinnedOrderCard.tsx:36 — PinnedOrderCard.PinnedOrderCard has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (renderRule, handleDelete, a function literal at line 47). 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 · SmartSortPreview.SmartSortPreview (cyclomatic 23) · ×1
  • SmartSortPreview.SmartSortPreview (cyclomatic 23) client/src/components/mods/SmartSortPreview.tsx:37 — SmartSortPreview.SmartSortPreview has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · init.getDb (cyclomatic 23) · ×1
  • init.getDb (cyclomatic 23) server/database/init.js:1106 — init.getDb 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 · RconService.loadConfig (cyclomatic 23) · ×1
  • RconService.loadConfig (cyclomatic 23) server/services/rcon.js:1038 — RconService.loadConfig 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 · LinuxServiceLifecycle.inspect (cyclomatic 23) · ×1
  • LinuxServiceLifecycle.inspect (cyclomatic 23) server/services/linuxServiceLifecycle.js:416 — LinuxServiceLifecycle.inspect 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 · PanelBridge.cleanupInboxFiles (cyclomatic 23) · ×1
  • PanelBridge.cleanupInboxFiles (cyclomatic 23) REDACTED:1480 — PanelBridge.cleanupInboxFiles 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 · bridgeWorkshopRelease.computeRelease (cyclomatic 23) · ×1
  • bridgeWorkshopRelease.computeRelease (cyclomatic 23) server/services/bridgeWorkshopRelease.js:94 — bridgeWorkshopRelease.computeRelease 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 · vehiclesDb.deleteVehiclesInBoxes (cyclomatic 23) · ×1
  • vehiclesDb.deleteVehiclesInBoxes (cyclomatic 23) server/utils/vehiclesDb.js:311 — vehiclesDb.deleteVehiclesInBoxes has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · chunks.router.post("/save-path") (cyclomatic 23) · ×1
  • chunks.router.post("/save-path") (cyclomatic 23) REDACTED:1003 — chunks.router.post("/save-path") has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · serverFiles.router.get("/browse-files") (cyclomatic 23) · ×1
  • serverFiles.router.get("/browse-files") (cyclomatic 23) REDACTED:3185 — serverFiles.router.get("/browse-files") has cyclomatic complexity 23 (threshold 15). Of this number, 22 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 · mods.router.post("/sync-mod-ids") (cyclomatic 23) · ×1
  • mods.router.post("/sync-mod-ids") (cyclomatic 23) REDACTED:4745 — mods.router.post("/sync-mod-ids") has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 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 · mods.router.post("/add-mod-advanced") (cyclomatic 23) · ×1
  • mods.router.post("/add-mod-advanced") (cyclomatic 23) REDACTED:6473 — mods.router.post("/add-mod-advanced") 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, 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 · serverErrorFinder.frameSuffixStart (cyclomatic 23) · ×1
  • serverErrorFinder.frameSuffixStart (cyclomatic 23) server/utils/serverErrorFinder.js:249 — serverErrorFinder.frameSuffixStart has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · cronNextRun.computeNextRun (cyclomatic 23) · ×1
  • cronNextRun.computeNextRun (cyclomatic 23) server/utils/cronNextRun.js:86 — cronNextRun.computeNextRun 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 · servers.router.post("/auto-scan") (cyclomatic 23) · ×1
  • servers.router.post("/auto-scan") (cyclomatic 23) REDACTED:538 — servers.router.post("/auto-scan") 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, separate the cases: extract each independent 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 · fileManagerRunState.computeRunState (cyclomatic 23) · ×1
  • fileManagerRunState.computeRunState (cyclomatic 23) server/services/fileManagerRunState.js:41 — fileManagerRunState.computeRunState 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 · fileManagerJanitor.runFileManagerJanitor (cyclomatic 23) · ×1
  • fileManagerJanitor.runFileManagerJanitor (cyclomatic 23) server/services/fileManagerJanitor.js:30 — fileManagerJanitor.runFileManagerJanitor has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · getServerProcessDetails (cyclomatic 23) · ×1
  • getServerProcessDetails (cyclomatic 23) REDACTED:1615 — getServerProcessDetails has cyclomatic complexity 23 (threshold 15). Of this number, 19 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 · _scanWindowsServerProcesses (cyclomatic 23) · ×1
  • _scanWindowsServerProcesses (cyclomatic 23) REDACTED:1983 — _scanWindowsServerProcesses has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs 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 · toIni (cyclomatic 23) · ×1
  • toIni (cyclomatic 23) REDACTED:695 — toIni has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 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 · getStatus (cyclomatic 23) · ×1
  • getStatus (cyclomatic 23) server/services/modChecker.js:2494 — getStatus has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to 10 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 · ConnectionStatus.ConnectionStatus (cyclomatic 22) · ×1
  • ConnectionStatus.ConnectionStatus (cyclomatic 22) client/src/components/ConnectionStatus.tsx:15 — ConnectionStatus.ConnectionStatus has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · errorMessage.getUserErrorMessage (cyclomatic 22) · ×1
  • errorMessage.getUserErrorMessage (cyclomatic 22) client/src/lib/errorMessage.ts:179 — errorMessage.getUserErrorMessage 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 · DiscoverySetup.DiscoverySetup (cyclomatic 22) · ×1
  • DiscoverySetup.DiscoverySetup (cyclomatic 22) client/src/components/DiscoverySetup.tsx:42 — DiscoverySetup.DiscoverySetup has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 2 function items inside it that branch (handleCreate, a function literal at line 64). 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 · SpawnBrowser.ResultRow (cyclomatic 22) · ×1
  • SpawnBrowser.ResultRow (cyclomatic 22) client/src/components/SpawnBrowser.tsx:783 — SpawnBrowser.ResultRow has cyclomatic complexity 22 (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 · NameDialog.NameDialog (cyclomatic 22) · ×1
  • NameDialog.NameDialog (cyclomatic 22) client/src/components/files/NameDialog.tsx:44 — NameDialog.NameDialog has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sub-nav.SubNav (cyclomatic 22) · ×1
  • sub-nav.SubNav (cyclomatic 22) client/src/components/ui/sub-nav.tsx:59 — sub-nav.SubNav has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 8 function items inside it that branch (itemContent, withReason, groupLabel, …). 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 · plainHttpExposure.isPlainHttpExposed (cyclomatic 22) · ×1
  • plainHttpExposure.isPlainHttpExposed (cyclomatic 22) client/src/lib/plainHttpExposure.ts:5 — plainHttpExposure.isPlainHttpExposed has cyclomatic complexity 22 (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 · ServerManager.restartServer (cyclomatic 22) · ×1
  • ServerManager.restartServer (cyclomatic 22) REDACTED:3555 — ServerManager.restartServer 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 · sandboxLua.editSandboxValues (cyclomatic 22) · ×1
  • sandboxLua.editSandboxValues (cyclomatic 22) server/utils/sandboxLua.js:506 — sandboxLua.editSandboxValues has cyclomatic 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, separate the cases: extract each independent 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 · panelBridgeSftp.validateSftpBridgeConfig (cyclomatic 22) · ×1
  • panelBridgeSftp.validateSftpBridgeConfig (cyclomatic 22) server/services/panelBridgeSftp.js:138 — panelBridgeSftp.validateSftpBridgeConfig has cyclomatic complexity 22 (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 · serverFiles.getActiveServerPaths (cyclomatic 22) · ×1
  • serverFiles.getActiveServerPaths (cyclomatic 22) REDACTED:580 — serverFiles.getActiveServerPaths 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 · serverFiles.router.post("/templates/ · ×1
  • serverFiles.router.post("/templates/:id/apply") (cyclomatic 22) REDACTED:2779 — serverFiles.router.post("/templates/:id/apply") has cyclomatic 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, separate the cases: extract each independent 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 · mapProxy.resolveB42Map (cyclomatic 22) · ×1
  • mapProxy.resolveB42Map (cyclomatic 22) REDACTED:814 — mapProxy.resolveB42Map has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 2 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 · modSmartSort.priorityOrder (cyclomatic 22) · ×1
  • modSmartSort.priorityOrder (cyclomatic 22) server/utils/modSmartSort.js:1100 — modSmartSort.priorityOrder has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mods.router.post("/toggle-mod-id") (cyclomatic 22) · ×1
  • mods.router.post("/toggle-mod-id") (cyclomatic 22) REDACTED:2490 — mods.router.post("/toggle-mod-id") has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 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 · mods.router.get("/validate-config") (cyclomatic 22) · ×1
  • mods.router.get("/validate-config") (cyclomatic 22) REDACTED:4936 — mods.router.get("/validate-config") 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 · mods.router.put("/presets/ · ×1
  • mods.router.put("/presets/:id") (cyclomatic 22) REDACTED:5195 — mods.router.put("/presets/:id") 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 · mods.router.get("/disk-only") (cyclomatic 22) · ×1
  • mods.router.get("/disk-only") (cyclomatic 22) REDACTED:9421 — mods.router.get("/disk-only") 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 · DiscordBot.handleGameChat (cyclomatic 22) · ×1
  • DiscordBot.handleGameChat (cyclomatic 22) REDACTED:493 — DiscordBot.handleGameChat 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 · oidc.router.post("/test-connection") (cyclomatic 22) · ×1
  • oidc.router.post("/test-connection") (cyclomatic 22) REDACTED:672 — oidc.router.post("/test-connection") 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 · servers.router.post("/ · ×1
  • servers.router.post("/:id/lifecycle-provider") (cyclomatic 22) REDACTED:1313 — servers.router.post("/:id/lifecycle-provider") 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 · players.router.post("/teleport") (cyclomatic 22) · ×1
  • players.router.post("/teleport") (cyclomatic 22) REDACTED:576 — players.router.post("/teleport") 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 · backup.router.post("/upload") (cyclomatic 22) · ×1
  • backup.router.post("/upload") (cyclomatic 22) REDACTED:856 — backup.router.post("/upload") 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 · templateSchema.validateTemplate (cyclomatic 22) · ×1
  • templateSchema.validateTemplate (cyclomatic 22) server/utils/templateSchema.js:155 — templateSchema.validateTemplate 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 · fileManagerProtectedAreas.buildSecretSet (cyclomatic 22) · ×1
  • fileManagerProtectedAreas.buildSecretSet (cyclomatic 22) server/services/fileManagerProtectedAreas.js:108 — fileManagerProtectedAreas.buildSecretSet 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 · fileManagerLocalBackend.walk (cyclomatic 22) · ×1
  • fileManagerLocalBackend.walk (cyclomatic 22) server/services/fileManagerLocalBackend.js:1239 — fileManagerLocalBackend.walk 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 · fileManagerSftpBackend.createSftpBackend.walk · ×1
  • fileManagerSftpBackend.createSftpBackend.walk::generate (cyclomatic 22) server/services/fileManagerSftpBackend.js:1883 — fileManagerSftpBackend.createSftpBackend.walk::generate 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 · fileManagerRoots.describeLocal (cyclomatic 22) · ×1
  • fileManagerRoots.describeLocal (cyclomatic 22) server/services/fileManagerRoots.js:125 — fileManagerRoots.describeLocal 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 · monitorGracefulStop (cyclomatic 22) · ×1
  • monitorGracefulStop (cyclomatic 22) REDACTED:2898 — monitorGracefulStop has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (poll, escalateToForceStop, announceStopped, …). 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 · startPlayerPolling (cyclomatic 22) · ×1
  • startPlayerPolling (cyclomatic 22) REDACTED:3457 — startPlayerPolling has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 3464, 3485, 3502, …). 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 · detectLeftoverNativeLibraries (cyclomatic 22) · ×1
  • detectLeftoverNativeLibraries (cyclomatic 22) server/utils/nativeLibraryPaths.js:392 — detectLeftoverNativeLibraries has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 9 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 · loadModSmartContext (cyclomatic 22) · ×1
  • loadModSmartContext (cyclomatic 22) server/services/modSmartContext.js:119 — loadModSmartContext has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs 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 · AuthContext.AuthProvider (cyclomatic 21) · ×1
  • AuthContext.AuthProvider (cyclomatic 21) client/src/contexts/AuthContext.tsx:120 — AuthContext.AuthProvider has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 138, 309, 248, …). 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 · problemFixes.buildFixAllPreview (cyclomatic 21) · ×1
  • problemFixes.buildFixAllPreview (cyclomatic 21) client/src/components/diagnostics/problemFixes.ts:64 — problemFixes.buildFixAllPreview 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, separate the cases: extract each independent 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 · useProblemText.useProblemText (cyclomatic 21) · ×1
  • useProblemText.useProblemText (cyclomatic 21) client/src/components/diagnostics/useProblemText.ts:13 — useProblemText.useProblemText has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 36, 16, 58). 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 · ProblemsFound.ProblemsFound · ×1
  • ProblemsFound.ProblemsFound::row (cyclomatic 21) client/src/components/diagnostics/ProblemsFound.tsx:216 — ProblemsFound.ProblemsFound::row 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. This shape REPEATS in the file: one other method here (ProblemsFound.ProblemsFound) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · CreateTemplateDialog.CreateTemplateDialog (cyclomatic 21) · ×1
  • CreateTemplateDialog.CreateTemplateDialog (cyclomatic 21) client/src/components/templates/CreateTemplateDialog.tsx:31 — CreateTemplateDialog.CreateTemplateDialog has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · init.createServer (cyclomatic 21) · ×1
  • init.createServer (cyclomatic 21) server/database/init.js:2392 — init.createServer 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 · chunks.router.get("/browse") (cyclomatic 21) · ×1
  • chunks.router.get("/browse") (cyclomatic 21) REDACTED:3090 — chunks.router.get("/browse") 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, 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 · bridgeDelivery.availabilityToWorkshop (cyclomatic 21) · ×1
  • bridgeDelivery.availabilityToWorkshop (cyclomatic 21) server/services/bridgeDelivery.js:720 — bridgeDelivery.availabilityToWorkshop 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 · mods.router.post("/import-collection") (cyclomatic 21) · ×1
  • mods.router.post("/import-collection") (cyclomatic 21) REDACTED:1830 — mods.router.post("/import-collection") 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, 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 · mods.router.get("/thumbnail/ · ×1
  • mods.router.get("/thumbnail/:workshopId") (cyclomatic 21) REDACTED:10507 — mods.router.get("/thumbnail/:workshopId") has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body's own statements and 7 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 · debug.buildStartScriptCheck (cyclomatic 21) · ×1
  • debug.buildStartScriptCheck (cyclomatic 21) REDACTED:5853 — debug.buildStartScriptCheck 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 · server.router.post("/steamcmd/download") (cyclomatic 21) · ×1
  • server.router.post("/steamcmd/download") (cyclomatic 21) REDACTED:5857 — server.router.post("/steamcmd/download") has cyclomatic complexity 21 (threshold 15). Of this number, 13 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 · server.router.post("/list-directory") (cyclomatic 21) · ×1
  • server.router.post("/list-directory") (cyclomatic 21) REDACTED:6624 — server.router.post("/list-directory") has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DiscordBot.handleLeaderboard (cyclomatic 21) · ×1
  • DiscordBot.handleLeaderboard (cyclomatic 21) REDACTED:1485 — DiscordBot.handleLeaderboard has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 1509, 1508, 1502, …). 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 · panelBridge.router.post("/character/import") (cyclomatic 21) · ×1
  • panelBridge.router.post("/character/import") (cyclomatic 21) server/routes/panelBridge.js:3911 — panelBridge.router.post("/character/import") has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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 · findPanelBridgePath (cyclomatic 21) · ×1
  • findPanelBridgePath (cyclomatic 21) REDACTED:1506 — findPanelBridgePath has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · uploadPreflight (cyclomatic 21) · ×1
  • uploadPreflight (cyclomatic 21) server/services/fileManagerService.js:1493 — uploadPreflight 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 · skillJump (cyclomatic 21) · ×1
  • skillJump (cyclomatic 21) server/services/characterHints.js:316 — skillJump has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 10 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 · computeCharacterHints (cyclomatic 21) · ×1
  • computeCharacterHints (cyclomatic 21) server/services/characterHints.js:510 — computeCharacterHints has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 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 · Settings.WorkshopCollectionSyncCard · ×1
  • Settings.WorkshopCollectionSyncCard::runRowAction (cyclomatic 20) REDACTED:6922 — Settings.WorkshopCollectionSyncCard::runRowAction has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Settings.WorkshopCollectionSyncCard) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · demo.getDemoFilesResponse (cyclomatic 20) · ×1
  • demo.getDemoFilesResponse (cyclomatic 20) client/src/lib/demo.ts:1455 — demo.getDemoFilesResponse 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 · BackupRestartOverlapNotice.BackupRestartOverlapNotice (cyclomatic 20) · ×1
  • BackupRestartOverlapNotice.BackupRestartOverlapNotice (cyclomatic 20) client/src/components/BackupRestartOverlapNotice.tsx:38 — BackupRestartOverlapNotice.BackupRestartOverlapNotice has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DashboardVerdict.VerdictBand (cyclomatic 20) · ×1
  • DashboardVerdict.VerdictBand (cyclomatic 20) client/src/components/dashboard/DashboardVerdict.tsx:121 — DashboardVerdict.VerdictBand 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 · cronSchedule.nextCronRuns (cyclomatic 20) · ×1
  • cronSchedule.nextCronRuns (cyclomatic 20) client/src/lib/cronSchedule.ts:151 — cronSchedule.nextCronRuns 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 · modGroups.parseGroupDocument (cyclomatic 20) · ×1
  • modGroups.parseGroupDocument (cyclomatic 20) client/src/lib/modGroups.ts:63 — modGroups.parseGroupDocument 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 · LinuxServiceLifecycle.run (cyclomatic 20) · ×1
  • LinuxServiceLifecycle.run (cyclomatic 20) server/services/linuxServiceLifecycle.js:658 — LinuxServiceLifecycle.run 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 · zomboidPaths.inspectZomboidPath (cyclomatic 20) · ×1
  • zomboidPaths.inspectZomboidPath (cyclomatic 20) server/utils/zomboidPaths.js:264 — zomboidPaths.inspectZomboidPath 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 · PanelBridge.setupFileWatcher (cyclomatic 20) · ×1
  • PanelBridge.setupFileWatcher (cyclomatic 20) REDACTED:759 — PanelBridge.setupFileWatcher has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 784, 799, 812, …). 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 · ModChecker.handleModUpdate (cyclomatic 20) · ×1
  • ModChecker.handleModUpdate (cyclomatic 20) server/services/modChecker.js:1153 — ModChecker.handleModUpdate 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 · diskSpace.getDiskFreeFallback (cyclomatic 20) · ×1
  • diskSpace.getDiskFreeFallback (cyclomatic 20) server/utils/diskSpace.js:39 — diskSpace.getDiskFreeFallback 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 · modOrderRules.findOrderRuleCycle (cyclomatic 20) · ×1
  • modOrderRules.findOrderRuleCycle (cyclomatic 20) server/utils/modOrderRules.js:99 — modOrderRules.findOrderRuleCycle has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · modDefinitionExtractors.extractScriptDefinitionBodies (cyclomatic 20) · ×1
  • modDefinitionExtractors.extractScriptDefinitionBodies (cyclomatic 20) server/utils/modDefinitionExtractors.js:365 — modDefinitionExtractors.extractScriptDefinitionBodies 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 · workshopDownload.downloadWorkshopItem (cyclomatic 20) · ×1
  • workshopDownload.downloadWorkshopItem (cyclomatic 20) REDACTED:80 — workshopDownload.downloadWorkshopItem has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 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 · mods.router.post("/purge") (cyclomatic 20) · ×1
  • mods.router.post("/purge") (cyclomatic 20) REDACTED:9790 — mods.router.post("/purge") 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 · Scheduler.executeTask (cyclomatic 20) · ×1
  • Scheduler.executeTask (cyclomatic 20) server/services/scheduler.js:780 — Scheduler.executeTask 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 · ServerWatch.tick (cyclomatic 20) · ×1
  • ServerWatch.tick (cyclomatic 20) server/services/serverWatch.js:144 — ServerWatch.tick has cyclomatic complexity 20 (threshold 15). Of this number, 18 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 · serverFinder.isPrivateIp (cyclomatic 20) · ×1
  • serverFinder.isPrivateIp (cyclomatic 20) server/routes/serverFinder.js:28 — serverFinder.isPrivateIp 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, 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 · panelBridge.router.post("/players/ · ×1
  • panelBridge.router.post("/players/:username/teleport") (cyclomatic 20) server/routes/panelBridge.js:2648 — panelBridge.router.post("/players/:username/teleport") 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 · fileManagerSftpBackend.createSftpBackend.resolve (cyclomatic 20) · ×1
  • fileManagerSftpBackend.createSftpBackend.resolve (cyclomatic 20) server/services/fileManagerSftpBackend.js:1396 — fileManagerSftpBackend.createSftpBackend.resolve 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 · index.autoExportPlayer (cyclomatic 20) · ×1
  • index.autoExportPlayer (cyclomatic 20) REDACTED:3321 — index.autoExportPlayer has cyclomatic complexity 20 (threshold 15). Of this number, 16 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 · resolveModNameFromDisk (cyclomatic 20) · ×1
  • resolveModNameFromDisk (cyclomatic 20) server/services/modChecker.js:810 — resolveModNameFromDisk 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 · createSftpBackend.resolve (cyclomatic 20) · ×1
  • createSftpBackend.resolve (cyclomatic 20) server/services/fileManagerSftpBackend.js:1396 — createSftpBackend.resolve 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 · runManagedLifecycle (cyclomatic 20) · ×1
  • runManagedLifecycle (cyclomatic 20) server/services/managedContainer.js:219 — runManagedLifecycle has cyclomatic complexity 20 (threshold 15). Of this number, 19 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 · api.runRefresh (cyclomatic 19) · ×1
  • api.runRefresh (cyclomatic 19) client/src/lib/api.ts:206 — api.runRefresh 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 · api.buildResponseError (cyclomatic 19) · ×1
  • api.buildResponseError (cyclomatic 19) client/src/lib/api.ts:512 — api.buildResponseError 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 · ServerConfig.ServerConfig · ×1
  • ServerConfig.ServerConfig::loadData (cyclomatic 19) client/src/pages/ServerConfig.tsx:1484 — ServerConfig.ServerConfig::loadData 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. This shape REPEATS in the file: one other method here (ServerConfig.ServerConfig) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · worldMapTileFailureDiagnosis.classifyTileBytes (cyclomatic 19) · ×1
  • worldMapTileFailureDiagnosis.classifyTileBytes (cyclomatic 19) client/src/pages/worldMapTileFailureDiagnosis.ts:56 — worldMapTileFailureDiagnosis.classifyTileBytes 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 · FileDiffViewer.TextDiffView (cyclomatic 19) · ×1
  • FileDiffViewer.TextDiffView (cyclomatic 19) client/src/components/FileDiffViewer.tsx:307 — FileDiffViewer.TextDiffView has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 339, 332). 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 · ProblemsFound.ProblemsFound (cyclomatic 19) · ×1
  • ProblemsFound.ProblemsFound (cyclomatic 19) client/src/components/diagnostics/ProblemsFound.tsx:42 — ProblemsFound.ProblemsFound has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ProblemsFound.ProblemsFound::row) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · SteamStatusLine.SteamStatusLine (cyclomatic 19) · ×1
  • SteamStatusLine.SteamStatusLine (cyclomatic 19) client/src/components/mods/SteamStatusLine.tsx:14 — SteamStatusLine.SteamStatusLine 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 · ItemInsights.ItemInsights (cyclomatic 19) · ×1
  • ItemInsights.ItemInsights (cyclomatic 19) client/src/components/mods/ItemInsights.tsx:31 — ItemInsights.ItemInsights has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CharacterSkills.CharacterSkills (cyclomatic 19) · ×1
  • CharacterSkills.CharacterSkills (cyclomatic 19) client/src/components/players/CharacterSkills.tsx:94 — CharacterSkills.CharacterSkills 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 5 function items inside it that branch (isTrained, a function literal at line 149, a function literal at line 108, …). 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 · PanelBridge.pollQueueResults (cyclomatic 19) · ×1
  • PanelBridge.pollQueueResults (cyclomatic 19) REDACTED:1310 — PanelBridge.pollQueueResults 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 · serverFiles.router.put("/sandbox-option") (cyclomatic 19) · ×1
  • serverFiles.router.put("/sandbox-option") (cyclomatic 19) REDACTED:1596 — serverFiles.router.put("/sandbox-option") 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 · serverFiles.router.put("/raw/ · ×1
  • serverFiles.router.put("/raw/:type") (cyclomatic 19) REDACTED:2189 — serverFiles.router.put("/raw/:type") has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 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 · modLoadOrder.createDependencyRelation (cyclomatic 19) · ×1
  • modLoadOrder.createDependencyRelation (cyclomatic 19) server/utils/modLoadOrder.js:497 — modLoadOrder.createDependencyRelation 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 2 function items inside it that branch (link, reach). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · workshopModInfo.findMapFoldersFromWorkshop (cyclomatic 19) · ×1
  • workshopModInfo.findMapFoldersFromWorkshop (cyclomatic 19) server/services/workshopModInfo.js:144 — workshopModInfo.findMapFoldersFromWorkshop has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mods.router.put("/restart-options") (cyclomatic 19) · ×1
  • mods.router.put("/restart-options") (cyclomatic 19) REDACTED:995 — mods.router.put("/restart-options") has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mods.scoreWorkshopDependencyMatch (cyclomatic 19) · ×1
  • mods.scoreWorkshopDependencyMatch (cyclomatic 19) REDACTED:3128 — mods.scoreWorkshopDependencyMatch has cyclomatic 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, 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 · mods.router.post("/resolve-missing-deps") (cyclomatic 19) · ×1
  • mods.router.post("/resolve-missing-deps") (cyclomatic 19) REDACTED:4641 — mods.router.post("/resolve-missing-deps") has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiscordBot._sendToChannel (cyclomatic 19) · ×1
  • DiscordBot._sendToChannel (cyclomatic 19) REDACTED:1959 — DiscordBot._sendToChannel 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 · servers.scanForPzPaths · ×1
  • servers.scanForPzPaths::scan (cyclomatic 19) REDACTED:415 — servers.scanForPzPaths::scan 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 · modsSmart.router.post("/health/fix") (cyclomatic 19) · ×1
  • modsSmart.router.post("/health/fix") (cyclomatic 19) server/routes/modsSmart.js:306 — modsSmart.router.post("/health/fix") has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 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 · serverFinder.router.get("/") (cyclomatic 19) · ×1
  • serverFinder.router.get("/") (cyclomatic 19) server/routes/serverFinder.js:634 — serverFinder.router.get("/") 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 branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · fileManagerLocalBackend.receiveIntoTemp (cyclomatic 19) · ×1
  • fileManagerLocalBackend.receiveIntoTemp (cyclomatic 19) server/services/fileManagerLocalBackend.js:915 — fileManagerLocalBackend.receiveIntoTemp 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 9 function literals inside it that branch (lines 934, 974, 981, …). 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 · fileManagerSftpBackend.createSftpBackend.describeRoot (cyclomatic 19) · ×1
  • fileManagerSftpBackend.createSftpBackend.describeRoot (cyclomatic 19) server/services/fileManagerSftpBackend.js:1335 — fileManagerSftpBackend.createSftpBackend.describeRoot has cyclomatic 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, separate the cases: extract each independent 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 · fileManagerRoots.describeRemote (cyclomatic 19) · ×1
  • fileManagerRoots.describeRemote (cyclomatic 19) server/services/fileManagerRoots.js:189 — fileManagerRoots.describeRemote 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.isAllowedHostHeader (cyclomatic 19) · ×1
  • index.isAllowedHostHeader (cyclomatic 19) REDACTED:814 — index.isAllowedHostHeader has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: index.startPlayerPolling (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 · getStatus (cyclomatic 19) · ×1
  • getStatus (cyclomatic 19) server/services/backupService.js:1995 — getStatus 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 · createSftpBackend.describeRoot (cyclomatic 19) · ×1
  • createSftpBackend.describeRoot (cyclomatic 19) server/services/fileManagerSftpBackend.js:1335 — createSftpBackend.describeRoot has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 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 · de-lint.parseGlossaryTables (cyclomatic 18) · ×1
  • de-lint.parseGlossaryTables (cyclomatic 18) client/scripts/de-lint.mjs:82 — de-lint.parseGlossaryTables 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 · extract-pz-sandbox-ground-truth.parseJavapOptionTranslations (cyclomatic 18) · ×1
  • extract-pz-sandbox-ground-truth.parseJavapOptionTranslations (cyclomatic 18) client/scripts/extract-pz-sandbox-ground-truth.mjs:106 — extract-pz-sandbox-ground-truth.parseJavapOptionTranslations 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 · api.fetchWithRetry (cyclomatic 18) · ×1
  • api.fetchWithRetry (cyclomatic 18) client/src/lib/api.ts:575 — api.fetchWithRetry 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 · Console.Console · ×1
  • Console.Console::sendAnnouncement (cyclomatic 18) client/src/pages/Console.tsx:1057 — Console.Console::sendAnnouncement 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. This shape REPEATS in the file: one other method here (Console.Console) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ItemPicker.ItemPicker · ×1
  • ItemPicker.ItemPicker::handleKeyDown (cyclomatic 18) client/src/components/ItemPicker.tsx:228 — ItemPicker.ItemPicker::handleKeyDown 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. This shape REPEATS in the file: one other method here (ItemPicker.ItemPicker) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · problemFixes.resolveHealthFix (cyclomatic 18) · ×1
  • problemFixes.resolveHealthFix (cyclomatic 18) client/src/components/diagnostics/problemFixes.ts:31 — problemFixes.resolveHealthFix 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 · autofix.buildAutofixPreview (cyclomatic 18) · ×1
  • autofix.buildAutofixPreview (cyclomatic 18) client/src/components/mods/autofix.ts:52 — autofix.buildAutofixPreview has cyclomatic complexity 18 (threshold 15). Of this number, 15 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 · cronSchedule.parseSimpleCron (cyclomatic 18) · ×1
  • cronSchedule.parseSimpleCron (cyclomatic 18) client/src/lib/cronSchedule.ts:62 — cronSchedule.parseSimpleCron 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 · modVariants.createDependsOn (cyclomatic 18) · ×1
  • modVariants.createDependsOn (cyclomatic 18) client/src/lib/modVariants.ts:38 — modVariants.createDependsOn has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (link, reach). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · modGroups.validateGroupFields (cyclomatic 18) · ×1
  • modGroups.validateGroupFields (cyclomatic 18) server/utils/modGroups.js:386 — modGroups.validateGroupFields 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 · cronValidation.expandCronField (cyclomatic 18) · ×1
  • cronValidation.expandCronField (cyclomatic 18) server/utils/cronValidation.js:82 — cronValidation.expandCronField 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 · serverFiles.router.post("/restore/ · ×1
  • serverFiles.router.post("/restore/:filename") (cyclomatic 18) REDACTED:2374 — serverFiles.router.post("/restore/:filename") has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 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 · modDefinitionExtractors.extractLuaGlobals (cyclomatic 18) · ×1
  • modDefinitionExtractors.extractLuaGlobals (cyclomatic 18) server/utils/modDefinitionExtractors.js:470 — modDefinitionExtractors.extractLuaGlobals has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function item 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 · mods.router.post("/refresh-names") (cyclomatic 18) · ×1
  • mods.router.post("/refresh-names") (cyclomatic 18) REDACTED:518 — mods.router.post("/refresh-names") 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 branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · mods.router.post("/enable-disk-mod") (cyclomatic 18) · ×1
  • mods.router.post("/enable-disk-mod") (cyclomatic 18) REDACTED:9498 — mods.router.post("/enable-disk-mod") has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 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 · mods.deleteModFromDiskAndIni (cyclomatic 18) · ×1
  • mods.deleteModFromDiskAndIni (cyclomatic 18) REDACTED:9605 — mods.deleteModFromDiskAndIni has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 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 · serverErrorFinder.buildModIndex (cyclomatic 18) · ×1
  • serverErrorFinder.buildModIndex (cyclomatic 18) server/utils/serverErrorFinder.js:351 — serverErrorFinder.buildModIndex 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. This is NOT this file's highest cyclomatic complexity: serverErrorFinder.causeOf (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 · updateBundle.acknowledgeUpdateBundle (cyclomatic 18) · ×1
  • updateBundle.acknowledgeUpdateBundle (cyclomatic 18) server/services/updateBundle.js:594 — updateBundle.acknowledgeUpdateBundle 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 · PanelUpdateChecker.cleanupOldHelperArtifacts (cyclomatic 18) · ×1
  • PanelUpdateChecker.cleanupOldHelperArtifacts (cyclomatic 18) server/services/panelUpdateChecker.js:3274 — PanelUpdateChecker.cleanupOldHelperArtifacts has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 6 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · resetTokenStrength.decodeResetTokenFile (cyclomatic 18) · ×1
  • resetTokenStrength.decodeResetTokenFile (cyclomatic 18) server/utils/resetTokenStrength.js:816 — resetTokenStrength.decodeResetTokenFile 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 · otherServerLifecycle.startOtherServer (cyclomatic 18) · ×1
  • otherServerLifecycle.startOtherServer (cyclomatic 18) server/services/otherServerLifecycle.js:147 — otherServerLifecycle.startOtherServer 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 · whitelistDb.listWhitelistAccounts (cyclomatic 18) · ×1
  • whitelistDb.listWhitelistAccounts (cyclomatic 18) server/utils/whitelistDb.js:101 — whitelistDb.listWhitelistAccounts has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 111). 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 · characterImport.characterImportRefusal (cyclomatic 18) · ×1
  • characterImport.characterImportRefusal (cyclomatic 18) server/utils/characterImport.js:19 — characterImport.characterImportRefusal 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 · panelBridge.router.get("/scan-paths") · ×1
  • panelBridge.router.get("/scan-paths")::searchForBridge (cyclomatic 18) server/routes/panelBridge.js:1389 — panelBridge.router.get("/scan-paths")::searchForBridge 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 · templates.router.post("/ · ×1
  • templates.router.post("/:id/apply") (cyclomatic 18) REDACTED:140 — templates.router.post("/:id/apply") 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 · fileManagerSftpBackend.createSftpBackend.followLink (cyclomatic 18) · ×1
  • fileManagerSftpBackend.createSftpBackend.followLink (cyclomatic 18) server/services/fileManagerSftpBackend.js:942 — fileManagerSftpBackend.createSftpBackend.followLink 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 · getSupportBundleEntries (cyclomatic 18) · ×1
  • getSupportBundleEntries (cyclomatic 18) REDACTED:1997 — getSupportBundleEntries has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 16 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous) · ×1
  • (anonymous)::searchForBridge (cyclomatic 18) server/routes/panelBridge.js:1389 — (anonymous)::searchForBridge 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 · _ensureSpaceForRestore (cyclomatic 18) · ×1
  • _ensureSpaceForRestore (cyclomatic 18) server/services/backupService.js:1610 — _ensureSpaceForRestore has cyclomatic complexity 18 (threshold 15). Of this number, 15 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 · toFileEntry (cyclomatic 18) · ×1
  • toFileEntry (cyclomatic 18) server/services/fileManagerService.js:373 — toFileEntry 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 · createSftpBackend.followLink (cyclomatic 18) · ×1
  • createSftpBackend.followLink (cyclomatic 18) server/services/fileManagerSftpBackend.js:942 — createSftpBackend.followLink 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 · scheduleAutoUpdate (cyclomatic 18) · ×1
  • scheduleAutoUpdate (cyclomatic 18) REDACTED:584 — scheduleAutoUpdate has cyclomatic complexity 18 (threshold 15). Of this number, 17 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 · createScc · ×1
  • createScc::scc (cyclomatic 18) server/utils/modSmartSort.js:290 — createScc::scc 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 · validateJournal (cyclomatic 18) · ×1
  • validateJournal (cyclomatic 18) server/services/updateBundle.js:195 — validateJournal 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 · demoSmart.demoAddRule (cyclomatic 17) · ×1
  • demoSmart.demoAddRule (cyclomatic 17) client/src/lib/demoSmart.ts:377 — demoSmart.demoAddRule has cyclomatic 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: 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 · VehiclePicker.getVehicleType (cyclomatic 17) · ×1
  • VehiclePicker.getVehicleType (cyclomatic 17) client/src/components/VehiclePicker.tsx:35 — VehiclePicker.getVehicleType 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 · SpawnBrowser.SpawnBrowser · ×1
  • SpawnBrowser.SpawnBrowser::handleKeyDown (cyclomatic 17) client/src/components/SpawnBrowser.tsx:273 — SpawnBrowser.SpawnBrowser::handleKeyDown 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 shape REPEATS in the file: one other method here (SpawnBrowser.SpawnBrowser) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ScheduledBackupServers.ScheduledBackupServers (cyclomatic 17) · ×1
  • ScheduledBackupServers.ScheduledBackupServers (cyclomatic 17) client/src/components/backups/ScheduledBackupServers.tsx:23 — ScheduledBackupServers.ScheduledBackupServers has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (toggle, a function literal at line 31, a function literal at line 83, …). 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 · RemoteRootsDialog.RemoteRootsDialog (cyclomatic 17) · ×1
  • RemoteRootsDialog.RemoteRootsDialog (cyclomatic 17) client/src/components/files/RemoteRootsDialog.tsx:34 — RemoteRootsDialog.RemoteRootsDialog has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RootList.RootList (cyclomatic 17) · ×1
  • RootList.RootList (cyclomatic 17) client/src/components/files/RootList.tsx:186 — RootList.RootList 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 one function literal inside it that branches (line 195). 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 · ModNoteDialog.ModNoteDialog (cyclomatic 17) · ×1
  • ModNoteDialog.ModNoteDialog (cyclomatic 17) client/src/components/mods/ModNoteDialog.tsx:38 — ModNoteDialog.ModNoteDialog has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · toolbar.Toolbar (cyclomatic 17) · ×1
  • toolbar.Toolbar (cyclomatic 17) client/src/components/ui/toolbar.tsx:34 — toolbar.Toolbar 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 3 function literals inside it that branch (lines 42, 70, 40). 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 · processScanRetry.waitForProcessExit (cyclomatic 17) · ×1
  • processScanRetry.waitForProcessExit (cyclomatic 17) server/utils/processScanRetry.js:120 — processScanRetry.waitForProcessExit has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · zomboidDataPath.checkZomboidDataPath (cyclomatic 17) · ×1
  • zomboidDataPath.checkZomboidDataPath (cyclomatic 17) server/services/zomboidDataPath.js:591 — zomboidDataPath.checkZomboidDataPath 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 · ModChecker.init (cyclomatic 17) · ×1
  • ModChecker.init (cyclomatic 17) server/services/modChecker.js:497 — ModChecker.init 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 · iniSecretLines.reconcileMaskedIniLines (cyclomatic 17) · ×1
  • iniSecretLines.reconcileMaskedIniLines (cyclomatic 17) server/utils/iniSecretLines.js:90 — iniSecretLines.reconcileMaskedIniLines has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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 · oidc.testOidcDiscovery (cyclomatic 17) · ×1
  • oidc.testOidcDiscovery (cyclomatic 17) server/services/oidc.js:342 — oidc.testOidcDiscovery 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 · workshopCollectionSync.postSharedfilesAction (cyclomatic 17) · ×1
  • workshopCollectionSync.postSharedfilesAction (cyclomatic 17) server/services/workshopCollectionSync.js:215 — workshopCollectionSync.postSharedfilesAction 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 · modSmartScan.addConflictSuggestions (cyclomatic 17) · ×1
  • modSmartScan.addConflictSuggestions (cyclomatic 17) server/services/modSmartScan.js:26 — modSmartScan.addConflictSuggestions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · modSmartSort.createScc.scc (cyclomatic 17) · ×1
  • modSmartSort.createScc.scc (cyclomatic 17) server/utils/modSmartSort.js:290 — modSmartSort.createScc.scc 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 · mods.router.get("/current-config") (cyclomatic 17) · ×1
  • mods.router.get("/current-config") (cyclomatic 17) REDACTED:2369 — mods.router.get("/current-config") has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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 · mods.router.post("/presets/ · ×1
  • mods.router.post("/presets/:id/apply") (cyclomatic 17) REDACTED:5322 — mods.router.post("/presets/:id/apply") has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 5360, 5370, 5371, …). 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 · serverErrorFinder.modByPath (cyclomatic 17) · ×1
  • serverErrorFinder.modByPath (cyclomatic 17) server/utils/serverErrorFinder.js:393 — serverErrorFinder.modByPath 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. This is NOT this file's highest cyclomatic complexity: serverErrorFinder.causeOf (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 · serverErrorFinder.findServerErrors · ×1
  • serverErrorFinder.findServerErrors::record (cyclomatic 17) server/utils/serverErrorFinder.js:783 — serverErrorFinder.findServerErrors::record 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 shape REPEATS in the file: one other method here (serverErrorFinder.findServerErrors) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: serverErrorFinder.causeOf (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 · serverProblems.scanServerProblems (cyclomatic 17) · ×1
  • serverProblems.scanServerProblems (cyclomatic 17) server/services/serverProblems.js:86 — serverProblems.scanServerProblems has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · debug.collectBundleFilesFromDir (cyclomatic 17) · ×1
  • debug.collectBundleFilesFromDir (cyclomatic 17) REDACTED:379 — debug.collectBundleFilesFromDir has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (visit). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · server.router.get("/branches") (cyclomatic 17) · ×1
  • server.router.get("/branches") (cyclomatic 17) REDACTED:3531 — server.router.get("/branches") has cyclomatic 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, 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 · ServerPlayersWatch.tick (cyclomatic 17) · ×1
  • ServerPlayersWatch.tick (cyclomatic 17) server/services/serverPlayersWatch.js:79 — ServerPlayersWatch.tick 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 branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · UpdateChecker.checkForUpdates (cyclomatic 17) · ×1
  • UpdateChecker.checkForUpdates (cyclomatic 17) REDACTED:439 — UpdateChecker.checkForUpdates 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 · discord.router.put("/permissions") (cyclomatic 17) · ×1
  • discord.router.put("/permissions") (cyclomatic 17) REDACTED:892 — discord.router.put("/permissions") has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 933, 939). 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 · panelBridge.router.post("/install-mod-auto") (cyclomatic 17) · ×1
  • panelBridge.router.post("/install-mod-auto") (cyclomatic 17) server/routes/panelBridge.js:3464 — panelBridge.router.post("/install-mod-auto") 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 · fileManagerLocalFs.deleteTree (cyclomatic 17) · ×1
  • fileManagerLocalFs.deleteTree (cyclomatic 17) server/services/fileManagerLocalFs.js:380 — fileManagerLocalFs.deleteTree has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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 · fileManagerSftpBackend.sanitizeTrashMeta (cyclomatic 17) · ×1
  • fileManagerSftpBackend.sanitizeTrashMeta (cyclomatic 17) server/services/fileManagerSftpBackend.js:356 — fileManagerSftpBackend.sanitizeTrashMeta has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · fileManagerService.checkUploadTarget (cyclomatic 17) · ×1
  • fileManagerService.checkUploadTarget (cyclomatic 17) server/services/fileManagerService.js:1444 — fileManagerService.checkUploadTarget 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 · characterStore.computeSkillDelta (cyclomatic 17) · ×1
  • characterStore.computeSkillDelta (cyclomatic 17) server/services/characterStore.js:152 — characterStore.computeSkillDelta 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 · _excludeOtherServersBackups (cyclomatic 17) · ×1
  • _excludeOtherServersBackups (cyclomatic 17) server/services/backupService.js:752 — _excludeOtherServersBackups has cyclomatic complexity 17 (threshold 15). Of this number, 14 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 · _findForeignBackupOwner (cyclomatic 17) · ×1
  • _findForeignBackupOwner (cyclomatic 17) server/services/backupService.js:809 — _findForeignBackupOwner 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 · createSftpBackend.writeBytesCas (cyclomatic 17) · ×1
  • createSftpBackend.writeBytesCas (cyclomatic 17) server/services/fileManagerSftpBackend.js:1614 — createSftpBackend.writeBytesCas 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 2 function literals inside it that branch (lines 1626, 1675). 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 · buildSteps (cyclomatic 17) · ×1
  • buildSteps (cyclomatic 17) server/services/bridgeDelivery.js:970 — buildSteps 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 · writeBytesCas (cyclomatic 17) · ×1
  • writeBytesCas (cyclomatic 17) server/services/fileManagerLocalBackend.js:808 — writeBytesCas has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 811, 894, 898). 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 · parseFrameLine (cyclomatic 17) · ×1
  • parseFrameLine (cyclomatic 17) server/utils/serverErrorFinder.js:209 — parseFrameLine 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: causeOf (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 · mapSteamServer (cyclomatic 17) · ×1
  • mapSteamServer (cyclomatic 17) server/routes/serverFinder.js:519 — mapSteamServer 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, 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 · scanAllCandidates (cyclomatic 17) · ×1
  • scanAllCandidates (cyclomatic 17) server/services/mountDiscovery.js:376 — scanAllCandidates 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 5 function literals inside it that branch (lines 407, 398, 399, …). 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 · SystemHealthBanner.SystemHealthBanner (cyclomatic 16) · ×1
  • SystemHealthBanner.SystemHealthBanner (cyclomatic 16) client/src/components/SystemHealthBanner.tsx:55 — SystemHealthBanner.SystemHealthBanner has cyclomatic complexity 16 (threshold 15). Of this number, 11 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 · Layout.Layout · ×1
  • Layout.Layout::renderRow (cyclomatic 16) client/src/components/Layout.tsx:719 — Layout.Layout::renderRow has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Layout.Layout) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Settings.Settings · ×1
  • Settings.Settings::handleDownloadPanelUpdate (cyclomatic 16) REDACTED:1448 — Settings.Settings::handleDownloadPanelUpdate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Settings.Settings) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · useOrderRules.useOrderRules (cyclomatic 16) · ×1
  • useOrderRules.useOrderRules (cyclomatic 16) client/src/components/mods/useOrderRules.ts:27 — useOrderRules.useOrderRules 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 5 function literals inside it that branch (lines 39, 71, 41, …). 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 · useFixEverything.useFixEverything.apply (cyclomatic 16) · ×1
  • useFixEverything.useFixEverything.apply (cyclomatic 16) client/src/components/mods/useFixEverything.tsx:187 — useFixEverything.useFixEverything.apply 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, 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 · CharacterInventory.TreeRows (cyclomatic 16) · ×1
  • CharacterInventory.TreeRows (cyclomatic 16) client/src/components/players/CharacterInventory.tsx:85 — CharacterInventory.TreeRows has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 105). 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 · OptionGrid.OptionGrid (cyclomatic 16) · ×1
  • OptionGrid.OptionGrid (cyclomatic 16) client/src/components/scheduler/OptionGrid.tsx:28 — OptionGrid.OptionGrid has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (move, a function literal at line 57). 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 · section-card.SectionCard (cyclomatic 16) · ×1
  • section-card.SectionCard (cyclomatic 16) client/src/components/ui/section-card.tsx:42 — section-card.SectionCard 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 · conflictSeverity.recalculateConflictWinners (cyclomatic 16) · ×1
  • conflictSeverity.recalculateConflictWinners (cyclomatic 16) client/src/lib/conflictSeverity.ts:35 — conflictSeverity.recalculateConflictWinners has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · cronSchedule.expandField (cyclomatic 16) · ×1
  • cronSchedule.expandField (cyclomatic 16) client/src/lib/cronSchedule.ts:98 — cronSchedule.expandField 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 · serverStatus.resolveServerCardRunning (cyclomatic 16) · ×1
  • serverStatus.resolveServerCardRunning (cyclomatic 16) client/src/lib/serverStatus.ts:34 — serverStatus.resolveServerCardRunning 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 · sandboxLua.parseTokens · ×1
  • sandboxLua.parseTokens::parseTable (cyclomatic 16) server/utils/sandboxLua.js:307 — sandboxLua.parseTokens::parseTable 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 · PanelBridgeSftpTransport.copyRemote (cyclomatic 16) · ×1
  • PanelBridgeSftpTransport.copyRemote (cyclomatic 16) server/services/panelBridgeSftp.js:525 — PanelBridgeSftpTransport.copyRemote 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 · serverStatus.resolveActiveServerStartedAt (cyclomatic 16) · ×1
  • serverStatus.resolveActiveServerStartedAt (cyclomatic 16) server/utils/serverStatus.js:153 — serverStatus.resolveActiveServerStartedAt 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 · chunks.resolveCustomOrDefaultDataPath (cyclomatic 16) · ×1
  • chunks.resolveCustomOrDefaultDataPath (cyclomatic 16) REDACTED:483 — chunks.resolveCustomOrDefaultDataPath 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 · modClassification.namesTarget (cyclomatic 16) · ×1
  • modClassification.namesTarget (cyclomatic 16) server/utils/modClassification.js:158 — modClassification.namesTarget 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 · modSteamKnowledge.validateEntry (cyclomatic 16) · ×1
  • modSteamKnowledge.validateEntry (cyclomatic 16) server/services/modSteamKnowledge.js:531 — modSteamKnowledge.validateEntry 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 · modSteamKnowledge.loadFromDisk (cyclomatic 16) · ×1
  • modSteamKnowledge.loadFromDisk (cyclomatic 16) server/services/modSteamKnowledge.js:563 — modSteamKnowledge.loadFromDisk 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 · mods.walkDir (cyclomatic 16) · ×1
  • mods.walkDir (cyclomatic 16) REDACTED:6979 — mods.walkDir 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 · debug.parseModInfoMetadata (cyclomatic 16) · ×1
  • debug.parseModInfoMetadata (cyclomatic 16) REDACTED:958 — debug.parseModInfoMetadata 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 · debug.buildZomboidPaths (cyclomatic 16) · ×1
  • debug.buildZomboidPaths (cyclomatic 16) REDACTED:1336 — debug.buildZomboidPaths 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 · debug.router.post("/paths") (cyclomatic 16) · ×1
  • debug.router.post("/paths") (cyclomatic 16) REDACTED:2370 — debug.router.post("/paths") 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 · debug.scanSaveStats (cyclomatic 16) · ×1
  • debug.scanSaveStats (cyclomatic 16) REDACTED:2923 — debug.scanSaveStats has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (walk). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · server.parseSteamBranches (cyclomatic 16) · ×1
  • server.parseSteamBranches (cyclomatic 16) REDACTED:3688 — server.parseSteamBranches 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 · ServerWatch.restartAfterCrash (cyclomatic 16) · ×1
  • ServerWatch.restartAfterCrash (cyclomatic 16) server/services/serverWatch.js:230 — ServerWatch.restartAfterCrash 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 · DiscordBot.checkPermission (cyclomatic 16) · ×1
  • DiscordBot.checkPermission (cyclomatic 16) REDACTED:1205 — DiscordBot.checkPermission 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 · PanelUpdateChecker.fetchLatestReleaseOnce (cyclomatic 16) · ×1
  • PanelUpdateChecker.fetchLatestReleaseOnce (cyclomatic 16) server/services/panelUpdateChecker.js:495 — PanelUpdateChecker.fetchLatestReleaseOnce 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 6 function literals inside it that branch (lines 550, 506, 600, …). 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 · auth.router.post("/reset-password") (cyclomatic 16) · ×1
  • auth.router.post("/reset-password") (cyclomatic 16) REDACTED:1345 — auth.router.post("/reset-password") 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 · oidc.router.get("/callback") (cyclomatic 16) · ×1
  • oidc.router.get("/callback") (cyclomatic 16) REDACTED:322 — oidc.router.get("/callback") 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 · mountDiscovery.classifyCandidate (cyclomatic 16) · ×1
  • mountDiscovery.classifyCandidate (cyclomatic 16) server/services/mountDiscovery.js:307 — mountDiscovery.classifyCandidate 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 · servers.reloadServicesForNewActiveServer (cyclomatic 16) · ×1
  • servers.reloadServicesForNewActiveServer (cyclomatic 16) REDACTED:2413 — servers.reloadServicesForNewActiveServer 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 · players.router.post("/notes") (cyclomatic 16) · ×1
  • players.router.post("/notes") (cyclomatic 16) REDACTED:1172 — players.router.post("/notes") 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 · panelBridge.router.post("/sftp/trust-host-key") (cyclomatic 16) · ×1
  • panelBridge.router.post("/sftp/trust-host-key") (cyclomatic 16) server/routes/panelBridge.js:1255 — panelBridge.router.post("/sftp/trust-host-key") 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 · fileManagerProtectedAreas.makeRules.classify (cyclomatic 16) · ×1
  • fileManagerProtectedAreas.makeRules.classify (cyclomatic 16) server/services/fileManagerProtectedAreas.js:345 — fileManagerProtectedAreas.makeRules.classify 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 · fileManagerProtectedAreas.buildRemoteProtectionContext (cyclomatic 16) · ×1
  • fileManagerProtectedAreas.buildRemoteProtectionContext (cyclomatic 16) server/services/fileManagerProtectedAreas.js:442 — fileManagerProtectedAreas.buildRemoteProtectionContext has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fileManagerSftpBackend.createSftpBackend.writeBytesCas (cyclomatic 16) · ×1
  • fileManagerSftpBackend.createSftpBackend.writeBytesCas (cyclomatic 16) server/services/fileManagerSftpBackend.js:1614 — fileManagerSftpBackend.createSftpBackend.writeBytesCas has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 1626). 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 · index.isPrivateNetworkHost (cyclomatic 16) · ×1
  • index.isPrivateNetworkHost (cyclomatic 16) REDACTED:553 — index.isPrivateNetworkHost 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. This is NOT this file's highest cyclomatic complexity: index.startPlayerPolling (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 · index.autoStartOtherServers (cyclomatic 16) · ×1
  • index.autoStartOtherServers (cyclomatic 16) REDACTED:4436 — index.autoStartOtherServers has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index.startPlayerPolling (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 · generateStartupScripts (cyclomatic 16) · ×1
  • generateStartupScripts (cyclomatic 16) REDACTED:1543 — generateStartupScripts has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · checkSpecificServerStopped (cyclomatic 16) · ×1
  • checkSpecificServerStopped (cyclomatic 16) REDACTED:6192 — checkSpecificServerStopped 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 · openListedLogFile (cyclomatic 16) · ×1
  • openListedLogFile (cyclomatic 16) REDACTED:287 — openListedLogFile has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · getServerStatus (cyclomatic 16) · ×1
  • getServerStatus (cyclomatic 16) REDACTED:3734 — getServerStatus 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 · search (cyclomatic 16) · ×1
  • search (cyclomatic 16) server/services/fileManagerService.js:662 — search 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 · purgeTrash (cyclomatic 16) · ×1
  • purgeTrash (cyclomatic 16) server/services/fileManagerService.js:1982 — purgeTrash has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 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 · receiveUpload (cyclomatic 16) · ×1
  • receiveUpload (cyclomatic 16) server/services/fileManagerLocalBackend.js:1017 — receiveUpload 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 2 function items inside it that branch (a function literal at line 1030, (anonymous)::refuse). 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 · copyFile (cyclomatic 16) · ×1
  • copyFile (cyclomatic 16) server/services/fileManagerLocalBackend.js:1166 — copyFile 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 one function literal inside it that branches (line 1184). 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 · handleOidcCallback (cyclomatic 16) · ×1
  • handleOidcCallback (cyclomatic 16) server/services/oidc.js:518 — handleOidcCallback 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 · makeRules.classify (cyclomatic 16) · ×1
  • makeRules.classify (cyclomatic 16) server/services/fileManagerProtectedAreas.js:345 — makeRules.classify 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 · createBoxMatcher (cyclomatic 16) · ×1
  • createBoxMatcher (cyclomatic 16) server/utils/vehiclesDb.js:164 — createBoxMatcher 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 2 function items inside it that branch (a function literal at line 187, inside). 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 · restartForModUpdates (cyclomatic 16) · ×1
  • restartForModUpdates (cyclomatic 16) server/services/otherServerUpdates.js:301 — restartForModUpdates 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 · Debug.Debug (cognitive 1148) · ×1
  • Debug.Debug (cognitive 1148) client/src/pages/Debug.tsx:1028 — Debug.Debug has cognitive complexity 1148 (threshold 15). Drivers by points: ternaries 228 (674 pts), if/else 179 (227 pts), boolean chains 216, error handling 18, loops 5 (8 pts), match/switch 5 (nesting depth added 497). Of this number, 189 points are the body's own statements and 959 belong to 127 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Mods.Mods (cognitive 954) · ×1
  • Mods.Mods (cognitive 954) client/src/pages/Mods.tsx:301 — Mods.Mods has cognitive complexity 954 (threshold 15). Drivers by points: boolean chains 372, if/else 251 (292 pts), ternaries 140 (193 pts), error handling 54 (56 pts), loops 26 (41 pts) (nesting depth added 111). Of this number, 298 points are the body's own statements and 656 belong to 222 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WorldMap.WorldMap (cognitive 659) · ×1
  • WorldMap.WorldMap (cognitive 659) client/src/pages/WorldMap.tsx:657 — WorldMap.WorldMap has cognitive complexity 659 (threshold 15). Drivers by points: if/else 206 (289 pts), ternaries 107 (176 pts), boolean chains 155, loops 18 (27 pts), error handling 11, match/switch 1 (nesting depth added 161). Of this number, 116 points are the body's own statements and 543 belong to 120 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 · (anonymous) (cognitive 550) · ×1
  • (anonymous) (cognitive 550) REDACTED:3451 — (anonymous) has cognitive complexity 550 (threshold 15). Drivers by points: if/else 161 (290 pts), ternaries 45 (140 pts), boolean chains 65, loops 12 (36 pts), error handling 17 (19 pts) (nesting depth added 250). Of this number, 544 points are the body's own statements and 6 belong to 22 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · debug.router.get("/diagnostics") (cognitive 542) · ×1
  • debug.router.get("/diagnostics") (cognitive 542) REDACTED:3451 — debug.router.get("/diagnostics") has cognitive complexity 542 (threshold 15). Drivers by points: if/else 161 (290 pts), ternaries 42 (136 pts), boolean chains 66, loops 12 (36 pts), error handling 12 (14 pts) (nesting depth added 249). Of this number, 536 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Players.Players (cognitive 532) · ×1
  • Players.Players (cognitive 532) client/src/pages/Players.tsx:288 — Players.Players has cognitive complexity 532 (threshold 15). Drivers by points: ternaries 123 (231 pts), boolean chains 157, if/else 104 (127 pts), error handling 15, loops 2 (nesting depth added 131). Of this number, 277 points are the body's own statements and 255 belong to 93 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 · Backups.Backups (cognitive 378) · ×1
  • Backups.Backups (cognitive 378) client/src/pages/Backups.tsx:155 — Backups.Backups has cognitive complexity 378 (threshold 15). Drivers by points: ternaries 75 (172 pts), if/else 85 (98 pts), boolean chains 92, error handling 14 (15 pts), loops 1 (nesting depth added 111). Of this number, 175 points are the body's own statements and 203 belong to 41 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 · ConflictsPanel.ConflictsPanel (cognitive 338) · ×1
  • ConflictsPanel.ConflictsPanel (cognitive 338) client/src/components/mods/ConflictsPanel.tsx:73 — ConflictsPanel.ConflictsPanel has cognitive complexity 338 (threshold 15). Drivers by points: boolean chains 163, ternaries 38 (118 pts), if/else 33 (47 pts), loops 8 (10 pts) (nesting depth added 96). Of this number, 121 points are the body's own statements and 217 belong to 56 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · computeModHealth (cognitive 275) · ×1
  • computeModHealth (cognitive 275) server/utils/modHealth.js:168 — computeModHealth has cognitive complexity 275 (threshold 15). Drivers by points: if/else 50 (111 pts), ternaries 31 (57 pts), loops 38 (54 pts), boolean chains 50, other 3 (nesting depth added 103). Of this number, 237 points are the body's own statements and 38 belong to 67 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Settings.Settings (cognitive 266) · ×1
  • Settings.Settings (cognitive 266) REDACTED:370 — Settings.Settings has cognitive complexity 266 (threshold 15). Drivers by points: boolean chains 232, ternaries 100 (139 pts), if/else 120 (134 pts), error handling 38 (41 pts), loops 1 (nesting depth added 56). 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. This shape REPEATS in the file: one other method here (Settings.Settings::handleDownloadPanelUpdate) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Dashboard.Dashboard (cognitive 261) · ×1
  • Dashboard.Dashboard (cognitive 261) client/src/pages/Dashboard.tsx:264 — Dashboard.Dashboard has cognitive complexity 261 (threshold 15). Drivers by points: ternaries 149 (266 pts), boolean chains 129, if/else 108 (125 pts), error handling 22 (28 pts), loops 1 (nesting depth added 140). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Dashboard.Dashboard::handleAction) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · serverErrorFinder.findServerErrors (cognitive 248) · ×1
  • serverErrorFinder.findServerErrors (cognitive 248) server/utils/serverErrorFinder.js:763 — serverErrorFinder.findServerErrors has cognitive complexity 248 (threshold 15). Drivers by points: if/else 40 (92 pts), ternaries 37 (92 pts), boolean chains 48, loops 10 (16 pts) (nesting depth added 113). Of this number, 206 points are the body's own statements and 42 belong to 11 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 · (anonymous) (cognitive 222) · ×1
  • (anonymous) (cognitive 222) REDACTED:441 — (anonymous) has cognitive complexity 222 (threshold 15). Drivers by points: if/else 76 (155 pts), boolean chains 32, ternaries 8 (15 pts), error handling 6 (13 pts), other 4, loops 3 (nesting depth added 93). Of this number, 210 points are the body's own statements and 12 belong to 20 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 · start (cognitive 221) · ×1
  • start (cognitive 221) REDACTED:4643 — start has cognitive complexity 221 (threshold 15). Drivers by points: if/else 60 (121 pts), error handling 22 (44 pts), boolean chains 26, ternaries 12 (21 pts), loops 2 (8 pts), other 1 (nesting depth added 98). Of this number, 38 points are the body's own statements and 183 belong to 32 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config.router.put("/app-settings") (cognitive 213) · ×1
  • config.router.put("/app-settings") (cognitive 213) REDACTED:441 — config.router.put("/app-settings") has cognitive complexity 213 (threshold 15). Drivers by points: if/else 76 (155 pts), boolean chains 30, error handling 6 (13 pts), ternaries 7 (12 pts), loops 3 (nesting depth added 91). Of this number, 205 points are the body's own statements and 8 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 · Console.Console (cognitive 211) · ×1
  • Console.Console (cognitive 211) client/src/pages/Console.tsx:242 — Console.Console has cognitive complexity 211 (threshold 15). Drivers by points: ternaries 61 (201 pts), if/else 79 (107 pts), boolean chains 59, error handling 10 (nesting depth added 168). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 2 other methods here (Console.Console::handleKeyDown, Console.Console::sendAnnouncement) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Scheduler.Scheduler (cognitive 210) · ×1
  • Scheduler.Scheduler (cognitive 210) client/src/pages/Scheduler.tsx:112 — Scheduler.Scheduler has cognitive complexity 210 (threshold 15). Drivers by points: ternaries 62 (125 pts), boolean chains 49, if/else 24 (26 pts), error handling 9, loops 1 (nesting depth added 65). Of this number, 72 points are the body's own statements and 138 belong to 33 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 · (anonymous) (cognitive 207) · ×1
  • (anonymous) (cognitive 207) REDACTED:1795 — (anonymous) has cognitive complexity 207 (threshold 15). Drivers by points: if/else 69 (119 pts), boolean chains 43, ternaries 13 (28 pts), error handling 4 (10 pts), loops 4, other 3 (nesting depth added 71). Of this number, 203 points are the body's own statements and 4 belong to 7 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 · servers.router.put("/ · ×1
  • servers.router.put("/:id") (cognitive 201) REDACTED:1795 — servers.router.put("/:id") has cognitive complexity 201 (threshold 15). Drivers by points: if/else 69 (119 pts), boolean chains 40, ternaries 13 (28 pts), error handling 4 (10 pts), loops 4 (nesting depth added 71). Of this number, 199 points are the body's own statements and 2 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 · performRestart (cognitive 182) · ×1
  • performRestart (cognitive 182) server/services/scheduler.js:1946 — performRestart has cognitive complexity 182 (threshold 15). Drivers by points: if/else 79 (130 pts), boolean chains 21, error handling 8 (15 pts), loops 4 (7 pts), ternaries 3 (6 pts), other 3 (nesting depth added 64). Of this number, 178 points are the body's own statements and 4 belong to 7 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 · Discord.Discord (cognitive 176) · ×1
  • Discord.Discord (cognitive 176) client/src/pages/Discord.tsx:337 — Discord.Discord has cognitive complexity 176 (threshold 15). Drivers by points: ternaries 56 (122 pts), boolean chains 109, if/else 42 (43 pts), error handling 13 (15 pts) (nesting depth added 69). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Discord.Discord::saveConfig) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · solve (cognitive 173) · ×1
  • solve (cognitive 173) server/utils/modSmartSort.js:538 — solve has cognitive complexity 173 (threshold 15). Drivers by points: if/else 38 (87 pts), loops 28 (52 pts), boolean chains 21, ternaries 9 (10 pts), other 3 (nesting depth added 74). Of this number, 136 points are the body's own statements and 37 belong to 43 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 · (anonymous) (cognitive 170) · ×1
  • (anonymous) (cognitive 170) REDACTED:2014 — (anonymous) has cognitive complexity 170 (threshold 15). Drivers by points: if/else 43 (79 pts), ternaries 19 (42 pts), boolean chains 25, error handling 7 (13 pts), loops 6 (11 pts) (nesting depth added 70). Of this number, 128 points are the body's own statements and 42 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 · chunks.router.post("/delete-region") (cognitive 168) · ×1
  • chunks.router.post("/delete-region") (cognitive 168) REDACTED:2014 — chunks.router.post("/delete-region") has cognitive complexity 168 (threshold 15). Drivers by points: if/else 43 (79 pts), ternaries 18 (43 pts), boolean chains 22, error handling 7 (13 pts), loops 6 (11 pts) (nesting depth added 72). Of this number, 124 points are the body's own statements and 44 belong to 5 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 · mods.router.post("/search-workshop-mods") (cognitive 162) · ×1
  • mods.router.post("/search-workshop-mods") (cognitive 162) REDACTED:4308 — mods.router.post("/search-workshop-mods") has cognitive complexity 162 (threshold 15). Drivers by points: if/else 37 (101 pts), boolean chains 22, loops 6 (19 pts), error handling 6 (17 pts), ternaries 3 (nesting depth added 88). Of this number, 127 points are the body's own statements and 35 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · (anonymous) (cognitive 162) · ×1
  • (anonymous) (cognitive 162) REDACTED:4308 — (anonymous) has cognitive complexity 162 (threshold 15). Drivers by points: if/else 37 (101 pts), boolean chains 22, loops 6 (19 pts), error handling 6 (17 pts), ternaries 3 (nesting depth added 88). Of this number, 129 points are the body's own statements and 33 belong to 14 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ServerConfig.ServerConfig (cognitive 160) · ×1
  • ServerConfig.ServerConfig (cognitive 160) client/src/pages/ServerConfig.tsx:1011 — ServerConfig.ServerConfig has cognitive complexity 160 (threshold 15). Drivers by points: if/else 210 (270 pts), boolean chains 233, ternaries 83 (123 pts), error handling 31 (32 pts), loops 12 (17 pts), match/switch 1 (nesting depth added 106). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ServerConfig.ServerConfig::loadData) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Servers.Servers (cognitive 160) · ×1
  • Servers.Servers (cognitive 160) client/src/pages/Servers.tsx:334 — Servers.Servers has cognitive complexity 160 (threshold 15). Drivers by points: boolean chains 250, ternaries 90 (186 pts), if/else 133 (160 pts), error handling 24 (27 pts), loops 2 (nesting depth added 126). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (Servers.Servers::handleSaveEdit, Servers.Servers::handleAddExistingServer) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · checkForUpdates (cognitive 146) · ×1
  • checkForUpdates (cognitive 146) server/services/modChecker.js:1953 — checkForUpdates has cognitive complexity 146 (threshold 15). Drivers by points: if/else 41 (92 pts), boolean chains 27, loops 8 (14 pts), error handling 4 (7 pts), ternaries 4 (5 pts), other 1 (nesting depth added 61). Of this number, 140 points are the body's own statements and 6 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · (anonymous) (cognitive 145) · ×1
  • (anonymous) (cognitive 145) REDACTED:3805 — (anonymous) has cognitive complexity 145 (threshold 15). Drivers by points: if/else 48 (65 pts), ternaries 18 (45 pts), error handling 11 (17 pts), boolean chains 15, loops 3 (nesting depth added 50). Of this number, 50 points are the body's own statements and 95 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 · server.router.post("/install") (cognitive 143) · ×1
  • server.router.post("/install") (cognitive 143) REDACTED:3805 — server.router.post("/install") has cognitive complexity 143 (threshold 15). Drivers by points: if/else 46 (63 pts), ternaries 17 (46 pts), error handling 10 (16 pts), boolean chains 15, loops 3 (nesting depth added 52). Of this number, 48 points are the body's own statements and 95 belong to 5 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 · ServerFinder.ServerFinder (cognitive 140) · ×1
  • ServerFinder.ServerFinder (cognitive 140) client/src/pages/ServerFinder.tsx:129 — ServerFinder.ServerFinder has cognitive complexity 140 (threshold 15). Drivers by points: ternaries 32 (76 pts), boolean chains 31, if/else 28 (29 pts), error handling 2, loops 1, match/switch 1 (nesting depth added 45). Of this number, 24 points are the body's own statements and 116 belong to 17 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 · detectConflicts (cognitive 138) · ×1
  • detectConflicts (cognitive 138) REDACTED:7660 — detectConflicts has cognitive complexity 138 (threshold 15). Drivers by points: if/else 25 (70 pts), ternaries 10 (29 pts), loops 6 (22 pts), boolean chains 16, other 1 (nesting depth added 80). Of this number, 136 points are the body's own statements and 2 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 · buildLoadOrderConstraints (cognitive 137) · ×1
  • buildLoadOrderConstraints (cognitive 137) server/utils/modSmartSort.js:125 — buildLoadOrderConstraints has cognitive complexity 137 (threshold 15). Drivers by points: if/else 27 (69 pts), loops 17 (36 pts), boolean chains 16, ternaries 9 (15 pts), other 1 (nesting depth added 67). Of this number, 118 points are the body's own statements and 19 belong to 10 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 · (anonymous) (cognitive 136) · ×1
  • (anonymous) (cognitive 136) REDACTED:1489 — (anonymous) has cognitive complexity 136 (threshold 15). Drivers by points: if/else 43 (75 pts), error handling 10 (20 pts), boolean chains 18, ternaries 11 (18 pts), loops 5 (nesting depth added 49). Of this number, 98 points are the body's own statements and 38 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 · chunks.router.post("/delete-chunks") (cognitive 134) · ×1
  • chunks.router.post("/delete-chunks") (cognitive 134) REDACTED:1489 — chunks.router.post("/delete-chunks") has cognitive complexity 134 (threshold 15). Drivers by points: if/else 43 (75 pts), error handling 10 (20 pts), boolean chains 17, ternaries 10 (17 pts), loops 5 (nesting depth added 49). Of this number, 95 points are the body's own statements and 39 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 · decide (cognitive 121) · ×1
  • decide (cognitive 121) server/utils/modClassification.js:273 — decide has cognitive complexity 121 (threshold 15). Drivers by points: if/else 30 (48 pts), ternaries 17 (38 pts), boolean chains 28, loops 2 (7 pts) (nesting depth added 44). Of this number, 119 points are the body's own statements and 2 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 · (anonymous) (cognitive 116) · ×1
  • (anonymous) (cognitive 116) server/routes/panelBridge.js:1584 — (anonymous) has cognitive complexity 116 (threshold 15). Drivers by points: if/else 30 (52 pts), boolean chains 28, ternaries 10 (20 pts), error handling 6 (11 pts), loops 1 (3 pts), other 2 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OidcSettings.OidcSettings (cognitive 115) · ×1
  • OidcSettings.OidcSettings (cognitive 115) client/src/pages/OidcSettings.tsx:102 — OidcSettings.OidcSettings has cognitive complexity 115 (threshold 15). Drivers by points: ternaries 22 (78 pts), boolean chains 22, if/else 9 (11 pts), error handling 3, loops 1 (nesting depth added 58). Of this number, 91 points are the body's own statements and 24 belong to 8 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Events.Events (cognitive 112) · ×1
  • Events.Events (cognitive 112) client/src/pages/Events.tsx:1082 — Events.Events has cognitive complexity 112 (threshold 15). Drivers by points: boolean chains 136, if/else 83 (116 pts), ternaries 62 (106 pts), error handling 11 (12 pts), loops 2 (4 pts) (nesting depth added 80). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (Events.Events::buildBridgeArgsFromForm, Events.Events::runBridgeOperation) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ServersOverview.ServersOverview (cognitive 109) · ×1
  • ServersOverview.ServersOverview (cognitive 109) client/src/components/dashboard/ServersOverview.tsx:78 — ServersOverview.ServersOverview has cognitive complexity 109 (threshold 15). Drivers by points: boolean chains 47, ternaries 27 (33 pts), if/else 23 (26 pts), error handling 3 (nesting depth added 9). Most of this is not in the body itself: 15 of the 109 points are its own statements and the rest belongs to 21 function items inside it that branch (a function literal at line 369, runAction, actionButton, …). 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 · chunks.router.get("/chunks/ · ×1
  • chunks.router.get("/chunks/:saveName") (cognitive 107) REDACTED:1119 — chunks.router.get("/chunks/:saveName") has cognitive complexity 107 (threshold 15). Drivers by points: if/else 28 (57 pts), loops 7 (16 pts), ternaries 8 (14 pts), boolean chains 12, error handling 4 (8 pts) (nesting depth added 48). Of this number, 91 points are the body's own statements and 16 belong to 9 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 · startServer (cognitive 107) · ×1
  • startServer (cognitive 107) REDACTED:2427 — startServer has cognitive complexity 107 (threshold 15). Drivers by points: if/else 35 (54 pts), boolean chains 19, ternaries 8 (18 pts), error handling 5 (13 pts), loops 1 (2 pts), other 1 (nesting depth added 38). Of this number, 105 points are the body's own statements and 2 belong to 8 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 · (anonymous) (cognitive 107) · ×1
  • (anonymous) (cognitive 107) REDACTED:1119 — (anonymous) has cognitive complexity 107 (threshold 15). Drivers by points: if/else 28 (57 pts), loops 7 (16 pts), ternaries 8 (14 pts), boolean chains 12, error handling 4 (8 pts) (nesting depth added 48). Of this number, 91 points are the body's own statements and 16 belong to 12 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 · RconService.execute (cognitive 104) · ×1
  • RconService.execute (cognitive 104) server/services/rcon.js:1665 — RconService.execute has cognitive complexity 104 (threshold 15). Drivers by points: if/else 28 (71 pts), boolean chains 15, ternaries 3 (10 pts), error handling 3 (8 pts) (nesting depth added 55). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · panelBridge.router.post("/command") (cognitive 103) · ×1
  • panelBridge.router.post("/command") (cognitive 103) server/routes/panelBridge.js:1584 — panelBridge.router.post("/command") has cognitive complexity 103 (threshold 15). Drivers by points: if/else 30 (52 pts), boolean chains 27, ternaries 9 (18 pts), error handling 2 (3 pts), loops 1 (3 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 100) · ×1
  • (anonymous) (cognitive 100) REDACTED:6122 — (anonymous) has cognitive complexity 100 (threshold 15). Drivers by points: if/else 29 (47 pts), boolean chains 27, ternaries 8 (9 pts), error handling 6 (8 pts), loops 3 (8 pts), other 1 (nesting depth added 26). Of this number, 99 points are the body's own statements and 1 belongs 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 · Users.Users (cognitive 97) · ×1
  • Users.Users (cognitive 97) client/src/pages/Users.tsx:82 — Users.Users has cognitive complexity 97 (threshold 15). Drivers by points: if/else 30 (41 pts), ternaries 18 (31 pts), boolean chains 17, error handling 7 (8 pts) (nesting depth added 25). Of this number, 16 points are the body's own statements and 81 belong to 19 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 · planLoadOrder (cognitive 97) · ×1
  • planLoadOrder (cognitive 97) server/utils/modSmartSort.js:370 — planLoadOrder has cognitive complexity 97 (threshold 15). Drivers by points: if/else 19 (33 pts), ternaries 17 (27 pts), loops 13 (18 pts), boolean chains 15, other 4 (nesting depth added 29). Of this number, 68 points are the body's own statements and 29 belong to 18 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 · debug.router.get("/worldmap") (cognitive 95) · ×1
  • debug.router.get("/worldmap") (cognitive 95) REDACTED:6122 — debug.router.get("/worldmap") has cognitive complexity 95 (threshold 15). Drivers by points: if/else 29 (47 pts), boolean chains 27, loops 3 (8 pts), ternaries 6 (8 pts), error handling 3 (5 pts) (nesting depth added 27). Of this number, 94 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 · FileEditorDialog.FileEditorDialog (cognitive 94) · ×1
  • FileEditorDialog.FileEditorDialog (cognitive 94) client/src/components/files/FileEditorDialog.tsx:106 — FileEditorDialog.FileEditorDialog has cognitive complexity 94 (threshold 15). Drivers by points: if/else 29 (34 pts), boolean chains 29, ternaries 14 (25 pts), error handling 5 (6 pts) (nesting depth added 17). Of this number, 41 points are the body's own statements and 53 belong to 16 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 · (anonymous) (cognitive 93) · ×1
  • (anonymous) (cognitive 93) REDACTED:8347 — (anonymous) has cognitive complexity 93 (threshold 15). Drivers by points: if/else 30 (47 pts), loops 7 (15 pts), ternaries 6 (13 pts), boolean chains 10, error handling 4 (6 pts), other 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChunkCleaner.ChunkCleaner (cognitive 92) · ×1
  • ChunkCleaner.ChunkCleaner (cognitive 92) client/src/pages/ChunkCleaner.tsx:320 — ChunkCleaner.ChunkCleaner has cognitive complexity 92 (threshold 15). Drivers by points: if/else 103 (144 pts), boolean chains 124, ternaries 44 (91 pts), error handling 10 (17 pts), loops 10 (16 pts), match/switch 1 (nesting depth added 101). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ChunkCleaner.ChunkCleaner::handleDelete) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Login.Login (cognitive 92) · ×1
  • Login.Login (cognitive 92) client/src/pages/Login.tsx:86 — Login.Login has cognitive complexity 92 (threshold 15). Drivers by points: ternaries 32 (58 pts), boolean chains 17, if/else 10 (11 pts), error handling 5 (6 pts) (nesting depth added 28). Of this number, 58 points are the body's own statements and 34 belong to 11 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 · (anonymous) (cognitive 91) · ×1
  • (anonymous) (cognitive 91) REDACTED:1410 — (anonymous) has cognitive complexity 91 (threshold 15). Drivers by points: if/else 35 (50 pts), boolean chains 29, ternaries 4 (7 pts), error handling 2 (3 pts), loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServerConfig.IniSettingRow (cognitive 90) · ×1
  • ServerConfig.IniSettingRow (cognitive 90) client/src/pages/ServerConfig.tsx:390 — ServerConfig.IniSettingRow has cognitive complexity 90 (threshold 15). Drivers by points: ternaries 20 (50 pts), boolean chains 35, if/else 4 (5 pts) (nesting depth added 31). Of this number, 88 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · servers.router.post("/") (cognitive 89) · ×1
  • servers.router.post("/") (cognitive 89) REDACTED:1410 — servers.router.post("/") has cognitive complexity 89 (threshold 15). Drivers by points: if/else 35 (50 pts), boolean chains 27, ternaries 4 (7 pts), error handling 2 (3 pts), loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Leaderboard.Leaderboard (cognitive 86) · ×1
  • Leaderboard.Leaderboard (cognitive 86) client/src/pages/Leaderboard.tsx:196 — Leaderboard.Leaderboard has cognitive complexity 86 (threshold 15). Drivers by points: ternaries 24 (54 pts), boolean chains 22, if/else 10 (nesting depth added 30). Of this number, 41 points are the body's own statements and 45 belong to 7 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 · mods.detectScriptDefinitionConflicts (cognitive 86) · ×1
  • mods.detectScriptDefinitionConflicts (cognitive 86) REDACTED:7912 — mods.detectScriptDefinitionConflicts has cognitive complexity 86 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 10 (26 pts), ternaries 4 (11 pts), boolean chains 7 (nesting depth added 47). Of this number, 83 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Events.BridgeResultDisplay (cognitive 85) · ×1
  • Events.BridgeResultDisplay (cognitive 85) client/src/pages/Events.tsx:681 — Events.BridgeResultDisplay has cognitive complexity 85 (threshold 15). Drivers by points: ternaries 24 (47 pts), boolean chains 24, if/else 10 (14 pts) (nesting depth added 27). Of this number, 36 points are the body's own statements and 49 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 · mods.router.get("/conflicts/diff") (cognitive 83) · ×1
  • mods.router.get("/conflicts/diff") (cognitive 83) REDACTED:9069 — mods.router.get("/conflicts/diff") has cognitive complexity 83 (threshold 15). Drivers by points: if/else 20 (48 pts), boolean chains 10, ternaries 4 (10 pts), loops 4 (8 pts), error handling 3 (7 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 83) · ×1
  • (anonymous) (cognitive 83) REDACTED:9069 — (anonymous) has cognitive complexity 83 (threshold 15). Drivers by points: if/else 20 (48 pts), boolean chains 10, ternaries 4 (10 pts), loops 4 (8 pts), error handling 3 (7 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runAutoUpdate (cognitive 83) · ×1
  • runAutoUpdate (cognitive 83) REDACTED:648 — runAutoUpdate has cognitive complexity 83 (threshold 15). Drivers by points: if/else 29 (42 pts), ternaries 9 (15 pts), boolean chains 14, other 6, error handling 3 (5 pts), loops 1 (nesting depth added 21). Of this number, 74 points are the body's own statements and 9 belong to 7 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 · computeGroupSuggestions (cognitive 83) · ×1
  • computeGroupSuggestions (cognitive 83) server/utils/modGroupSuggestions.js:190 — computeGroupSuggestions has cognitive complexity 83 (threshold 15). Drivers by points: if/else 20 (40 pts), ternaries 13 (20 pts), loops 13 (14 pts), boolean chains 9 (nesting depth added 28). Of this number, 64 points are the body's own statements and 19 belong to 15 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 · Settings.WorkshopCollectionSyncCard (cognitive 81) · ×1
  • Settings.WorkshopCollectionSyncCard (cognitive 81) REDACTED:6532 — Settings.WorkshopCollectionSyncCard has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 29 (63 pts), if/else 50 (60 pts), boolean chains 58, error handling 7 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Settings.WorkshopCollectionSyncCard::runRowAction) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · server.router.post("/wipe") (cognitive 81) · ×1
  • server.router.post("/wipe") (cognitive 81) REDACTED:8347 — server.router.post("/wipe") has cognitive complexity 81 (threshold 15). Drivers by points: if/else 30 (47 pts), loops 7 (15 pts), boolean chains 10, error handling 4 (6 pts), ternaries 1 (3 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 81) · ×1
  • (anonymous) (cognitive 81) REDACTED:3463 — (anonymous) has cognitive complexity 81 (threshold 15). Drivers by points: if/else 15 (35 pts), loops 9 (30 pts), error handling 4 (9 pts), boolean chains 5, ternaries 2 (nesting depth added 46). Of this number, 31 points are the body's own statements and 50 belong to 12 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ServerManager._scanDedicatedServerProcesses (cognitive 80) · ×1
  • ServerManager._scanDedicatedServerProcesses (cognitive 80) REDACTED:1745 — ServerManager._scanDedicatedServerProcesses has cognitive complexity 80 (threshold 15). Drivers by points: if/else 20 (46 pts), ternaries 7 (19 pts), boolean chains 10, loops 2 (5 pts) (nesting depth added 41). None of this is in the body itself: all 80 points belong to 7 function literals inside it that branch (lines 1852, 1906, 1766, …). 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 · mods.router.post("/write-to-ini") (cognitive 80) · ×1
  • mods.router.post("/write-to-ini") (cognitive 80) REDACTED:2097 — mods.router.post("/write-to-ini") has cognitive complexity 80 (threshold 15). Drivers by points: if/else 26 (53 pts), boolean chains 15, loops 4 (7 pts), ternaries 4, error handling 1 (nesting depth added 30). Of this number, 70 points are the body's own statements and 10 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 · server.router.post("/wipe/preview") (cognitive 80) · ×1
  • server.router.post("/wipe/preview") (cognitive 80) REDACTED:8074 — server.router.post("/wipe/preview") has cognitive complexity 80 (threshold 15). Drivers by points: if/else 21 (37 pts), error handling 9 (24 pts), loops 6 (12 pts), boolean chains 7 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 80) · ×1
  • (anonymous) (cognitive 80) REDACTED:8074 — (anonymous) has cognitive complexity 80 (threshold 15). Drivers by points: if/else 21 (37 pts), error handling 9 (24 pts), loops 6 (12 pts), boolean chains 7 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 79) · ×1
  • (anonymous) (cognitive 79) REDACTED:2097 — (anonymous) has cognitive complexity 79 (threshold 15). Drivers by points: if/else 26 (53 pts), boolean chains 14, loops 4 (7 pts), ternaries 4, error handling 1 (nesting depth added 30). Of this number, 69 points are the body's own statements and 10 belong to 8 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 · _doStart (cognitive 79) · ×1
  • _doStart (cognitive 79) REDACTED:2312 — _doStart has cognitive complexity 79 (threshold 15). Drivers by points: if/else 22 (44 pts), error handling 7 (12 pts), boolean chains 9, ternaries 3 (9 pts), loops 1 (4 pts), other 1 (nesting depth added 36). Of this number, 16 points are the body's own statements and 63 belong to 17 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · fileManagerProtectedAreas.buildProtectionContext (cognitive 78) · ×1
  • fileManagerProtectedAreas.buildProtectionContext (cognitive 78) server/services/fileManagerProtectedAreas.js:181 — fileManagerProtectedAreas.buildProtectionContext has cognitive complexity 78 (threshold 15). Drivers by points: if/else 21 (41 pts), loops 14 (20 pts), boolean chains 10, ternaries 4 (7 pts) (nesting depth added 29). Of this number, 69 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 78) · ×1
  • (anonymous) (cognitive 78) REDACTED:5418 — (anonymous) has cognitive complexity 78 (threshold 15). Drivers by points: if/else 28 (32 pts), ternaries 18 (25 pts), boolean chains 11, error handling 7 (8 pts), loops 2 (nesting depth added 12). Of this number, 25 points are the body's own statements and 53 belong to 10 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 · (anonymous) (cognitive 77) · ×1
  • (anonymous) (cognitive 77) REDACTED:474 — (anonymous) has cognitive complexity 77 (threshold 15). Drivers by points: if/else 26 (37 pts), boolean chains 20, ternaries 8 (10 pts), error handling 3 (7 pts), other 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · preflight (cognitive 73) · ×1
  • preflight (cognitive 73) server/services/panelUpdateChecker.js:1958 — preflight has cognitive complexity 73 (threshold 15). Drivers by points: if/else 24 (31 pts), ternaries 10 (17 pts), error handling 7 (15 pts), boolean chains 10 (nesting depth added 22). Of this number, 66 points are the body's own statements and 7 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 · server.router.post("/steam-update") (cognitive 72) · ×1
  • server.router.post("/steam-update") (cognitive 72) REDACTED:5418 — server.router.post("/steam-update") has cognitive complexity 72 (threshold 15). Drivers by points: if/else 26 (30 pts), ternaries 15 (23 pts), boolean chains 11, error handling 5 (6 pts), loops 2 (nesting depth added 13). Of this number, 23 points are the body's own statements and 49 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 · triggerModRestart (cognitive 72) · ×1
  • triggerModRestart (cognitive 72) server/services/modChecker.js:1640 — triggerModRestart has cognitive complexity 72 (threshold 15). Drivers by points: if/else 24 (34 pts), boolean chains 16, error handling 4 (8 pts), loops 3 (7 pts), ternaries 3 (5 pts), other 2 (nesting depth added 20). Of this number, 68 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · de-lint.main (cognitive 71) · ×1
  • de-lint.main (cognitive 71) client/scripts/de-lint.mjs:448 — de-lint.main has cognitive complexity 71 (threshold 15). Drivers by points: if/else 14 (38 pts), loops 8 (22 pts), ternaries 1 (5 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VehiclePicker.VehiclePicker (cognitive 71) · ×1
  • VehiclePicker.VehiclePicker (cognitive 71) client/src/components/VehiclePicker.tsx:89 — VehiclePicker.VehiclePicker has cognitive complexity 71 (threshold 15). Drivers by points: boolean chains 27, ternaries 14 (21 pts), if/else 15 (19 pts), error handling 2, loops 1, match/switch 1 (nesting depth added 11). Of this number, 31 points are the body's own statements and 40 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 · ProblemsFound.ProblemsFound (cognitive 71) · ×1
  • ProblemsFound.ProblemsFound (cognitive 71) client/src/components/diagnostics/ProblemsFound.tsx:42 — ProblemsFound.ProblemsFound has cognitive complexity 71 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 24, ternaries 12 (17 pts), error handling 3 (nesting depth added 13). Most of this is not in the body itself: 12 of the 71 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 121, row, a function literal at line 65, …). 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 · healthText.useHealthText.body (cognitive 71) · ×1
  • healthText.useHealthText.body (cognitive 71) client/src/components/mods/healthText.ts:117 — healthText.useHealthText.body has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 17 (38 pts), if/else 8 (16 pts), boolean chains 14, loops 1 (2 pts), match/switch 1 (nesting depth added 30). 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 · scheduler.router.put("/tasks/ · ×1
  • scheduler.router.put("/tasks/:id") (cognitive 71) REDACTED:474 — scheduler.router.put("/tasks/:id") has cognitive complexity 71 (threshold 15). Drivers by points: if/else 26 (37 pts), boolean chains 19, ternaries 7 (8 pts), error handling 3 (7 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · solve.breakCycles (cognitive 71) · ×1
  • solve.breakCycles (cognitive 71) server/utils/modSmartSort.js:622 — solve.breakCycles has cognitive complexity 71 (threshold 15). Drivers by points: if/else 7 (28 pts), loops 9 (28 pts), boolean chains 8, ternaries 2 (7 pts) (nesting depth added 45). Of this number, 65 points are the body's own statements and 6 belong to 5 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 · extractArchiveToStaging (cognitive 71) · ×1
  • extractArchiveToStaging (cognitive 71) server/services/backupRestoreExtract.js:210 — extractArchiveToStaging has cognitive complexity 71 (threshold 15). Drivers by points: if/else 28 (35 pts), boolean chains 17, ternaries 10, error handling 5 (7 pts), loops 1, other 1 (nesting depth added 9). Most of this is not in the body itself: 11 of the 71 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 324, (anonymous)::(anonymous)::transform, entryCapOf, …). 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 · extract-pz-sandbox-ground-truth.main (cognitive 69) · ×1
  • extract-pz-sandbox-ground-truth.main (cognitive 69) client/scripts/extract-pz-sandbox-ground-truth.mjs:350 — extract-pz-sandbox-ground-truth.main has cognitive complexity 69 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 8 (16 pts), boolean chains 12, ternaries 2 (3 pts), error handling 1 (nesting depth added 29). Of this number, 63 points are the body's own statements and 6 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 · mods.buildFileIndex (cognitive 69) · ×1
  • mods.buildFileIndex (cognitive 69) REDACTED:7331 — mods.buildFileIndex has cognitive complexity 69 (threshold 15). Drivers by points: if/else 16 (45 pts), loops 7 (13 pts), boolean chains 6, ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpawnBrowser.SpawnBrowser (cognitive 67) · ×1
  • SpawnBrowser.SpawnBrowser (cognitive 67) client/src/components/SpawnBrowser.tsx:81 — SpawnBrowser.SpawnBrowser has cognitive complexity 67 (threshold 15). Drivers by points: ternaries 47 (88 pts), if/else 36 (47 pts), boolean chains 42, error handling 3, loops 2 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (SpawnBrowser.SpawnBrowser::handleKeyDown) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · modSmartSort.solve.breakCycles (cognitive 67) · ×1
  • modSmartSort.solve.breakCycles (cognitive 67) server/utils/modSmartSort.js:622 — modSmartSort.solve.breakCycles has cognitive complexity 67 (threshold 15). Drivers by points: if/else 7 (28 pts), loops 9 (28 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/discover-mod-ids") (cognitive 67) · ×1
  • mods.router.post("/discover-mod-ids") (cognitive 67) REDACTED:6264 — mods.router.post("/discover-mod-ids") has cognitive complexity 67 (threshold 15). Drivers by points: if/else 21 (38 pts), boolean chains 12, loops 4 (11 pts), ternaries 2 (4 pts), error handling 2 (nesting depth added 26). Of this number, 64 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 · (anonymous) (cognitive 67) · ×1
  • (anonymous) (cognitive 67) REDACTED:6264 — (anonymous) has cognitive complexity 67 (threshold 15). Drivers by points: if/else 21 (38 pts), boolean chains 12, loops 4 (11 pts), ternaries 2 (4 pts), error handling 2 (nesting depth added 26). Of this number, 63 points are the body's own statements and 4 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 · reconcileInner (cognitive 66) · ×1
  • reconcileInner (cognitive 66) server/services/bridgeDelivery.js:1459 — reconcileInner has cognitive complexity 66 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 11, error handling 3 (8 pts), loops 3 (8 pts), ternaries 3 (8 pts) (nesting depth added 26). Most of this is not in the body itself: 4 of the 66 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1468, 1485, 1474, …). 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 · discord.router.put("/config") (cognitive 65) · ×1
  • discord.router.put("/config") (cognitive 65) REDACTED:208 — discord.router.put("/config") has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (29 pts), boolean chains 22, ternaries 9 (13 pts), error handling 1 (nesting depth added 9). Most of this is not in the body itself: 6 of the 65 points are its own statements and the rest belongs to one function literal inside it that branches (line 252). 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 · Setup.Setup (cognitive 64) · ×1
  • Setup.Setup (cognitive 64) client/src/pages/Setup.tsx:43 — Setup.Setup has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 23 (42 pts), boolean chains 12, if/else 8 (9 pts), error handling 1 (nesting depth added 20). Of this number, 39 points are the body's own statements and 25 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileManagerService.deletePreview (cognitive 64) · ×1
  • fileManagerService.deletePreview (cognitive 64) server/services/fileManagerService.js:1137 — fileManagerService.deletePreview has cognitive complexity 64 (threshold 15). Drivers by points: if/else 11 (37 pts), ternaries 7 (11 pts), boolean chains 6, loops 4 (6 pts), error handling 2 (4 pts) (nesting depth added 34). Of this number, 63 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 · ServerConfig.SandboxSettingRow (cognitive 63) · ×1
  • ServerConfig.SandboxSettingRow (cognitive 63) client/src/pages/ServerConfig.tsx:720 — ServerConfig.SandboxSettingRow has cognitive complexity 63 (threshold 15). Drivers by points: ternaries 13 (41 pts), boolean chains 22 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ModGroupsPanel.ModGroupsPanel (cognitive 63) · ×1
  • ModGroupsPanel.ModGroupsPanel (cognitive 63) client/src/components/mods/ModGroupsPanel.tsx:94 — ModGroupsPanel.ModGroupsPanel has cognitive complexity 63 (threshold 15). Drivers by points: boolean chains 24, ternaries 10 (17 pts), if/else 13 (16 pts), error handling 6 (nesting depth added 10). Of this number, 38 points are the body's own statements and 25 belong to 10 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 · mods.router.post("/remove-from-ini") (cognitive 63) · ×1
  • mods.router.post("/remove-from-ini") (cognitive 63) REDACTED:3214 — mods.router.post("/remove-from-ini") has cognitive complexity 63 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 8, loops 3 (8 pts), ternaries 6 (7 pts), error handling 1 (nesting depth added 22). Most of this is not in the body itself: 15 of the 63 points are its own statements and the rest belongs to one function literal inside it that branches (line 3271). 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 · server.router.post("/quick-setup") (cognitive 63) · ×1
  • server.router.post("/quick-setup") (cognitive 63) REDACTED:4670 — server.router.post("/quick-setup") has cognitive complexity 63 (threshold 15). Drivers by points: if/else 26 (32 pts), ternaries 10 (19 pts), boolean chains 7, error handling 5 (nesting depth added 15). Of this number, 61 points are the body's own statements and 2 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 · (anonymous) (cognitive 62) · ×1
  • (anonymous) (cognitive 62) REDACTED:3214 — (anonymous) has cognitive complexity 62 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 8, loops 3 (8 pts), ternaries 6, error handling 1 (nesting depth added 21). Most of this is not in the body itself: 14 of the 62 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 3271, 3289, 3305, …). 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 · demo.installDemoFetchShim (cognitive 61) · ×1
  • demo.installDemoFetchShim (cognitive 61) client/src/lib/demo.ts:1660 — demo.installDemoFetchShim has cognitive complexity 61 (threshold 15). Drivers by points: boolean chains 60, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · modIniEdit.applyModListFix (cognitive 61) · ×1
  • modIniEdit.applyModListFix (cognitive 61) REDACTED:166 — modIniEdit.applyModListFix has cognitive complexity 61 (threshold 15). Drivers by points: if/else 19 (41 pts), boolean chains 11, loops 4 (7 pts), match/switch 1, ternaries 1 (nesting depth added 25). Of this number, 42 points are the body's own statements and 19 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.get("/tracked") (cognitive 61) · ×1
  • mods.router.get("/tracked") (cognitive 61) REDACTED:400 — mods.router.get("/tracked") has cognitive complexity 61 (threshold 15). Drivers by points: if/else 14 (44 pts), loops 3 (10 pts), boolean chains 5, error handling 2 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · (anonymous) (cognitive 61) · ×1
  • (anonymous) (cognitive 61) REDACTED:400 — (anonymous) has cognitive complexity 61 (threshold 15). Drivers by points: if/else 14 (44 pts), loops 3 (10 pts), boolean chains 5, error handling 2 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Files.Files (cognitive 60) · ×1
  • Files.Files (cognitive 60) client/src/pages/Files.tsx:187 — Files.Files has cognitive complexity 60 (threshold 15). Drivers by points: if/else 160 (213 pts), ternaries 60 (96 pts), boolean chains 95, error handling 13 (17 pts), loops 8 (11 pts), match/switch 4 (nesting depth added 96). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Files.Files::renderListBody) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · WorkshopCollectionPanel.Row (cognitive 60) · ×1
  • WorkshopCollectionPanel.Row (cognitive 60) client/src/components/WorkshopCollectionPanel.tsx:905 — WorkshopCollectionPanel.Row has cognitive complexity 60 (threshold 15). Drivers by points: ternaries 29 (52 pts), boolean chains 8 (nesting depth added 23). Of this number, 59 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 · chunks.router.get("/saves") (cognitive 60) · ×1
  • chunks.router.get("/saves") (cognitive 60) REDACTED:688 — chunks.router.get("/saves") has cognitive complexity 60 (threshold 15). Drivers by points: ternaries 12 (26 pts), if/else 17 (21 pts), boolean chains 7, error handling 5 (6 pts) (nesting depth added 19). Of this number, 50 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 · mods.detectLuaGlobalClashes (cognitive 60) · ×1
  • mods.detectLuaGlobalClashes (cognitive 60) REDACTED:8029 — mods.detectLuaGlobalClashes has cognitive complexity 60 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 9 (16 pts), ternaries 4 (10 pts), boolean chains 4 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · groupIntoPairs (cognitive 60) · ×1
  • groupIntoPairs (cognitive 60) REDACTED:8126 — groupIntoPairs has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (48 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 37). Of this number, 58 points are the body's own statements and 2 belong to 5 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 · WorkshopCollectionPanel.WorkshopCollectionPanel (cognitive 59) · ×1
  • WorkshopCollectionPanel.WorkshopCollectionPanel (cognitive 59) client/src/components/WorkshopCollectionPanel.tsx:127 — WorkshopCollectionPanel.WorkshopCollectionPanel has cognitive complexity 59 (threshold 15). Drivers by points: if/else 64 (90 pts), ternaries 29 (48 pts), boolean chains 46, error handling 5 (7 pts), loops 2 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (WorkshopCollectionPanel.WorkshopCollectionPanel::runRowAction, WorkshopCollectionPanel.WorkshopCollectionPanel::runBulk) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · modLoadOrder.analyzeModOrder (cognitive 58) · ×1
  • modLoadOrder.analyzeModOrder (cognitive 58) server/utils/modLoadOrder.js:560 — modLoadOrder.analyzeModOrder has cognitive complexity 58 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 13, loops 8 (12 pts), ternaries 3 (6 pts) (nesting depth added 22). Of this number, 54 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 · mods.findMissingDeps (cognitive 58) · ×1
  • mods.findMissingDeps (cognitive 58) REDACTED:8424 — mods.findMissingDeps has cognitive complexity 58 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 9 (18 pts), error handling 2 (7 pts), boolean chains 5 (nesting depth added 33). Of this number, 57 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 · index.handlePanelUpdateDownload (cognitive 58) · ×1
  • index.handlePanelUpdateDownload (cognitive 58) REDACTED:2552 — index.handlePanelUpdateDownload has cognitive complexity 58 (threshold 15). Drivers by points: if/else 18 (38 pts), ternaries 5 (12 pts), boolean chains 7, error handling 1 (nesting depth added 27). Of this number, 57 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 · findSteamDeps (cognitive 58) · ×1
  • findSteamDeps (cognitive 58) REDACTED:8544 — findSteamDeps has cognitive complexity 58 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 7 (15 pts), boolean chains 8, error handling 2 (5 pts) (nesting depth added 29). Of this number, 57 points are the body's own statements and 1 belongs 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 · _doCreateBackup (cognitive 58) · ×1
  • _doCreateBackup (cognitive 58) server/services/backupService.js:1036 — _doCreateBackup has cognitive complexity 58 (threshold 15). Drivers by points: if/else 24 (28 pts), error handling 12 (16 pts), boolean chains 10, other 3, loops 1 (nesting depth added 8). Of this number, 23 points are the body's own statements and 35 belong to 19 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · chunks.router.get("/stats/ · ×1
  • chunks.router.get("/stats/:saveName") (cognitive 57) REDACTED:2569 — chunks.router.get("/stats/:saveName") has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (30 pts), error handling 8 (15 pts), boolean chains 6, loops 3 (5 pts), ternaries 1 (nesting depth added 19). Of this number, 52 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 · (anonymous) (cognitive 57) · ×1
  • (anonymous) (cognitive 57) REDACTED:2569 — (anonymous) has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (30 pts), error handling 8 (15 pts), boolean chains 6, loops 3 (5 pts), ternaries 1 (nesting depth added 19). Of this number, 52 points are the body's own statements and 5 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 · CommandPalette.CommandPalette (cognitive 56) · ×1
  • CommandPalette.CommandPalette (cognitive 56) client/src/components/CommandPalette.tsx:49 — CommandPalette.CommandPalette has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 17, ternaries 11 (15 pts), loops 3 (4 pts) (nesting depth added 10). Most of this is not in the body itself: 2 of the 56 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 62, onInputKeyDown, a function literal at line 243, …). 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 · paths.setDataPaths (cognitive 56) · ×1
  • paths.setDataPaths (cognitive 56) server/utils/paths.js:307 — paths.setDataPaths has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 8, ternaries 5 (8 pts), error handling 3 (4 pts), loops 1 (nesting depth added 21). Of this number, 53 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 · index.app.post("/api/panel/restart") (cognitive 56) · ×1
  • index.app.post("/api/panel/restart") (cognitive 56) REDACTED:2157 — index.app.post("/api/panel/restart") has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (32 pts), error handling 6 (12 pts), boolean chains 8, ternaries 3 (4 pts) (nesting depth added 20). Of this number, 40 points are the body's own statements and 16 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 · (anonymous) (cognitive 56) · ×1
  • (anonymous) (cognitive 56) REDACTED:688 — (anonymous) has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 12 (22 pts), if/else 17 (21 pts), boolean chains 7, error handling 5 (6 pts) (nesting depth added 15). Of this number, 46 points are the body's own statements and 10 belong to 8 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 · extract-pz-character-names.main (cognitive 55) · ×1
  • extract-pz-character-names.main (cognitive 55) client/scripts/extract-pz-character-names.mjs:184 — extract-pz-character-names.main has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (40 pts), boolean chains 6, loops 4 (6 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Layout.Layout (cognitive 55) · ×1
  • Layout.Layout (cognitive 55) client/src/components/Layout.tsx:178 — Layout.Layout has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 43 (66 pts), boolean chains 57, if/else 43 (50 pts), error handling 7 (8 pts), loops 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Layout.Layout::renderRow) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ModGroupDialog.ModGroupDialog (cognitive 55) · ×1
  • ModGroupDialog.ModGroupDialog (cognitive 55) client/src/components/mods/ModGroupDialog.tsx:73 — ModGroupDialog.ModGroupDialog has cognitive complexity 55 (threshold 15). Drivers by points: boolean chains 22, if/else 13 (17 pts), ternaries 10 (13 pts), loops 2, error handling 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 38 belong to 12 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 · (anonymous) (cognitive 55) · ×1
  • (anonymous) (cognitive 55) REDACTED:2157 — (anonymous) has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (32 pts), error handling 6 (12 pts), boolean chains 8, ternaries 3 (nesting depth added 19). Of this number, 40 points are the body's own statements and 15 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · demoSmart.demoPlan (cognitive 54) · ×1
  • demoSmart.demoPlan (cognitive 54) client/src/lib/demoSmart.ts:96 — demoSmart.demoPlan has cognitive complexity 54 (threshold 15). Drivers by points: loops 17 (23 pts), if/else 10 (18 pts), ternaries 4 (9 pts), boolean chains 4 (nesting depth added 19). Of this number, 43 points are the body's own statements and 11 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 · TaskDialog.TaskDialog (cognitive 54) · ×1
  • TaskDialog.TaskDialog (cognitive 54) client/src/components/scheduler/TaskDialog.tsx:69 — TaskDialog.TaskDialog has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 41, ternaries 18 (22 pts), if/else 21, error handling 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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. This shape REPEATS in the file: one other method here (TaskDialog.TaskDialog::handleSave) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · init.getDb (cognitive 54) · ×1
  • init.getDb (cognitive 54) server/database/init.js:1106 — init.getDb has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (28 pts), error handling 6 (17 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · modContentProfile.summarizeModFiles (cognitive 54) · ×1
  • modContentProfile.summarizeModFiles (cognitive 54) server/utils/modContentProfile.js:89 — modContentProfile.summarizeModFiles has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (45 pts), boolean chains 8, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrashView.TrashView (cognitive 53) · ×1
  • TrashView.TrashView (cognitive 53) client/src/components/files/TrashView.tsx:38 — TrashView.TrashView has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 10 (25 pts), if/else 12 (15 pts), boolean chains 9, error handling 4 (nesting depth added 18). Of this number, 25 points are the body's own statements and 28 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 · OrderRuleDialog.OrderRuleDialog (cognitive 53) · ×1
  • OrderRuleDialog.OrderRuleDialog (cognitive 53) client/src/components/mods/OrderRuleDialog.tsx:50 — OrderRuleDialog.OrderRuleDialog has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 17, ternaries 13 (15 pts), error handling 1, loops 1 (nesting depth added 6). Most of this is not in the body itself: 11 of the 53 points are its own statements and the rest belongs to 9 function items inside it that branch (onSearchKeyDown, submit, a function literal at line 215, …). 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 · mods.router.post("/batch-delete-disk-mods") (cognitive 53) · ×1
  • mods.router.post("/batch-delete-disk-mods") (cognitive 53) REDACTED:9882 — mods.router.post("/batch-delete-disk-mods") has cognitive complexity 53 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 9 (14 pts), boolean chains 10, error handling 5 (10 pts), ternaries 3 (nesting depth added 15). Of this number, 44 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 · _runRestore (cognitive 53) · ×1
  • _runRestore (cognitive 53) server/services/backupService.js:2218 — _runRestore has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (27 pts), error handling 8 (14 pts), ternaries 4 (9 pts), boolean chains 2, other 1 (nesting depth added 17). Of this number, 52 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 · deleteItems (cognitive 53) · ×1
  • deleteItems (cognitive 53) server/services/fileManagerService.js:1251 — deleteItems has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 6 (12 pts), boolean chains 9, error handling 3 (6 pts), loops 3 (4 pts) (nesting depth added 20). Of this number, 51 points are the body's own statements and 2 belong to 10 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 · applyDeliverySwitch (cognitive 53) · ×1
  • applyDeliverySwitch (cognitive 53) server/services/bridgeDelivery.js:1173 — applyDeliverySwitch has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 12, error handling 4 (7 pts), ternaries 5 (7 pts), loops 4 (6 pts), other 1 (nesting depth added 15). None of this is in the body itself: all 53 points belong to 13 function items inside it that branch (a function literal at line 1179, a function literal at line 1264, a function literal at line 1333, …). 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 · TemplatePreviewDialog.TemplatePreviewDialog (cognitive 52) · ×1
  • TemplatePreviewDialog.TemplatePreviewDialog (cognitive 52) client/src/components/templates/TemplatePreviewDialog.tsx:37 — TemplatePreviewDialog.TemplatePreviewDialog has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 6 (21 pts), if/else 14 (19 pts), boolean chains 9, error handling 2 (3 pts) (nesting depth added 21). Of this number, 22 points are the body's own statements and 30 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 · modConflictSuggestions.suggestConflictWinner (cognitive 52) · ×1
  • modConflictSuggestions.suggestConflictWinner (cognitive 52) server/utils/modConflictSuggestions.js:104 — modConflictSuggestions.suggestConflictWinner has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 15 (18 pts), boolean chains 15 (nesting depth added 12). Of this number, 46 points are the body's own statements and 6 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 · modSteamKnowledge.findRequiredItemsContainer (cognitive 52) · ×1
  • modSteamKnowledge.findRequiredItemsContainer (cognitive 52) server/services/modSteamKnowledge.js:276 — modSteamKnowledge.findRequiredItemsContainer has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (40 pts), boolean chains 6, loops 4 (6 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DashboardPerformanceCharts.DashboardPerformanceCharts (cognitive 51) · ×1
  • DashboardPerformanceCharts.DashboardPerformanceCharts (cognitive 51) client/src/components/DashboardPerformanceCharts.tsx:73 — DashboardPerformanceCharts.DashboardPerformanceCharts has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 13 (27 pts), boolean chains 14, if/else 8 (10 pts) (nesting depth added 16). Most of this is not in the body itself: 11 of the 51 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 110, 224). 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 · (anonymous) (cognitive 51) · ×1
  • (anonymous) (cognitive 51) server/routes/panelBridge.js:694 — (anonymous) has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 14, loops 2 (5 pts), error handling 3, ternaries 1 (nesting depth added 11). Of this number, 39 points are the body's own statements and 12 belong to 11 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 · PanelUpdateChecker.downloadUpdate (cognitive 50) · ×1
  • PanelUpdateChecker.downloadUpdate (cognitive 50) server/services/panelUpdateChecker.js:716 — PanelUpdateChecker.downloadUpdate has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (25 pts), error handling 10 (15 pts), boolean chains 5, ternaries 4 (5 pts) (nesting depth added 11). Of this number, 49 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · characterImport.characterImportArgs (cognitive 50) · ×1
  • characterImport.characterImportArgs (cognitive 50) server/utils/characterImport.js:77 — characterImport.characterImportArgs has cognitive complexity 50 (threshold 15). Drivers by points: if/else 22 (56 pts), boolean chains 10, loops 4 (10 pts), ternaries 1 (2 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (characterImport.characterImportArgs::copyItems) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · panelBridge.router.post("/auto-configure") (cognitive 50) · ×1
  • panelBridge.router.post("/auto-configure") (cognitive 50) server/routes/panelBridge.js:694 — panelBridge.router.post("/auto-configure") has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 14, loops 2 (5 pts), error handling 2, ternaries 1 (nesting depth added 11). Of this number, 38 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileManagerZip.planZip (cognitive 50) · ×1
  • fileManagerZip.planZip (cognitive 50) server/services/fileManagerZip.js:142 — fileManagerZip.planZip has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (31 pts), ternaries 6 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 24). Of this number, 33 points are the body's own statements and 17 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 · readServerStatuses (cognitive 50) · ×1
  • readServerStatuses (cognitive 50) REDACTED:895 — readServerStatuses has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 17, if/else 10 (14 pts), ternaries 5 (9 pts), error handling 4 (7 pts), loops 2 (3 pts) (nesting depth added 12). Most of this is not in the body itself: 14 of the 50 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 939, startedAtFor, a function literal at line 1086, …). 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 · fetchWorkshopDetails (cognitive 50) · ×1
  • fetchWorkshopDetails (cognitive 50) server/services/modChecker.js:312 — fetchWorkshopDetails has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 8, ternaries 2 (8 pts), loops 2 (3 pts), error handling 1 (2 pts), other 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · classifyMods (cognitive 50) · ×1
  • classifyMods (cognitive 50) server/utils/modClassification.js:197 — classifyMods has cognitive complexity 50 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 13, loops 9 (12 pts), ternaries 3 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CharacterInventory.CharacterInventory (cognitive 49) · ×1
  • CharacterInventory.CharacterInventory (cognitive 49) client/src/components/players/CharacterInventory.tsx:209 — CharacterInventory.CharacterInventory has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 12 (28 pts), boolean chains 12, if/else 7 (9 pts) (nesting depth added 18). Of this number, 37 points are the body's own statements and 12 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 · modLoadOrder.computeAutoSortedOrder (cognitive 48) · ×1
  • modLoadOrder.computeAutoSortedOrder (cognitive 48) client/src/lib/modLoadOrder.ts:103 — modLoadOrder.computeAutoSortedOrder has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 9 (12 pts), boolean chains 4 (nesting depth added 22). Of this number, 46 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 · (anonymous) (cognitive 48) · ×1
  • (anonymous) (cognitive 48) REDACTED:2664 — (anonymous) has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 9, error handling 4 (9 pts), ternaries 5 (8 pts), other 5 (nesting depth added 11). Of this number, 47 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · startPlayerPolling (cognitive 48) · ×1
  • startPlayerPolling (cognitive 48) REDACTED:3457 — startPlayerPolling has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (13 pts), error handling 3 (11 pts), boolean chains 5 (nesting depth added 27). Most of this is not in the body itself: 2 of the 48 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 3464, 3485, 3502, …). 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 · saveText (cognitive 48) · ×1
  • saveText (cognitive 48) server/services/fileManagerService.js:849 — saveText has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (28 pts), ternaries 10, boolean chains 5, error handling 2 (4 pts), other 1 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · createScc · ×1
  • createScc::scc (cognitive 48) server/utils/modSmartSort.js:290 — createScc::scc has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (31 pts), loops 6 (15 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModChecker.parseAcfFile (cognitive 47) · ×1
  • ModChecker.parseAcfFile (cognitive 47) server/services/modChecker.js:701 — ModChecker.parseAcfFile has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 7, loops 3 (7 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debug.router.get("/activity") (cognitive 47) · ×1
  • debug.router.get("/activity") (cognitive 47) REDACTED:7243 — debug.router.get("/activity") has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 5 (15 pts), boolean chains 14, loops 5 (10 pts), if/else 7, error handling 1 (nesting depth added 15). Of this number, 46 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 · Debug.getDiagnosticsFixAction (cognitive 46) · ×1
  • Debug.getDiagnosticsFixAction (cognitive 46) client/src/pages/Debug.tsx:390 — Debug.getDiagnosticsFixAction has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 11 (23 pts), boolean chains 9, if/else 5 (9 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileManagerLocalBackend.resolve (cognitive 46) · ×1
  • fileManagerLocalBackend.resolve (cognitive 46) server/services/fileManagerLocalBackend.js:445 — fileManagerLocalBackend.resolve has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (23 pts), error handling 6 (13 pts), boolean chains 6, ternaries 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · computeUnifiedDiff (cognitive 46) · ×1
  • computeUnifiedDiff (cognitive 46) REDACTED:9298 — computeUnifiedDiff has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 6 (10 pts), boolean chains 9, ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · receiveUpload (cognitive 46) · ×1
  • receiveUpload (cognitive 46) server/services/fileManagerService.js:1595 — receiveUpload has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 13, ternaries 5 (7 pts), error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileDiffViewer.FileDiffViewer (cognitive 45) · ×1
  • FileDiffViewer.FileDiffViewer (cognitive 45) client/src/components/FileDiffViewer.tsx:100 — FileDiffViewer.FileDiffViewer has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 24, ternaries 7 (12 pts), if/else 7 (8 pts), error handling 1 (nesting depth added 6). Of this number, 33 points are the body's own statements and 12 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.
D2 · Cognitive Complexity · uiSecretFile.replaceUiSecretFiles (cognitive 45) · ×1
  • uiSecretFile.replaceUiSecretFiles (cognitive 45) server/utils/uiSecretFile.js:81 — uiSecretFile.replaceUiSecretFiles has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 5 (12 pts), loops 6 (7 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/add-all-resolved-deps") (cognitive 45) · ×1
  • mods.router.post("/add-all-resolved-deps") (cognitive 45) REDACTED:4110 — mods.router.post("/add-all-resolved-deps") has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 7, loops 4 (5 pts), error handling 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 12). Of this number, 26 points are the body's own statements and 19 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 · fileManagerLocalBackend.walk (cognitive 45) · ×1
  • fileManagerLocalBackend.walk (cognitive 45) server/services/fileManagerLocalBackend.js:1239 — fileManagerLocalBackend.walk has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (22 pts), error handling 3 (9 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · toIni (cognitive 45) · ×1
  • toIni (cognitive 45) REDACTED:695 — toIni has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (32 pts), boolean chains 4, loops 2 (4 pts), ternaries 2 (4 pts), other 1 (nesting depth added 23). Of this number, 39 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · main (cognitive 45) · ×1
  • main (cognitive 45) build.js:1664 — main has cognitive complexity 45 (threshold 15). Drivers by points: if/else 23 (26 pts), error handling 6 (8 pts), loops 4 (5 pts), ternaries 2 (4 pts), boolean chains 1, other 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · countSandboxBraces (cognitive 45) · ×1
  • countSandboxBraces (cognitive 45) server/utils/sandboxLua.js:669 — countSandboxBraces has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 3 (10 pts), loops 3 (8 pts), boolean chains 7 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · streamZip (cognitive 45) · ×1
  • streamZip (cognitive 45) server/services/fileManagerZip.js:238 — streamZip has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (25 pts), error handling 5 (9 pts), boolean chains 7, loops 2, ternaries 1 (2 pts) (nesting depth added 15). Of this number, 38 points are the body's own statements and 7 belong to 7 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 · modSmartSort.createScc.scc (cognitive 44) · ×1
  • modSmartSort.createScc.scc (cognitive 44) server/utils/modSmartSort.js:290 — modSmartSort.createScc.scc has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (31 pts), loops 5 (11 pts), boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · containerShutdown.saveAndStopLocalServers (cognitive 44) · ×1
  • containerShutdown.saveAndStopLocalServers (cognitive 44) server/services/containerShutdown.js:96 — containerShutdown.saveAndStopLocalServers has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 12, ternaries 4 (6 pts), error handling 5, loops 3 (nesting depth added 6). Of this number, 29 points are the body's own statements and 15 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildCharacterView (cognitive 44) · ×1
  • buildCharacterView (cognitive 44) server/routes/playerCharacter.js:141 — buildCharacterView has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 7, ternaries 4 (6 pts), error handling 2 (4 pts), other 4, loops 1 (3 pts) (nesting depth added 14). Of this number, 43 points are the body's own statements and 1 belongs 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 · Files.Files · ×1
  • Files.Files::renderListBody (cognitive 43) client/src/pages/Files.tsx:1451 — Files.Files::renderListBody has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 8 (20 pts), if/else 12 (17 pts), boolean chains 6 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Files.Files) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog · ×1
  • BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog::apply (cognitive 43) client/src/components/bridge/BridgeDeliverySwitchDialog.tsx:148 — BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog::apply has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 7 (18 pts), if/else 10 (14 pts), boolean chains 8, error handling 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · modLoadOrder.computeOrderingConstraints (cognitive 43) · ×1
  • modLoadOrder.computeOrderingConstraints (cognitive 43) server/utils/modLoadOrder.js:437 — modLoadOrder.computeOrderingConstraints has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 7 (13 pts), boolean chains 9 (nesting depth added 15). Of this number, 32 points are the body's own statements and 11 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 · mods.router.get("/validate-config") (cognitive 43) · ×1
  • mods.router.get("/validate-config") (cognitive 43) REDACTED:4936 — mods.router.get("/validate-config") has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 6 (14 pts), boolean chains 2, ternaries 2, error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 43) · ×1
  • (anonymous) (cognitive 43) REDACTED:4936 — (anonymous) has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 6 (14 pts), boolean chains 2, ternaries 2, error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ensureQueueProtocol (cognitive 43) · ×1
  • ensureQueueProtocol (cognitive 43) REDACTED:408 — ensureQueueProtocol has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 11, error handling 4 (8 pts), ternaries 3 (6 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parsePlanBody (cognitive 43) · ×1
  • parsePlanBody (cognitive 43) server/routes/modsSmart.js:205 — parsePlanBody has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 5 (9 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · conflictSeverity.recalculateConflictWinners (cognitive 42) · ×1
  • conflictSeverity.recalculateConflictWinners (cognitive 42) client/src/lib/conflictSeverity.ts:35 — conflictSeverity.recalculateConflictWinners has cognitive complexity 42 (threshold 15). Drivers by points: loops 10 (25 pts), if/else 4 (16 pts), boolean chains 1 (nesting depth added 27). 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 · sandboxLua.tokenize (cognitive 42) · ×1
  • sandboxLua.tokenize (cognitive 42) server/utils/sandboxLua.js:173 — sandboxLua.tokenize has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 7, loops 3 (7 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browserCookies.pickSteamCookies (cognitive 42) · ×1
  • browserCookies.pickSteamCookies (cognitive 42) REDACTED:555 — browserCookies.pickSteamCookies has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 19, if/else 10 (11 pts), ternaries 4 (8 pts), loops 3 (4 pts) (nesting depth added 6). Of this number, 26 points are the body's own statements and 16 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · mods.router.post("/add-missing-dep") (cognitive 42) · ×1
  • mods.router.post("/add-missing-dep") (cognitive 42) REDACTED:3939 — mods.router.post("/add-missing-dep") has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 7, ternaries 4, loops 1 (2 pts), error handling 1 (nesting depth added 10). Of this number, 19 points are the body's own statements and 23 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 · mods.router.post("/add-to-ini-bulk") (cognitive 42) · ×1
  • mods.router.post("/add-to-ini-bulk") (cognitive 42) REDACTED:6666 — mods.router.post("/add-to-ini-bulk") has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 6 (10 pts), error handling 3 (7 pts), loops 5 (7 pts), boolean chains 5 (nesting depth added 13). Of this number, 33 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 · stopServer (cognitive 42) · ×1
  • stopServer (cognitive 42) REDACTED:3126 — stopServer has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (24 pts), error handling 5 (11 pts), boolean chains 6, other 1 (nesting depth added 14). Of this number, 41 points are the body's own statements and 1 belongs 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 · createSftpBackend.walk.generate (cognitive 42) · ×1
  • createSftpBackend.walk.generate (cognitive 42) server/services/fileManagerSftpBackend.js:1883 — createSftpBackend.walk.generate has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (24 pts), ternaries 3 (7 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 20). Of this number, 37 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 · keepTogetherForcedApart (cognitive 42) · ×1
  • keepTogetherForcedApart (cognitive 42) server/utils/modGroups.js:68 — keepTogetherForcedApart has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 7 (9 pts), boolean chains 7, ternaries 3 (4 pts) (nesting depth added 13). Of this number, 30 points are the body's own statements and 12 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 · useSteamBranches.useSteamBranches (cognitive 41) · ×1
  • useSteamBranches.useSteamBranches (cognitive 41) client/src/hooks/useSteamBranches.ts:43 — useSteamBranches.useSteamBranches has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 5 (13 pts), boolean chains 6, error handling 2, loops 1 (2 pts) (nesting depth added 15). None of this is in the body itself: all 41 points belong to 5 function literals inside it that branch (lines 80, 116, 144, …). 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 · browserCookies.extractSteamCookies (cognitive 41) · ×1
  • browserCookies.extractSteamCookies (cognitive 41) REDACTED:473 — browserCookies.extractSteamCookies has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 4 (6 pts), boolean chains 5, loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.router.post("/start") (cognitive 41) · ×1
  • server.router.post("/start") (cognitive 41) REDACTED:2316 — server.router.post("/start") has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 8, ternaries 3, error handling 2 (nesting depth added 5). Of this number, 22 points are the body's own statements and 19 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · oidc.router.put("/settings") (cognitive 41) · ×1
  • oidc.router.put("/settings") (cognitive 41) REDACTED:546 — oidc.router.put("/settings") has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (28 pts), ternaries 2 (7 pts), boolean chains 5, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _doConnect (cognitive 41) · ×1
  • _doConnect (cognitive 41) server/services/rcon.js:1295 — _doConnect has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 10, error handling 4 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 41) · ×1
  • (anonymous) (cognitive 41) REDACTED:546 — (anonymous) has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (28 pts), ternaries 2 (7 pts), boolean chains 5, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RolesPermissions.RolesPermissions (cognitive 40) · ×1
  • RolesPermissions.RolesPermissions (cognitive 40) client/src/pages/RolesPermissions.tsx:76 — RolesPermissions.RolesPermissions has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 35 (74 pts), if/else 37 (51 pts), boolean chains 34, error handling 7 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (RolesPermissions.RolesPermissions::applyRoleCapabilities, RolesPermissions.RolesPermissions::handleDeleteSubmit) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ServerManager.loadConfig (cognitive 40) · ×1
  • ServerManager.loadConfig (cognitive 40) REDACTED:1389 — ServerManager.loadConfig has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 7, error handling 1, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/sync-mod-ids") (cognitive 40) · ×1
  • mods.router.post("/sync-mod-ids") (cognitive 40) REDACTED:4745 — mods.router.post("/sync-mod-ids") has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 3, error handling 2 (3 pts), loops 2, ternaries 2 (nesting depth added 14). Most of this is not in the body itself: 14 of the 40 points are its own statements and the rest belongs to one function literal inside it that branches (line 4813). 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 · mods.router.post("/resolve-orphan-workshop") (cognitive 40) · ×1
  • mods.router.post("/resolve-orphan-workshop") (cognitive 40) REDACTED:10080 — mods.router.post("/resolve-orphan-workshop") has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (20 pts), loops 4 (7 pts), boolean chains 6, ternaries 3 (5 pts), error handling 2 (nesting depth added 10). Of this number, 31 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 · serverErrorFinder.readLuaError (cognitive 40) · ×1
  • serverErrorFinder.readLuaError (cognitive 40) server/utils/serverErrorFinder.js:699 — serverErrorFinder.readLuaError has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 9, ternaries 3 (7 pts), loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 40) · ×1
  • (anonymous) (cognitive 40) REDACTED:4745 — (anonymous) has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 3, error handling 2 (3 pts), loops 2, ternaries 2 (nesting depth added 14). Most of this is not in the body itself: 14 of the 40 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 4813, 4786, 4835, …). 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 · restoreTrashItem (cognitive 40) · ×1
  • restoreTrashItem (cognitive 40) server/services/fileManagerService.js:1875 — restoreTrashItem has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 8, error handling 2 (4 pts), ternaries 4, loops 2 (nesting depth added 11). Of this number, 36 points are the body's own statements and 4 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 · ChunkCleaner.ChunkCleaner · ×1
  • ChunkCleaner.ChunkCleaner::handleDelete (cognitive 39) client/src/pages/ChunkCleaner.tsx:2213 — ChunkCleaner.ChunkCleaner::handleDelete has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 6, error handling 3 (6 pts), loops 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ChunkCleaner.ChunkCleaner) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ServerSetup.ServerSetup (cognitive 39) · ×1
  • ServerSetup.ServerSetup (cognitive 39) REDACTED:303 — ServerSetup.ServerSetup has cognitive complexity 39 (threshold 15). Drivers by points: if/else 98 (124 pts), boolean chains 99, ternaries 55 (75 pts), error handling 13 (19 pts), loops 1 (2 pts) (nesting depth added 53). 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. This shape REPEATS in the file: 2 other methods here (ServerSetup.ServerSetup::handleQuickSetup, ServerSetup.ServerSetup::stepRequirementMessage) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · workshopModInfo.findMapFoldersFromWorkshop (cognitive 39) · ×1
  • workshopModInfo.findMapFoldersFromWorkshop (cognitive 39) server/services/workshopModInfo.js:144 — workshopModInfo.findMapFoldersFromWorkshop has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (9 pts), error handling 2 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 22). Of this number, 31 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 · fileManagerSftpBackend.createSftpBackend.walk · ×1
  • fileManagerSftpBackend.createSftpBackend.walk::generate (cognitive 39) server/services/fileManagerSftpBackend.js:1883 — fileManagerSftpBackend.createSftpBackend.walk::generate has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 7, loops 2 (3 pts), ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ItemPicker.ItemPicker (cognitive 38) · ×1
  • ItemPicker.ItemPicker (cognitive 38) client/src/components/ItemPicker.tsx:98 — ItemPicker.ItemPicker has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 32, ternaries 20 (29 pts), if/else 17 (22 pts), error handling 2, loops 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ItemPicker.ItemPicker::handleKeyDown) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · init.runMigrations (cognitive 38) · ×1
  • init.runMigrations (cognitive 38) server/database/init.js:281 — init.runMigrations has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 9, loops 4 (8 pts) (nesting depth added 14). Of this number, 36 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelBridge.cleanupInboxFiles (cognitive 38) · ×1
  • PanelBridge.cleanupInboxFiles (cognitive 38) REDACTED:1480 — PanelBridge.cleanupInboxFiles has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 5 (13 pts), boolean chains 5, loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serverFiles.router.get("/browse-files") (cognitive 38) · ×1
  • serverFiles.router.get("/browse-files") (cognitive 38) REDACTED:3185 — serverFiles.router.get("/browse-files") has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 4, ternaries 4, error handling 1, loops 1 (nesting depth added 13). Of this number, 37 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 · refreshLaunchTargetBeforeStart (cognitive 38) · ×1
  • refreshLaunchTargetBeforeStart (cognitive 38) REDACTED:2020 — refreshLaunchTargetBeforeStart has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 15, error handling 2 (3 pts), ternaries 1 (2 pts), other 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GroupSections.GroupSections (cognitive 37) · ×1
  • GroupSections.GroupSections (cognitive 37) client/src/components/mods/GroupSections.tsx:60 — GroupSections.GroupSections has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (10 pts), if/else 5 (9 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 10). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 82, renderGroupHeader, rowKey, …). 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 · panelBridge.router.get("/scan-server/ · ×1
  • panelBridge.router.get("/scan-server/:serverId") (cognitive 37) server/routes/panelBridge.js:919 — panelBridge.router.get("/scan-server/:serverId") has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 11, loops 2 (5 pts), error handling 2, ternaries 1 (nesting depth added 9). Of this number, 25 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileManagerLocalFs.deleteTree (cognitive 37) · ×1
  • fileManagerLocalFs.deleteTree (cognitive 37) server/services/fileManagerLocalFs.js:380 — fileManagerLocalFs.deleteTree has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (23 pts), error handling 3 (8 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 19). Of this number, 30 points are the body's own statements and 7 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 · checkServerStatusNow (cognitive 37) · ×1
  • checkServerStatusNow (cognitive 37) REDACTED:3977 — checkServerStatusNow has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8, ternaries 4 (8 pts), error handling 3 (7 pts), other 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · de-lint.parseGlossaryTables (cognitive 36) · ×1
  • de-lint.parseGlossaryTables (cognitive 36) client/scripts/de-lint.mjs:82 — de-lint.parseGlossaryTables has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecentChanges.RecentChangesBody (cognitive 36) · ×1
  • RecentChanges.RecentChangesBody (cognitive 36) client/src/components/files/RecentChanges.tsx:36 — RecentChanges.RecentChangesBody has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 9 (30 pts), if/else 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 22). Most of this is not in the body itself: 6 of the 36 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 72, 41). 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 · useFixEverything.useFixEverything (cognitive 36) · ×1
  • useFixEverything.useFixEverything (cognitive 36) client/src/components/mods/useFixEverything.tsx:61 — useFixEverything.useFixEverything has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 21, if/else 10 (11 pts), ternaries 3 (4 pts) (nesting depth added 2). Of this number, 23 points are the body's own statements and 13 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TimezonePicker.TimezonePicker (cognitive 36) · ×1
  • TimezonePicker.TimezonePicker (cognitive 36) client/src/components/scheduler/TimezonePicker.tsx:66 — TimezonePicker.TimezonePicker has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 11, ternaries 4 (7 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 9). Most of this is not in the body itself: 7 of the 36 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 99, handleKeyDown, a function literal at line 108, …). 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 · PanelBridge.pollQueueResults (cognitive 36) · ×1
  • PanelBridge.pollQueueResults (cognitive 36) REDACTED:1310 — PanelBridge.pollQueueResults has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (25 pts), error handling 3 (6 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modSmartSort.priorityOrder (cognitive 36) · ×1
  • modSmartSort.priorityOrder (cognitive 36) server/utils/modSmartSort.js:1100 — modSmartSort.priorityOrder has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 8 (11 pts), boolean chains 4, ternaries 1 (nesting depth added 15). Of this number, 17 points are the body's own statements and 19 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/repair-map-entries") (cognitive 36) · ×1
  • mods.router.post("/repair-map-entries") (cognitive 36) REDACTED:3691 — mods.router.post("/repair-map-entries") has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 4 (5 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 9). Most of this is not in the body itself: 10 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 3725). 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 · server.router.post("/stop") (cognitive 36) · ×1
  • server.router.post("/stop") (cognitive 36) REDACTED:2664 — server.router.post("/stop") has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 9, ternaries 5 (9 pts), error handling 1 (nesting depth added 7). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · panelBridge.router.get("/scan-paths") · ×1
  • panelBridge.router.get("/scan-paths")::searchForBridge (cognitive 36) server/routes/panelBridge.js:1389 — panelBridge.router.get("/scan-paths")::searchForBridge has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 3 (9 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uploadPreflight (cognitive 36) · ×1
  • uploadPreflight (cognitive 36) server/services/fileManagerService.js:1493 — uploadPreflight has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 5 (11 pts), loops 4 (7 pts), boolean chains 3, error handling 1 (2 pts), other 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loadHealthExtras (cognitive 36) · ×1
  • loadHealthExtras (cognitive 36) server/services/modSmartContext.js:286 — loadHealthExtras has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 7 (10 pts), boolean chains 9, error handling 1, other 1, ternaries 1 (nesting depth added 11). Of this number, 32 points are the body's own statements and 4 belong to 10 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 · Dashboard.Dashboard · ×1
  • Dashboard.Dashboard::handleAction (cognitive 35) client/src/pages/Dashboard.tsx:1020 — Dashboard.Dashboard::handleAction has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 12, ternaries 4 (5 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (Dashboard.Dashboard) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · problemFixes.buildFixAllPreview (cognitive 35) · ×1
  • problemFixes.buildFixAllPreview (cognitive 35) client/src/components/diagnostics/problemFixes.ts:64 — problemFixes.buildFixAllPreview has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (27 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.put("/presets/ · ×1
  • mods.router.put("/presets/:id") (cognitive 35) REDACTED:5195 — mods.router.put("/presets/:id") has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 2, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loadConfig (cognitive 35) · ×1
  • loadConfig (cognitive 35) server/services/rcon.js:1038 — loadConfig has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 5 (10 pts), boolean chains 6, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolveModNameFromDisk (cognitive 35) · ×1
  • resolveModNameFromDisk (cognitive 35) server/services/modChecker.js:810 — resolveModNameFromDisk has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (18 pts), error handling 3 (8 pts), loops 2 (5 pts), boolean chains 3, other 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · moveEntries (cognitive 35) · ×1
  • moveEntries (cognitive 35) server/services/fileManagerService.js:1002 — moveEntries has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 5 (9 pts), boolean chains 5, error handling 2 (4 pts), loops 2, other 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · deriveState (cognitive 35) · ×1
  • deriveState (cognitive 35) server/services/bridgeDelivery.js:773 — deriveState has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 5, ternaries 4 (5 pts), other 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildSteps (cognitive 35) · ×1
  • buildSteps (cognitive 35) server/services/bridgeDelivery.js:970 — buildSteps has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 4 (9 pts), other 2, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildSecretSet (cognitive 35) · ×1
  • buildSecretSet (cognitive 35) server/services/fileManagerProtectedAreas.js:108 — buildSecretSet has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 3 (6 pts), loops 5 (6 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BridgeChecksumDialog.BridgeChecksumDialog (cognitive 34) · ×1
  • BridgeChecksumDialog.BridgeChecksumDialog (cognitive 34) client/src/components/bridge/BridgeChecksumDialog.tsx:67 — BridgeChecksumDialog.BridgeChecksumDialog has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 16, ternaries 6 (9 pts), if/else 7, error handling 2 (nesting depth added 3). Of this number, 22 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CharacterImportExportDialog.CharacterImportExportDialog (cognitive 34) · ×1
  • CharacterImportExportDialog.CharacterImportExportDialog (cognitive 34) client/src/components/players/CharacterImportExportDialog.tsx:58 — CharacterImportExportDialog.CharacterImportExportDialog has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 16, if/else 8 (9 pts), ternaries 5, error handling 4 (nesting depth added 1). Most of this is not in the body itself: 12 of the 34 points are its own statements and the rest belongs to 13 function items inside it that branch (runCharacterImport, a function literal at line 336, handleExport, …). 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 · serverFiles.router.put("/sandbox") (cognitive 34) · ×1
  • serverFiles.router.put("/sandbox") (cognitive 34) REDACTED:1457 — serverFiles.router.put("/sandbox") has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 6, boolean chains 5, error handling 1, loops 1 (nesting depth added 7). Of this number, 23 points are the body's own statements and 11 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 · mods.router.post("/batch-remove") (cognitive 34) · ×1
  • mods.router.post("/batch-remove") (cognitive 34) REDACTED:3463 — mods.router.post("/batch-remove") has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 3 (7 pts), loops 4 (6 pts), boolean chains 5, ternaries 2 (nesting depth added 10). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · servers.router.post("/detect") (cognitive 34) · ×1
  • servers.router.post("/detect") (cognitive 34) REDACTED:662 — servers.router.post("/detect") has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 9, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 9). Of this number, 33 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 · (anonymous) (cognitive 34) · ×1
  • (anonymous) (cognitive 34) REDACTED:662 — (anonymous) has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 9, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 9). Of this number, 33 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 · applySheet (cognitive 34) · ×1
  • applySheet (cognitive 34) server/services/characterStore.js:223 — applySheet has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 3 (7 pts), boolean chains 6, other 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FixAllDialog.FixAllDialog (cognitive 33) · ×1
  • FixAllDialog.FixAllDialog (cognitive 33) client/src/components/diagnostics/FixAllDialog.tsx:23 — FixAllDialog.FixAllDialog has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 14, ternaries 11 (13 pts), if/else 5, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to 7 function items inside it that branch (apply, runUndo, a function literal at line 101, …). 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 · FileList.FileList · ×1
  • FileList.FileList::handleKeyDown (cognitive 33) client/src/components/files/FileList.tsx:186 — FileList.FileList::handleKeyDown has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 13 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sandboxLua.editSandboxValues (cognitive 33) · ×1
  • sandboxLua.editSandboxValues (cognitive 33) server/utils/sandboxLua.js:506 — sandboxLua.editSandboxValues has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 4 (11 pts), boolean chains 4, loops 3 (nesting depth added 11). Of this number, 31 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 · modContentProfile.readModMediaPaths (cognitive 33) · ×1
  • modContentProfile.readModMediaPaths (cognitive 33) server/utils/modContentProfile.js:233 — modContentProfile.readModMediaPaths has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/batch-toggle-mod-ids") (cognitive 33) · ×1
  • mods.router.post("/batch-toggle-mod-ids") (cognitive 33) REDACTED:2636 — mods.router.post("/batch-toggle-mod-ids") has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 6, ternaries 2 (3 pts), loops 2, error handling 1 (nesting depth added 7). Of this number, 22 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 · server.router.post("/browse-folder") (cognitive 33) · ×1
  • server.router.post("/browse-folder") (cognitive 33) REDACTED:6744 — server.router.post("/browse-folder") has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 12, ternaries 3 (5 pts), error handling 1 (nesting depth added 6). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 6788, 6885, 6802, …). 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 · checkModStatus (cognitive 33) · ×1
  • checkModStatus (cognitive 33) REDACTED:1667 — checkModStatus has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 9, ternaries 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fixesFor (cognitive 33) · ×1
  • fixesFor (cognitive 33) server/utils/serverErrorFinder.js:496 — fixesFor has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 7, ternaries 3 (6 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · stopOtherServer (cognitive 33) · ×1
  • stopOtherServer (cognitive 33) server/services/otherServerLifecycle.js:241 — stopOtherServer has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 9, error handling 4 (5 pts), ternaries 2 (5 pts) (nesting depth added 5). Of this number, 27 points are the body's own statements and 6 belong to 4 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 · extract-pz-sandbox-ground-truth.parseJavapOptionTranslations (cognitive 32) · ×1
  • extract-pz-sandbox-ground-truth.parseJavapOptionTranslations (cognitive 32) client/scripts/extract-pz-sandbox-ground-truth.mjs:106 — extract-pz-sandbox-ground-truth.parseJavapOptionTranslations has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 4, ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FolderBrowser.FolderBrowser (cognitive 32) · ×1
  • FolderBrowser.FolderBrowser (cognitive 32) client/src/components/FolderBrowser.tsx:27 — FolderBrowser.FolderBrowser has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 6 (16 pts), boolean chains 9, if/else 6, error handling 1 (nesting depth added 10). Most of this is not in the body itself: 10 of the 32 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 180, a function literal at line 38, a function literal at line 57, …). 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 · cronSchedule.expandField (cognitive 32) · ×1
  • cronSchedule.expandField (cognitive 32) client/src/lib/cronSchedule.ts:98 — cronSchedule.expandField has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 3 (9 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · permissions.updateRole (cognitive 32) · ×1
  • permissions.updateRole (cognitive 32) server/services/permissions.js:916 — permissions.updateRole has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 8, ternaries 4 (6 pts), loops 1 (2 pts) (nesting depth added 8). None of this is in the body itself: all 32 points belong to one function literal inside it that branches (line 921). 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 · modDefinitionExtractors.extractScriptDefinitionBodies (cognitive 32) · ×1
  • modDefinitionExtractors.extractScriptDefinitionBodies (cognitive 32) server/utils/modDefinitionExtractors.js:365 — modDefinitionExtractors.extractScriptDefinitionBodies has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 4 (9 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/sync-from-server") (cognitive 32) · ×1
  • mods.router.post("/sync-from-server") (cognitive 32) REDACTED:1129 — mods.router.post("/sync-from-server") has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, error handling 3 (5 pts), loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.get("/disk-only") (cognitive 32) · ×1
  • mods.router.get("/disk-only") (cognitive 32) REDACTED:9421 — mods.router.get("/disk-only") has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (6 pts), boolean chains 5, error handling 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.writeStartupScriptsWithBackup (cognitive 32) · ×1
  • server.writeStartupScriptsWithBackup (cognitive 32) REDACTED:1831 — server.writeStartupScriptsWithBackup has cognitive complexity 32 (threshold 15). Drivers by points: error handling 6 (14 pts), if/else 3 (9 pts), loops 2 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scheduler.executeTask (cognitive 32) · ×1
  • Scheduler.executeTask (cognitive 32) server/services/scheduler.js:780 — Scheduler.executeTask has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileManagerJanitor.runFileManagerJanitor (cognitive 32) · ×1
  • fileManagerJanitor.runFileManagerJanitor (cognitive 32) server/services/fileManagerJanitor.js:30 — fileManagerJanitor.runFileManagerJanitor has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 7, error handling 3 (7 pts), loops 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseRequiredItemsFromPage (cognitive 32) · ×1
  • parseRequiredItemsFromPage (cognitive 32) server/services/modSteamKnowledge.js:379 — parseRequiredItemsFromPage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7, ternaries 4 (6 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · findOverwrittenTableOpeners (cognitive 32) · ×1
  • findOverwrittenTableOpeners (cognitive 32) server/utils/sandboxLua.js:747 — findOverwrittenTableOpeners has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 13, loops 5 (9 pts), ternaries 3 (5 pts), error handling 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detectLeftoverNativeLibraries (cognitive 32) · ×1
  • detectLeftoverNativeLibraries (cognitive 32) server/utils/nativeLibraryPaths.js:392 — detectLeftoverNativeLibraries has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 6, loops 3 (4 pts), ternaries 2 (nesting depth added 11). Of this number, 30 points are the body's own statements and 2 belong to 9 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 · api.fetchWithRetry (cognitive 31) · ×1
  • api.fetchWithRetry (cognitive 31) client/src/lib/api.ts:575 — api.fetchWithRetry has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, error handling 2 (4 pts), loops 1, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · demoSmart.demoSmartResponse (cognitive 31) · ×1
  • demoSmart.demoSmartResponse (cognitive 31) client/src/lib/demoSmart.ts:416 — demoSmart.demoSmartResponse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 10, ternaries 4 (8 pts) (nesting depth added 6). 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 · BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog (cognitive 31) · ×1
  • BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog (cognitive 31) client/src/components/bridge/BridgeDeliverySwitchDialog.tsx:58 — BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 31, ternaries 15 (28 pts), if/else 16 (21 pts), error handling 3 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (BridgeDeliverySwitchDialog.BridgeDeliverySwitchDialog::apply) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · server.router.post("/list-directory") (cognitive 31) · ×1
  • server.router.post("/list-directory") (cognitive 31) REDACTED:6624 — server.router.post("/list-directory") has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 4 (10 pts), loops 2 (4 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileManagerRoots.describeLocal (cognitive 31) · ×1
  • fileManagerRoots.describeLocal (cognitive 31) server/services/fileManagerRoots.js:125 — fileManagerRoots.describeLocal has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 5 (9 pts), boolean chains 6, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · waitForRconAfterStart (cognitive 31) · ×1
  • waitForRconAfterStart (cognitive 31) REDACTED:2214 — waitForRconAfterStart has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · streamIntoRemote (cognitive 31) · ×1
  • streamIntoRemote (cognitive 31) server/services/fileManagerSftpBackend.js:498 — streamIntoRemote has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 6, ternaries 4 (5 pts), error handling 1 (nesting depth added 2). None of this is in the body itself: all 31 points belong to 17 function items inside it that branch ((anonymous)::onSinkClose, a function literal at line 499, (anonymous)::fail, …). 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 · statusFromContext (cognitive 31) · ×1
  • statusFromContext (cognitive 31) server/services/bridgeDelivery.js:834 — statusFromContext has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (9 pts), if/else 6, error handling 1 (2 pts), other 2, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · (anonymous) (cognitive 31) · ×1
  • (anonymous) (cognitive 31) REDACTED:576 — (anonymous) has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 8, error handling 1, other 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · describeRoot (cognitive 31) · ×1
  • describeRoot (cognitive 31) server/services/fileManagerLocalBackend.js:356 — describeRoot has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 7 (8 pts), boolean chains 6, error handling 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseModInfoForGame (cognitive 31) · ×1
  • parseModInfoForGame (cognitive 31) server/utils/modLoadOrder.js:105 — parseModInfoForGame has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 2, loops 1, other 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Templates.Templates (cognitive 30) · ×1
  • Templates.Templates (cognitive 30) client/src/pages/Templates.tsx:20 — Templates.Templates has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 9 (15 pts), boolean chains 6, error handling 5, if/else 4 (nesting depth added 6). Most of this is not in the body itself: 14 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (handleDelete, a function literal at line 65, handleRestore, …). 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 · Discord.Discord · ×1
  • Discord.Discord::saveConfig (cognitive 30) client/src/pages/Discord.tsx:640 — Discord.Discord::saveConfig has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 16, if/else 11, error handling 2 (3 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (Discord.Discord) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · autofix.buildAutofixPreview (cognitive 30) · ×1
  • autofix.buildAutofixPreview (cognitive 30) client/src/components/mods/autofix.ts:52 — autofix.buildAutofixPreview has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 5 (8 pts), boolean chains 3 (nesting depth added 14). Of this number, 24 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 · modLoadOrder.stronglyConnectedComponents (cognitive 30) · ×1
  • modLoadOrder.stronglyConnectedComponents (cognitive 30) client/src/lib/modLoadOrder.ts:251 — modLoadOrder.stronglyConnectedComponents has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModChecker.handleModUpdate (cognitive 30) · ×1
  • ModChecker.handleModUpdate (cognitive 30) server/services/modChecker.js:1153 — ModChecker.handleModUpdate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (24 pts), error handling 3 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · diskSpace.getDiskFreeFallback (cognitive 30) · ×1
  • diskSpace.getDiskFreeFallback (cognitive 30) server/utils/diskSpace.js:39 — diskSpace.getDiskFreeFallback has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 4, error handling 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · mods.router.get("/collection/diff") (cognitive 30) · ×1
  • mods.router.get("/collection/diff") (cognitive 30) REDACTED:1349 — mods.router.get("/collection/diff") has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (9 pts), ternaries 3 (6 pts), error handling 2 (3 pts) (nesting depth added 8). Of this number, 19 points are the body's own statements and 11 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 · serverErrorFinder.buildModIndex (cognitive 30) · ×1
  • serverErrorFinder.buildModIndex (cognitive 30) server/utils/serverErrorFinder.js:351 — serverErrorFinder.buildModIndex has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 3 (6 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debug.buildSandboxOptionsDiagnostics (cognitive 30) · ×1
  • debug.buildSandboxOptionsDiagnostics (cognitive 30) REDACTED:1087 — debug.buildSandboxOptionsDiagnostics has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 10, ternaries 7 (8 pts), loops 1 (nesting depth added 4). 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: 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 · templateSchema.validateTemplate (cognitive 30) · ×1
  • templateSchema.validateTemplate (cognitive 30) server/utils/templateSchema.js:155 — templateSchema.validateTemplate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · templates.router.post("/ · ×1
  • templates.router.post("/:id/apply") (cognitive 30) REDACTED:140 — templates.router.post("/:id/apply") has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3 (9 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · assertNamedStartupScriptLaunchable (cognitive 30) · ×1
  • assertNamedStartupScriptLaunchable (cognitive 30) REDACTED:3889 — assertNamedStartupScriptLaunchable has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 9, ternaries 3 (6 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _sendEventNotification (cognitive 30) · ×1
  • _sendEventNotification (cognitive 30) REDACTED:651 — _sendEventNotification has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 9, ternaries 3 (6 pts) (nesting depth added 7). Of this number, 23 points are the body's own statements and 7 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 · startPlayerMonitoring (cognitive 30) · ×1
  • startPlayerMonitoring (cognitive 30) server/services/modChecker.js:1507 — startPlayerMonitoring has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 2, error handling 2 (nesting depth added 5). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 1558, restartNow, stopThisLoop). 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 · createSftpBackend.list (cognitive 30) · ×1
  • createSftpBackend.list (cognitive 30) server/services/fileManagerSftpBackend.js:1503 — createSftpBackend.list has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (12 pts), boolean chains 10, if/else 5 (7 pts), loops 1 (nesting depth added 7). Most of this is not in the body itself: 11 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 1528, key, byName, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Settings.WorkshopCollectionSyncCard · ×1
  • Settings.WorkshopCollectionSyncCard::runRowAction (cognitive 29) REDACTED:6922 — Settings.WorkshopCollectionSyncCard::runRowAction has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 4 (9 pts), boolean chains 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Settings.WorkshopCollectionSyncCard) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · SpawnBrowser.SpawnBrowser · ×1
  • SpawnBrowser.SpawnBrowser::handleKeyDown (cognitive 29) client/src/components/SpawnBrowser.tsx:273 — SpawnBrowser.SpawnBrowser::handleKeyDown has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 4 (12 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (SpawnBrowser.SpawnBrowser) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · workshopModInfo.shippedByListedItems (cognitive 29) · ×1
  • workshopModInfo.shippedByListedItems (cognitive 29) server/services/workshopModInfo.js:255 — workshopModInfo.shippedByListedItems has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (7 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.walkDir (cognitive 29) · ×1
  • mods.walkDir (cognitive 29) REDACTED:6979 — mods.walkDir has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 2 (4 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OtherServerUpdates.checkAll (cognitive 29) · ×1
  • OtherServerUpdates.checkAll (cognitive 29) server/services/otherServerUpdates.js:139 — OtherServerUpdates.checkAll has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 5 (7 pts), boolean chains 5, error handling 3 (4 pts), loops 3 (nesting depth added 7). Of this number, 27 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 · UpdateChecker.getLatestBuildInfo (cognitive 29) · ×1
  • UpdateChecker.getLatestBuildInfo (cognitive 29) REDACTED:231 — UpdateChecker.getLatestBuildInfo has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 4 (11 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 14). Of this number, 26 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 · servers.router.post("/auto-scan") (cognitive 29) · ×1
  • servers.router.post("/auto-scan") (cognitive 29) REDACTED:538 — servers.router.post("/auto-scan") has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (7 pts), boolean chains 6, error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 9). Of this number, 27 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 · servers.router.post("/ · ×1
  • servers.router.post("/:id/lifecycle-provider") (cognitive 29) REDACTED:1313 — servers.router.post("/:id/lifecycle-provider") has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 2 (6 pts), boolean chains 5, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rcon.router.post("/connect") (cognitive 29) · ×1
  • rcon.router.post("/connect") (cognitive 29) REDACTED:150 — rcon.router.post("/connect") has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 10, error handling 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · serverFinder.router.get("/") (cognitive 29) · ×1
  • serverFinder.router.get("/") (cognitive 29) server/routes/serverFinder.js:634 — serverFinder.router.get("/") has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 4 (8 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 12). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · backup.router.post("/settings") (cognitive 29) · ×1
  • backup.router.post("/settings") (cognitive 29) REDACTED:340 — backup.router.post("/settings") has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 5, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileManagerSftpBackend.createSftpBackend.list (cognitive 29) · ×1
  • fileManagerSftpBackend.createSftpBackend.list (cognitive 29) server/services/fileManagerSftpBackend.js:1503 — fileManagerSftpBackend.createSftpBackend.list has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 10, if/else 5 (7 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 1528, key, a function literal at line 1510, …). 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 · fileManagerRunState.computeRunState (cognitive 29) · ×1
  • fileManagerRunState.computeRunState (cognitive 29) server/services/fileManagerRunState.js:41 — fileManagerRunState.computeRunState has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, ternaries 4 (7 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ensureRconConfigured (cognitive 29) · ×1
  • ensureRconConfigured (cognitive 29) REDACTED:926 — ensureRconConfigured has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 9, error handling 2 (3 pts), ternaries 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 12 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 · validateData (cognitive 29) · ×1
  • validateData (cognitive 29) server/database/init.js:889 — validateData has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts), other 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loadModSmartContext (cognitive 29) · ×1
  • loadModSmartContext (cognitive 29) server/services/modSmartContext.js:119 — loadModSmartContext has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 5, boolean chains 4, ternaries 1 (2 pts), other 1 (nesting depth added 9). Of this number, 28 points are the body's own statements and 1 belongs 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 · PinnedOrderCard.PinnedOrderCard (cognitive 28) · ×1
  • PinnedOrderCard.PinnedOrderCard (cognitive 28) client/src/components/mods/PinnedOrderCard.tsx:36 — PinnedOrderCard.PinnedOrderCard has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, ternaries 6 (12 pts), if/else 3, error handling 1 (nesting depth added 6). Of this number, 16 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CharacterCondition.CharacterCondition (cognitive 28) · ×1
  • CharacterCondition.CharacterCondition (cognitive 28) client/src/components/players/CharacterCondition.tsx:54 — CharacterCondition.CharacterCondition has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 20, if/else 5 (7 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CharacterTab.CharacterTab (cognitive 28) · ×1
  • CharacterTab.CharacterTab (cognitive 28) client/src/components/players/CharacterTab.tsx:70 — CharacterTab.CharacterTab has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 15, if/else 5 (7 pts), ternaries 4 (6 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PanelBridge.getConnectionDiagnostics (cognitive 28) · ×1
  • PanelBridge.getConnectionDiagnostics (cognitive 28) REDACTED:531 — PanelBridge.getConnectionDiagnostics has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (13 pts), error handling 5 (8 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 5). Of this number, 25 points are the body's own statements and 3 belong 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 · scheduler.router.post("/tasks") (cognitive 28) · ×1
  • scheduler.router.post("/tasks") (cognitive 28) REDACTED:355 — scheduler.router.post("/tasks") has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 7, error handling 3, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · serverFiles.router.post("/templates/ · ×1
  • serverFiles.router.post("/templates/:id/apply") (cognitive 28) REDACTED:2779 — serverFiles.router.post("/templates/:id/apply") has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, ternaries 3 (5 pts), error handling 1 (nesting depth added 7). Of this number, 20 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 · mods.router.post("/refresh-names") (cognitive 28) · ×1
  • mods.router.post("/refresh-names") (cognitive 28) REDACTED:518 — mods.router.post("/refresh-names") has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), boolean chains 5, error handling 2 (4 pts), ternaries 1 (nesting depth added 11). Of this number, 26 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 · mods.classifyFile (cognitive 28) · ×1
  • mods.classifyFile (cognitive 28) REDACTED:7039 — mods.classifyFile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debug.buildStartScriptCheck (cognitive 28) · ×1
  • debug.buildStartScriptCheck (cognitive 28) REDACTED:5853 — debug.buildStartScriptCheck has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 6 (10 pts), boolean chains 6, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scheduler._relaunchWaitingOutSteamOperation (cognitive 28) · ×1
  • Scheduler._relaunchWaitingOutSteamOperation (cognitive 28) server/services/scheduler.js:3097 — Scheduler._relaunchWaitingOutSteamOperation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 13). Of this number, 25 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · players.router.post("/access-level") (cognitive 28) · ×1
  • players.router.post("/access-level") (cognitive 28) REDACTED:385 — players.router.post("/access-level") has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 11, error handling 2 (3 pts) (nesting depth added 4). Of this number, 27 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 · players.router.post("/teleport") (cognitive 28) · ×1
  • players.router.post("/teleport") (cognitive 28) REDACTED:576 — players.router.post("/teleport") has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 6, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · backup.router.post("/upload") (cognitive 28) · ×1
  • backup.router.post("/upload") (cognitive 28) REDACTED:856 — backup.router.post("/upload") has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4, ternaries 2 (3 pts), error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · errorMessage.getUserErrorMessage (cognitive 27) · ×1
  • errorMessage.getUserErrorMessage (cognitive 27) client/src/lib/errorMessage.ts:179 — errorMessage.getUserErrorMessage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 5 (9 pts), boolean chains 5 (nesting depth added 8). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinuxServiceLifecycle.inspect (cognitive 27) · ×1
  • LinuxServiceLifecycle.inspect (cognitive 27) server/services/linuxServiceLifecycle.js:416 — LinuxServiceLifecycle.inspect has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 10, error handling 1 (2 pts), if/else 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serverFiles.getActiveServerPaths (cognitive 27) · ×1
  • serverFiles.getActiveServerPaths (cognitive 27) REDACTED:580 — serverFiles.getActiveServerPaths has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serverFiles.router.put("/ini") (cognitive 27) · ×1
  • serverFiles.router.put("/ini") (cognitive 27) REDACTED:1256 — serverFiles.router.put("/ini") has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 9, ternaries 4, loops 2, error handling 1 (nesting depth added 3). Of this number, 19 points are the body's own statements and 8 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 · server.router.post("/steamcmd/download") (cognitive 27) · ×1
  • server.router.post("/steamcmd/download") (cognitive 27) REDACTED:5857 — server.router.post("/steamcmd/download") has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 4 (7 pts), boolean chains 4, ternaries 1 (nesting depth added 7). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 6021, 5984, 6065). 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 · fileManagerSftpBackend.createSftpBackend.resolve (cognitive 27) · ×1
  • fileManagerSftpBackend.createSftpBackend.resolve (cognitive 27) server/services/fileManagerSftpBackend.js:1396 — fileManagerSftpBackend.createSftpBackend.resolve has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, ternaries 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.autoStartOtherServers (cognitive 27) · ×1
  • index.autoStartOtherServers (cognitive 27) REDACTED:4436 — index.autoStartOtherServers has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 2 (6 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · findPanelBridgePath (cognitive 27) · ×1
  • findPanelBridgePath (cognitive 27) REDACTED:1506 — findPanelBridgePath has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 4 (5 pts), boolean chains 2, error handling 1, ternaries 1 (nesting depth added 7). Of this number, 25 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getServerProcessDetails (cognitive 27) · ×1
  • getServerProcessDetails (cognitive 27) REDACTED:1615 — getServerProcessDetails has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 7 (9 pts), boolean chains 4, error handling 1 (2 pts), loops 1, other 1 (nesting depth added 5). Of this number, 23 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.
D2 · Cognitive Complexity · ChunkCleaner.decomposeIntoRectangles (cognitive 26) · ×1
  • ChunkCleaner.decomposeIntoRectangles (cognitive 26) client/src/pages/ChunkCleaner.tsx:208 — ChunkCleaner.decomposeIntoRectangles has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 6 (8 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SmartSortPreview.SmartSortPreview (cognitive 26) · ×1
  • SmartSortPreview.SmartSortPreview (cognitive 26) client/src/components/mods/SmartSortPreview.tsx:37 — SmartSortPreview.SmartSortPreview has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (7 pts), ternaries 4, loops 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 13 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · cronSchedule.nextCronRuns (cognitive 26) · ×1
  • cronSchedule.nextCronRuns (cognitive 26) client/src/lib/cronSchedule.ts:151 — cronSchedule.nextCronRuns has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServerManager._scanWindowsServerProcesses (cognitive 26) · ×1
  • ServerManager._scanWindowsServerProcesses (cognitive 26) REDACTED:1983 — ServerManager._scanWindowsServerProcesses has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (9 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modSteamKnowledge.runDetails (cognitive 26) · ×1
  • modSteamKnowledge.runDetails (cognitive 26) server/services/modSteamKnowledge.js:881 — modSteamKnowledge.runDetails has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (modSteamKnowledge.runRequiresApi) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · modSteamKnowledge.runRequiresApi (cognitive 26) · ×1
  • modSteamKnowledge.runRequiresApi (cognitive 26) server/services/modSteamKnowledge.js:946 — modSteamKnowledge.runRequiresApi has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (modSteamKnowledge.runDetails) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · cronNextRun.computeNextRun (cognitive 26) · ×1
  • cronNextRun.computeNextRun (cognitive 26) server/utils/cronNextRun.js:86 — cronNextRun.computeNextRun has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServerPlayersWatch.lookAt (cognitive 26) · ×1
  • ServerPlayersWatch.lookAt (cognitive 26) server/services/serverPlayersWatch.js:117 — ServerPlayersWatch.lookAt has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 4 (9 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelUpdateChecker.cleanupOldHelperArtifacts (cognitive 26) · ×1
  • PanelUpdateChecker.cleanupOldHelperArtifacts (cognitive 26) server/services/panelUpdateChecker.js:3274 — PanelUpdateChecker.cleanupOldHelperArtifacts has cognitive complexity 26 (threshold 15). Drivers by points: error handling 9 (16 pts), loops 4 (6 pts), boolean chains 3, if/else 1 (nesting depth added 9). Of this number, 18 points are the body's own statements and 8 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 · mountDiscovery.classifyCandidate (cognitive 26) · ×1
  • mountDiscovery.classifyCandidate (cognitive 26) server/services/mountDiscovery.js:307 — mountDiscovery.classifyCandidate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · docker.router.post("/containers/ · ×1
  • docker.router.post("/containers/:id/:action") (cognitive 26) server/routes/docker.js:82 — docker.router.post("/containers/:id/:action") has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 8, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · parseConvertToCsvRecord (cognitive 26) · ×1
  • parseConvertToCsvRecord (cognitive 26) REDACTED:732 — parseConvertToCsvRecord has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (4 pts), ternaries 1 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · updateConfig (cognitive 26) · ×1
  • updateConfig (cognitive 26) REDACTED:754 — updateConfig has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 19, error handling 2 (4 pts), if/else 3 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · createSftpBackend.resolve (cognitive 26) · ×1
  • createSftpBackend.resolve (cognitive 26) server/services/fileManagerSftpBackend.js:1396 — createSftpBackend.resolve has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, ternaries 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frameSuffixStart (cognitive 26) · ×1
  • frameSuffixStart (cognitive 26) server/utils/serverErrorFinder.js:249 — frameSuffixStart has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 9, loops 5 (9 pts), if/else 4 (6 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readBodyCapped (cognitive 26) · ×1
  • readBodyCapped (cognitive 26) server/services/modSteamKnowledge.js:777 — readBodyCapped has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 3 (8 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bridgeDisk.listItemServerLua (cognitive 25) · ×1
  • bridgeDisk.listItemServerLua (cognitive 25) server/services/bridgeDisk.js:453 — bridgeDisk.listItemServerLua has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 5 (8 pts), boolean chains 1 (nesting depth added 13). Of this number, 18 points are the body's own statements and 7 belong to one function item 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 · serverFiles.toSpawnPoints (cognitive 25) · ×1
  • serverFiles.toSpawnPoints (cognitive 25) REDACTED:1055 — serverFiles.toSpawnPoints has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modOrderRules.findOrderRuleCycle (cognitive 25) · ×1
  • modOrderRules.findOrderRuleCycle (cognitive 25) server/utils/modOrderRules.js:99 — modOrderRules.findOrderRuleCycle has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 5 (6 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 22 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modLoadOrder.computeEffectiveModOrder (cognitive 25) · ×1
  • modLoadOrder.computeEffectiveModOrder (cognitive 25) server/utils/modLoadOrder.js:285 — modLoadOrder.computeEffectiveModOrder has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (32 pts), ternaries 3 (8 pts), boolean chains 7, loops 5 (6 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (modLoadOrder.computeEffectiveModOrder::loadModAndRequired) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · mods.router.get("/conflicts/stream") (cognitive 25) · ×1
  • mods.router.get("/conflicts/stream") (cognitive 25) REDACTED:8828 — mods.router.get("/conflicts/stream") has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 5, error handling 4 (nesting depth added 1). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (send, a function literal at line 8866, a function literal at line 8964, …). 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 · server.router.post("/delete-files") (cognitive 25) · ×1
  • server.router.post("/delete-files") (cognitive 25) REDACTED:6401 — server.router.post("/delete-files") has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 8, error handling 1, loops 1 (nesting depth added 2). Of this number, 22 points are the body's own statements and 3 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.
D2 · Cognitive Complexity · DiscordBot._sendToChannel (cognitive 25) · ×1
  • DiscordBot._sendToChannel (cognitive 25) REDACTED:1959 — DiscordBot._sendToChannel has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (7 pts), boolean chains 5, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelUpdateChecker.downloadFile (cognitive 25) · ×1
  • PanelUpdateChecker.downloadFile (cognitive 25) server/services/panelUpdateChecker.js:1738 — PanelUpdateChecker.downloadFile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 25 points belong to 7 function literals inside it that branch (lines 1815, 1747, 1869, …). 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 · fileManagerRoots.describeRemote (cognitive 25) · ×1
  • fileManagerRoots.describeRemote (cognitive 25) server/services/fileManagerRoots.js:189 — fileManagerRoots.describeRemote has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 6, if/else 4 (6 pts), error handling 2 (3 pts), loops 1 (2 pts) (nesting depth added 7). Of this number, 17 points are the body's own statements and 8 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 · computeCharacterHints (cognitive 25) · ×1
  • computeCharacterHints (cognitive 25) server/services/characterHints.js:510 — computeCharacterHints has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 6 (9 pts), boolean chains 4, loops 1, other 1 (nesting depth added 6). Of this number, 17 points are the body's own statements and 8 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 · createBoxMatcher (cognitive 25) · ×1
  • createBoxMatcher (cognitive 25) server/utils/vehiclesDb.js:164 — createBoxMatcher has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (9 pts), boolean chains 2 (nesting depth added 11). Of this number, 13 points are the body's own statements and 12 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 · smartText.useSmartText (cognitive 24) · ×1
  • smartText.useSmartText (cognitive 24) client/src/components/mods/smartText.ts:31 — smartText.useSmartText has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 15 (19 pts), if/else 3, match/switch 2 (nesting depth added 4). None of this is in the body itself: all 24 points belong to 6 function literals inside it that branch (lines 40, 74, 91, …). 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 · serverFiles.router.put("/raw/ · ×1
  • serverFiles.router.put("/raw/:type") (cognitive 24) REDACTED:2189 — serverFiles.router.put("/raw/:type") has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 4 (6 pts), boolean chains 3, error handling 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 10 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 · mapProxy.resolveB42Map (cognitive 24) · ×1
  • mapProxy.resolveB42Map (cognitive 24) REDACTED:814 — mapProxy.resolveB42Map has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 10, error handling 2, loops 1 (nesting depth added 2). Of this number, 19 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · modContentProfile.collectFiles (cognitive 24) · ×1
  • modContentProfile.collectFiles (cognitive 24) server/utils/modContentProfile.js:196 — modContentProfile.collectFiles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/add-to-ini") (cognitive 24) · ×1
  • mods.router.post("/add-to-ini") (cognitive 24) REDACTED:2791 — mods.router.post("/add-to-ini") has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (10 pts), if/else 8, boolean chains 5, error handling 1 (nesting depth added 1). 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, 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 · debug.collectSandboxModMetadata (cognitive 24) · ×1
  • debug.collectSandboxModMetadata (cognitive 24) REDACTED:1027 — debug.collectSandboxModMetadata has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 10). Of this number, 18 points are the body's own statements and 6 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 · ServerWatch.restartAfterCrash (cognitive 24) · ×1
  • ServerWatch.restartAfterCrash (cognitive 24) server/services/serverWatch.js:230 — ServerWatch.restartAfterCrash has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscordBot.handleLeaderboard (cognitive 24) · ×1
  • DiscordBot.handleLeaderboard (cognitive 24) REDACTED:1485 — DiscordBot.handleLeaderboard has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (8 pts), loops 1 (2 pts), error handling 1, ternaries 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 10 belong to 8 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · characterHints.parsePanelLogs (cognitive 24) · ×1
  • characterHints.parsePanelLogs (cognitive 24) server/services/characterHints.js:191 — characterHints.parsePanelLogs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getServerStatus (cognitive 24) · ×1
  • getServerStatus (cognitive 24) REDACTED:3734 — getServerStatus has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 3 (8 pts), boolean chains 4, ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 24) · ×1
  • (anonymous) (cognitive 24) REDACTED:2189 — (anonymous) has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 4 (6 pts), boolean chains 3, error handling 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 10 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 · getDatabaseStatsSync (cognitive 24) · ×1
  • getDatabaseStatsSync (cognitive 24) server/database/init.js:1306 — getDatabaseStatsSync has cognitive complexity 24 (threshold 15). Drivers by points: other 18, boolean chains 3, error handling 2, ternaries 1. Of this number, 22 points are the body's own statements and 2 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 · setupFileWatcher (cognitive 24) · ×1
  • setupFileWatcher (cognitive 24) REDACTED:759 — setupFileWatcher has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 4 (5 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 784, 799, 812, …). 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 · handleGameChat (cognitive 24) · ×1
  • handleGameChat (cognitive 24) REDACTED:493 — handleGameChat has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 11 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · updatePlayerPresence (cognitive 24) · ×1
  • updatePlayerPresence (cognitive 24) REDACTED:2153 — updatePlayerPresence has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (8 pts), boolean chains 3, error handling 1 (nesting depth added 9). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 2157). 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 · init (cognitive 24) · ×1
  • init (cognitive 24) server/services/modChecker.js:497 — init has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 1, error handling 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 4 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 · receiveUpload (cognitive 24) · ×1
  • receiveUpload (cognitive 24) server/services/fileManagerLocalBackend.js:1017 — receiveUpload has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 4 (7 pts), ternaries 2 (3 pts), boolean chains 2, other 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 1030, (anonymous)::refuse). 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 · Chat.Chat (cognitive 23) · ×1
  • Chat.Chat (cognitive 23) client/src/pages/Chat.tsx:86 — Chat.Chat has cognitive complexity 23 (threshold 15). Drivers by points: if/else 44 (50 pts), ternaries 27 (42 pts), boolean chains 24, error handling 3, match/switch 1 (nesting depth added 21). 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. This shape REPEATS in the file: one other method here (Chat.Chat::sendMessage) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · demo.getDemoFilesResponse (cognitive 23) · ×1
  • demo.getDemoFilesResponse (cognitive 23) client/src/lib/demo.ts:1455 — demo.getDemoFilesResponse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 4 (7 pts), boolean chains 4 (nesting depth added 4). 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, 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.AppContent (cognitive 23) · ×1
  • App.AppContent (cognitive 23) client/src/App.tsx:254 — App.AppContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, boolean chains 6, ternaries 1. Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 284, 381, 348, …). 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 · MoveDialog.MoveDialog (cognitive 23) · ×1
  • MoveDialog.MoveDialog (cognitive 23) client/src/components/files/MoveDialog.tsx:43 — MoveDialog.MoveDialog has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), ternaries 3 (4 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 60, submit, a function literal at line 104, …). 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 · UploadQueue.UploadQueue (cognitive 23) · ×1
  • UploadQueue.UploadQueue (cognitive 23) client/src/components/files/UploadQueue.tsx:44 — UploadQueue.UploadQueue has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (15 pts), boolean chains 6, if/else 1, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 82, statusText, a function literal at line 48). 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 · autofix.runAutofix (cognitive 23) · ×1
  • autofix.runAutofix (cognitive 23) client/src/components/mods/autofix.ts:180 — autofix.runAutofix has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CharacterSummary.CharacterSummary (cognitive 23) · ×1
  • CharacterSummary.CharacterSummary (cognitive 23) client/src/components/players/CharacterSummary.tsx:21 — CharacterSummary.CharacterSummary has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 21, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · modGroups.validateGroupFields (cognitive 23) · ×1
  • modGroups.validateGroupFields (cognitive 23) server/utils/modGroups.js:386 — modGroups.validateGroupFields has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 4, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · zomboidPaths.inspectZomboidPath (cognitive 23) · ×1
  • zomboidPaths.inspectZomboidPath (cognitive 23) server/utils/zomboidPaths.js:264 — zomboidPaths.inspectZomboidPath has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServerManager.restartServer (cognitive 23) · ×1
  • ServerManager.restartServer (cognitive 23) REDACTED:3555 — ServerManager.restartServer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, error handling 4, loops 1 (nesting depth added 3). Of this number, 22 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 · sandboxLua.findOverwrittenTableOpeners · ×1
  • sandboxLua.findOverwrittenTableOpeners::indentPastCommentsOf (cognitive 23) server/utils/sandboxLua.js:776 — sandboxLua.findOverwrittenTableOpeners::indentPastCommentsOf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chunks.router.post("/save-path") (cognitive 23) · ×1
  • chunks.router.post("/save-path") (cognitive 23) REDACTED:1003 — chunks.router.post("/save-path") has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, error handling 2, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · bridgeDisk.listLooseBridgeFiles (cognitive 23) · ×1
  • bridgeDisk.listLooseBridgeFiles (cognitive 23) server/services/bridgeDisk.js:131 — bridgeDisk.listLooseBridgeFiles has cognitive complexity 23 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · modDefinitionExtractors.extractLuaGlobals (cognitive 23) · ×1
  • modDefinitionExtractors.extractLuaGlobals (cognitive 23) server/utils/modDefinitionExtractors.js:470 — modDefinitionExtractors.extractLuaGlobals has cognitive complexity 23 (threshold 15). Drivers by points: loops 10 (12 pts), if/else 5 (9 pts), boolean chains 1, error handling 1 (nesting depth added 6). Of this number, 21 points are the body's own statements and 2 belong to one function item 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 · debug.router.get("/crash-logs") (cognitive 23) · ×1
  • debug.router.get("/crash-logs") (cognitive 23) REDACTED:6994 — debug.router.get("/crash-logs") has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 4 (8 pts), boolean chains 2, loops 1 (nesting depth added 11). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 7028, 7067). 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 · BackupService.updateSettings (cognitive 23) · ×1
  • BackupService.updateSettings (cognitive 23) server/services/backupService.js:877 — BackupService.updateSettings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 10 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oidc.router.post("/test-connection") (cognitive 23) · ×1
  • oidc.router.post("/test-connection") (cognitive 23) REDACTED:672 — oidc.router.post("/test-connection") has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 6 (7 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · servers.scanForPzPaths · ×1
  • servers.scanForPzPaths::scan (cognitive 23) REDACTED:415 — servers.scanForPzPaths::scan has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, error handling 2 (3 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileManagerSftpBackend.createSftpBackend.followLink (cognitive 23) · ×1
  • fileManagerSftpBackend.createSftpBackend.followLink (cognitive 23) server/services/fileManagerSftpBackend.js:942 — fileManagerSftpBackend.createSftpBackend.followLink has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, ternaries 2, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.autoExportPlayer (cognitive 23) · ×1
  • index.autoExportPlayer (cognitive 23) REDACTED:3321 — index.autoExportPlayer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (6 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 6 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 · monitorGracefulStop (cognitive 23) · ×1
  • monitorGracefulStop (cognitive 23) REDACTED:2898 — monitorGracefulStop has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 5 (8 pts), boolean chains 5 (nesting depth added 4). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 6 function items inside it that branch (poll, escalateToForceStop, announceStopped, …). 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 · getStatus (cognitive 23) · ×1
  • getStatus (cognitive 23) server/services/modChecker.js:2494 — getStatus has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, ternaries 7, error handling 2 (3 pts), if/else 3, other 1 (nesting depth added 1). Of this number, 16 points are the body's own statements and 7 belong to 10 function items 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 · createSftpBackend.followLink (cognitive 23) · ×1
  • createSftpBackend.followLink (cognitive 23) server/services/fileManagerSftpBackend.js:942 — createSftpBackend.followLink has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, ternaries 2, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · copyFile (cognitive 23) · ×1
  • copyFile (cognitive 23) server/services/fileManagerLocalBackend.js:1166 — copyFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 4 (7 pts), ternaries 1 (3 pts), boolean chains 2, other 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 1184). 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 · ConnectionStatus.ConnectionStatus (cognitive 22) · ×1
  • ConnectionStatus.ConnectionStatus (cognitive 22) client/src/components/ConnectionStatus.tsx:15 — ConnectionStatus.ConnectionStatus has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 7, ternaries 3 (4 pts) (nesting depth added 1). Of this number, 13 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · api.runRefresh (cognitive 22) · ×1
  • api.runRefresh (cognitive 22) client/src/lib/api.ts:206 — api.runRefresh has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AuthContext.AuthProvider (cognitive 22) · ×1
  • AuthContext.AuthProvider (cognitive 22) client/src/contexts/AuthContext.tsx:120 — AuthContext.AuthProvider has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 4, boolean chains 3, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 22 points belong to 9 function literals inside it that branch (lines 138, 309, 248, …). 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 · ServerConfig.ServerConfig · ×1
  • ServerConfig.ServerConfig::loadData (cognitive 22) client/src/pages/ServerConfig.tsx:1484 — ServerConfig.ServerConfig::loadData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 4 (5 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (ServerConfig.ServerConfig) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Chat.Chat · ×1
  • Chat.Chat::sendMessage (cognitive 22) client/src/pages/Chat.tsx:313 — Chat.Chat::sendMessage has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 7 (8 pts), boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Chat.Chat) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · NameDialog.NameDialog (cognitive 22) · ×1
  • NameDialog.NameDialog (cognitive 22) client/src/components/files/NameDialog.tsx:44 — NameDialog.NameDialog has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts), ternaries 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (submit, a function literal at line 98, a function literal at line 101, …). 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 · useOrderRules.useOrderRules (cognitive 22) · ×1
  • useOrderRules.useOrderRules (cognitive 22) client/src/components/mods/useOrderRules.ts:27 — useOrderRules.useOrderRules has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (5 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 6). None of this is in the body itself: all 22 points belong to 5 function literals inside it that branch (lines 71, 39, 41, …). 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 · WhyHerePopover.WhyHereBody (cognitive 22) · ×1
  • WhyHerePopover.WhyHereBody (cognitive 22) client/src/components/mods/WhyHerePopover.tsx:102 — WhyHerePopover.WhyHereBody has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, ternaries 5 (7 pts) (nesting depth added 2). Of this number, 21 points are the body's own statements and 1 belongs 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.
D2 · Cognitive Complexity · characterInventory.aggregateRows (cognitive 22) · ×1
  • characterInventory.aggregateRows (cognitive 22) client/src/lib/characterInventory.ts:97 — characterInventory.aggregateRows has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · processScanRetry.waitForProcessExit (cognitive 22) · ×1
  • processScanRetry.waitForProcessExit (cognitive 22) server/utils/processScanRetry.js:120 — processScanRetry.waitForProcessExit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 7). Of this number, 16 points are the body's own statements and 6 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 · sandboxLua.readShortString (cognitive 22) · ×1
  • sandboxLua.readShortString (cognitive 22) server/utils/sandboxLua.js:113 — sandboxLua.readShortString has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bridgeWorkshopRelease.computeRelease (cognitive 22) · ×1
  • bridgeWorkshopRelease.computeRelease (cognitive 22) server/services/bridgeWorkshopRelease.js:94 — bridgeWorkshopRelease.computeRelease has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vehiclesDb.deleteVehiclesInBoxes (cognitive 22) · ×1
  • vehiclesDb.deleteVehiclesInBoxes (cognitive 22) server/utils/vehiclesDb.js:311 — vehiclesDb.deleteVehiclesInBoxes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 5 (7 pts), boolean chains 2, loops 2 (nesting depth added 4). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 336). 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 · serverFiles.createSandboxVars (cognitive 22) · ×1
  • serverFiles.createSandboxVars (cognitive 22) REDACTED:965 — serverFiles.createSandboxVars has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 10). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/toggle-mod-id") (cognitive 22) · ×1
  • mods.router.post("/toggle-mod-id") (cognitive 22) REDACTED:2490 — mods.router.post("/toggle-mod-id") has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 8 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 · mods.router.post("/purge") (cognitive 22) · ×1
  • mods.router.post("/purge") (cognitive 22) REDACTED:9790 — mods.router.post("/purge") has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 6, error handling 5 (6 pts), if/else 5 (6 pts), ternaries 3 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ServerWatch.tick (cognitive 22) · ×1
  • ServerWatch.tick (cognitive 22) server/services/serverWatch.js:144 — ServerWatch.tick has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, ternaries 3, loops 2, error handling 1 (nesting depth added 5). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · discovery.router.post("/create-from-discovery") (cognitive 22) · ×1
  • discovery.router.post("/create-from-discovery") (cognitive 22) server/routes/discovery.js:80 — discovery.router.post("/create-from-discovery") has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, error handling 1, ternaries 1 (nesting depth added 1). 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, 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 · characterStore.computeSkillDelta (cognitive 22) · ×1
  • characterStore.computeSkillDelta (cognitive 22) server/services/characterStore.js:152 — characterStore.computeSkillDelta has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 22) · ×1
  • (anonymous) (cognitive 22) REDACTED:2490 — (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 8 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 · _ensureSpaceForRestore (cognitive 22) · ×1
  • _ensureSpaceForRestore (cognitive 22) server/services/backupService.js:1610 — _ensureSpaceForRestore has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 2 (3 pts), error handling 2, other 2 (nesting depth added 4). Of this number, 19 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 · createSftpBackend.describeRoot (cognitive 22) · ×1
  • createSftpBackend.describeRoot (cognitive 22) server/services/fileManagerSftpBackend.js:1335 — createSftpBackend.describeRoot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 4, boolean chains 3, error handling 3 (nesting depth added 4). Of this number, 20 points are the body's own statements and 2 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 · parseFrameLine (cognitive 22) · ×1
  • parseFrameLine (cognitive 22) server/utils/serverErrorFinder.js:209 — parseFrameLine has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 2 (3 pts), other 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · collectModsFromFolder (cognitive 22) · ×1
  • collectModsFromFolder (cognitive 22) server/services/workshopModInfo.js:457 — collectModsFromFolder has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), ternaries 1 (4 pts), boolean chains 2, error handling 1 (2 pts), other 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skillJump (cognitive 22) · ×1
  • skillJump (cognitive 22) server/services/characterHints.js:316 — skillJump has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (2 pts), other 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 2 belong to 10 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 · BackupRestartOverlapNotice.BackupRestartOverlapNotice (cognitive 21) · ×1
  • BackupRestartOverlapNotice.BackupRestartOverlapNotice (cognitive 21) client/src/components/BackupRestartOverlapNotice.tsx:38 — BackupRestartOverlapNotice.BackupRestartOverlapNotice has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 7, if/else 3 (nesting depth added 2). Of this number, 12 points are the body's own statements and 9 belong 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.
D2 · Cognitive Complexity · FileDiffViewer.TextDiffView (cognitive 21) · ×1
  • FileDiffViewer.TextDiffView (cognitive 21) client/src/components/FileDiffViewer.tsx:307 — FileDiffViewer.TextDiffView has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 7 (nesting depth added 3). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 339, 332). 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 · AddToGroupDialog.AddToGroupDialog (cognitive 21) · ×1
  • AddToGroupDialog.AddToGroupDialog (cognitive 21) client/src/components/mods/AddToGroupDialog.tsx:37 — AddToGroupDialog.AddToGroupDialog has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (15 pts), boolean chains 4, error handling 1, if/else 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 89, a function literal at line 61, a function literal at line 44, …). 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 · cronSchedule.parseSimpleCron (cognitive 21) · ×1
  • cronSchedule.parseSimpleCron (cognitive 21) client/src/lib/cronSchedule.ts:62 — cronSchedule.parseSimpleCron has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · no-raw-error-message.isFeedingUserVisibleSink (cognitive 21) · ×1
  • no-raw-error-message.isFeedingUserVisibleSink (cognitive 21) eslint-rules/no-raw-error-message.js:195 — no-raw-error-message.isFeedingUserVisibleSink has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 6, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modGroups.applyModGroups (cognitive 21) · ×1
  • modGroups.applyModGroups (cognitive 21) server/utils/modGroups.js:272 — modGroups.applyModGroups has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 3 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serverPortPlan.suggestFreePorts (cognitive 21) · ×1
  • serverPortPlan.suggestFreePorts (cognitive 21) server/services/serverPortPlan.js:170 — serverPortPlan.suggestFreePorts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 9). Of this number, 20 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 · serverStatusModel.buildHostSignal (cognitive 21) · ×1
  • serverStatusModel.buildHostSignal (cognitive 21) server/utils/serverStatusModel.js:150 — serverStatusModel.buildHostSignal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (8 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelBridge.cleanupOutboxFiles (cognitive 21) · ×1
  • PanelBridge.cleanupOutboxFiles (cognitive 21) REDACTED:1552 — PanelBridge.cleanupOutboxFiles has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (7 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cronValidation.expandCronField (cognitive 21) · ×1
  • cronValidation.expandCronField (cognitive 21) server/utils/cronValidation.js:82 — cronValidation.expandCronField has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · iniSecretLines.reconcileMaskedIniLines (cognitive 21) · ×1
  • iniSecretLines.reconcileMaskedIniLines (cognitive 21) server/utils/iniSecretLines.js:90 — iniSecretLines.reconcileMaskedIniLines has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 2 (nesting depth added 6). Of this number, 17 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 · iniSecretLines.keepLiveSecretIniLines (cognitive 21) · ×1
  • iniSecretLines.keepLiveSecretIniLines (cognitive 21) server/utils/iniSecretLines.js:166 — iniSecretLines.keepLiveSecretIniLines has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3, ternaries 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oidc.testOidcDiscovery (cognitive 21) · ×1
  • oidc.testOidcDiscovery (cognitive 21) server/services/oidc.js:342 — oidc.testOidcDiscovery has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 3, ternaries 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workshopCollectionSync.fetchPublishedFileTitles (cognitive 21) · ×1
  • workshopCollectionSync.fetchPublishedFileTitles (cognitive 21) server/services/workshopCollectionSync.js:107 — workshopCollectionSync.fetchPublishedFileTitles has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (7 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modDefinitionExtractors.extractClothingOutfits (cognitive 21) · ×1
  • modDefinitionExtractors.extractClothingOutfits (cognitive 21) server/utils/modDefinitionExtractors.js:418 — modDefinitionExtractors.extractClothingOutfits has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modSteamKnowledge.parseModIdOrderFromDescription (cognitive 21) · ×1
  • modSteamKnowledge.parseModIdOrderFromDescription (cognitive 21) server/services/modSteamKnowledge.js:443 — modSteamKnowledge.parseModIdOrderFromDescription has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/resolve-missing-deps") · ×1
  • mods.router.post("/resolve-missing-deps")::buildLocalModIndex (cognitive 21) REDACTED:4669 — mods.router.post("/resolve-missing-deps")::buildLocalModIndex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), error handling 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.compareDefinitionSets (cognitive 21) · ×1
  • mods.compareDefinitionSets (cognitive 21) REDACTED:7141 — mods.compareDefinitionSets has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.deleteModFromDiskAndIni (cognitive 21) · ×1
  • mods.deleteModFromDiskAndIni (cognitive 21) REDACTED:9605 — mods.deleteModFromDiskAndIni has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 4, error handling 1 (3 pts), loops 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 7 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 · debug.router.post("/clear-stale-locks") · ×1
  • debug.router.post("/clear-stale-locks")::walk (cognitive 21) REDACTED:6848 — debug.router.post("/clear-stale-locks")::walk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, error handling 1 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (debug.router.post("/clear-stale-locks")) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · server.parseSteamBranches (cognitive 21) · ×1
  • server.parseSteamBranches (cognitive 21) REDACTED:3688 — server.parseSteamBranches has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (5 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · backupRestartOverlap.firstOverlap (cognitive 21) · ×1
  • backupRestartOverlap.firstOverlap (cognitive 21) server/utils/backupRestartOverlap.js:97 — backupRestartOverlap.firstOverlap has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpdateChecker.checkForUpdates (cognitive 21) · ×1
  • UpdateChecker.checkForUpdates (cognitive 21) REDACTED:439 — UpdateChecker.checkForUpdates has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PanelUpdateChecker._readSupervisorApplyLog (cognitive 21) · ×1
  • PanelUpdateChecker._readSupervisorApplyLog (cognitive 21) server/services/panelUpdateChecker.js:3171 — PanelUpdateChecker._readSupervisorApplyLog has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 3, boolean chains 1 (nesting depth added 7). Of this number, 19 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 · LogTailer.processChatLogData (cognitive 21) · ×1
  • LogTailer.processChatLogData (cognitive 21) server/services/logTailer.js:642 — LogTailer.processChatLogData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · panelBridge.router.post("/character/import") (cognitive 21) · ×1
  • panelBridge.router.post("/character/import") (cognitive 21) server/routes/panelBridge.js:3911 — panelBridge.router.post("/character/import") has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8, boolean chains 5, error handling 4, ternaries 2 (3 pts), loops 1 (nesting depth added 1). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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 · fileManagerSftpBackend.createSftpBackend.describeRoot (cognitive 21) · ×1
  • fileManagerSftpBackend.createSftpBackend.describeRoot (cognitive 21) server/services/fileManagerSftpBackend.js:1335 — fileManagerSftpBackend.createSftpBackend.describeRoot has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 3, ternaries 3 (nesting depth added 4). Of this number, 20 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 · characterStore.pruneCharacterStore (cognitive 21) · ×1
  • characterStore.pruneCharacterStore (cognitive 21) server/services/characterStore.js:410 — characterStore.pruneCharacterStore has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pruneModThumbnailCache (cognitive 21) · ×1
  • pruneModThumbnailCache (cognitive 21) REDACTED:10334 — pruneModThumbnailCache has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 2 (3 pts), loops 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 10337, 10377). 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 · fetchLatestReleaseOnce (cognitive 21) · ×1
  • fetchLatestReleaseOnce (cognitive 21) server/services/panelUpdateChecker.js:495 — fetchLatestReleaseOnce has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). None of this is in the body itself: all 21 points belong to 10 function literals inside it that branch (lines 550, 506, 600, …). 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 · _deferScheduledBackupUntilRestartEnds (cognitive 21) · ×1
  • _deferScheduledBackupUntilRestartEnds (cognitive 21) server/services/scheduler.js:1380 — _deferScheduledBackupUntilRestartEnds has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · trackPlayerActivity (cognitive 21) · ×1
  • trackPlayerActivity (cognitive 21) REDACTED:1925 — trackPlayerActivity has cognitive complexity 21 (threshold 15). Drivers by points: error handling 4 (12 pts), if/else 2 (4 pts), loops 2, ternaries 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handlePlayers (cognitive 21) · ×1
  • handlePlayers (cognitive 21) REDACTED:1402 — handlePlayers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (6 pts), loops 1 (2 pts), boolean chains 1, other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · search (cognitive 21) · ×1
  • search (cognitive 21) server/services/fileManagerService.js:662 — search has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (4 pts), boolean chains 2, loops 1, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createSftpBackend.writeBytesCas (cognitive 21) · ×1
  • createSftpBackend.writeBytesCas (cognitive 21) server/services/fileManagerSftpBackend.js:1614 — createSftpBackend.writeBytesCas has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 3 (6 pts), boolean chains 2, ternaries 2 (nesting depth added 5). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1626, 1675). 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 · drainDiskEvictions (cognitive 21) · ×1
  • drainDiskEvictions (cognitive 21) REDACTED:142 — drainDiskEvictions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 1 (5 pts), loops 2 (5 pts) (nesting depth added 14). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 144, 152, 149). 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 · Layout.Layout · ×1
  • Layout.Layout::renderRow (cognitive 20) client/src/components/Layout.tsx:719 — Layout.Layout::renderRow has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (11 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Layout.Layout) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · UnsavedChangesContext.UnsavedChangesProvider (cognitive 20) · ×1
  • UnsavedChangesContext.UnsavedChangesProvider (cognitive 20) client/src/contexts/UnsavedChangesContext.tsx:36 — UnsavedChangesContext.UnsavedChangesProvider has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, boolean chains 7, ternaries 1. None of this is in the body itself: all 20 points belong to 3 function literals inside it that branch (lines 76, 50, 95). 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 · HealthView.HealthView (cognitive 20) · ×1
  • HealthView.HealthView (cognitive 20) client/src/components/mods/HealthView.tsx:53 — HealthView.HealthView has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 25, if/else 16 (22 pts), ternaries 5, error handling 2 (3 pts), loops 2 (nesting depth added 7). 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. This shape REPEATS in the file: one other method here (HealthView.HealthView::applyAllSafe) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · CharacterSkills.CharacterSkills (cognitive 20) · ×1
  • CharacterSkills.CharacterSkills (cognitive 20) client/src/components/players/CharacterSkills.tsx:94 — CharacterSkills.CharacterSkills has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), ternaries 2 (3 pts), loops 2 (nesting depth added 4). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 116, a function literal at line 108, isTrained, …). 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 · sub-nav.SubNav (cognitive 20) · ×1
  • sub-nav.SubNav (cognitive 20) client/src/components/ui/sub-nav.tsx:59 — sub-nav.SubNav has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 9 (nesting depth added 3). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 8 function items inside it that branch (itemContent, withReason, groupLabel, …). 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 · characterInventory.inventoryAnnotations (cognitive 20) · ×1
  • characterInventory.inventoryAnnotations (cognitive 20) client/src/lib/characterInventory.ts:195 — characterInventory.inventoryAnnotations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modVariants.createDependsOn (cognitive 20) · ×1
  • modVariants.createDependsOn (cognitive 20) client/src/lib/modVariants.ts:38 — modVariants.createDependsOn has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 6). Of this number, 11 points are the body's own statements and 9 belong to 2 function items inside it that branch. 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 · paths.getDataPaths (cognitive 20) · ×1
  • paths.getDataPaths (cognitive 20) server/utils/paths.js:51 — paths.getDataPaths has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, error handling 3 (5 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · init.createServer (cognitive 20) · ×1
  • init.createServer (cognitive 20) server/database/init.js:2392 — init.createServer has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 17, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LinuxServiceLifecycle.run (cognitive 20) · ×1
  • LinuxServiceLifecycle.run (cognitive 20) server/services/linuxServiceLifecycle.js:658 — LinuxServiceLifecycle.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 3 (4 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · zomboidPaths.computeCandidateZomboidPaths (cognitive 20) · ×1
  • zomboidPaths.computeCandidateZomboidPaths (cognitive 20) server/utils/zomboidPaths.js:46 — zomboidPaths.computeCandidateZomboidPaths has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · zomboidDataPath.multiplayerFolderHoldsOnlyWorlds (cognitive 20) · ×1
  • zomboidDataPath.multiplayerFolderHoldsOnlyWorlds (cognitive 20) server/services/zomboidDataPath.js:489 — zomboidDataPath.multiplayerFolderHoldsOnlyWorlds has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServerManager._killPids (cognitive 20) · ×1
  • ServerManager._killPids (cognitive 20) REDACTED:3397 — ServerManager._killPids has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 11). None of this is in the body itself: all 20 points belong to 3 function literals inside it that branch (lines 3408, 3398, 3428). 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 · permissions.checkLockoutRulesForCapabilityChange (cognitive 20) · ×1
  • permissions.checkLockoutRulesForCapabilityChange (cognitive 20) server/services/permissions.js:842 — permissions.checkLockoutRulesForCapabilityChange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gameSqliteFile.assertPlainTables (cognitive 20) · ×1
  • gameSqliteFile.assertPlainTables (cognitive 20) server/utils/gameSqliteFile.js:120 — gameSqliteFile.assertPlainTables has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chunks.cleanupEmptyCellFiles (cognitive 20) · ×1
  • chunks.cleanupEmptyCellFiles (cognitive 20) REDACTED:278 — chunks.cleanupEmptyCellFiles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bridgeDelivery.availabilityToWorkshop (cognitive 20) · ×1
  • bridgeDelivery.availabilityToWorkshop (cognitive 20) server/services/bridgeDelivery.js:720 — bridgeDelivery.availabilityToWorkshop has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · modLoadOrder.createDependencyRelation (cognitive 20) · ×1
  • modLoadOrder.createDependencyRelation (cognitive 20) server/utils/modLoadOrder.js:497 — modLoadOrder.createDependencyRelation has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (10 pts), boolean chains 5, if/else 4 (5 pts) (nesting depth added 5). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 2 function items inside it that branch (reach, link). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · modConflictRules.compareTranslationEntries (cognitive 20) · ×1
  • modConflictRules.compareTranslationEntries (cognitive 20) server/utils/modConflictRules.js:188 — modConflictRules.compareTranslationEntries has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.insertInGroupOrder (cognitive 20) · ×1
  • mods.insertInGroupOrder (cognitive 20) REDACTED:5847 — mods.insertInGroupOrder has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/add-mod-advanced") (cognitive 20) · ×1
  • mods.router.post("/add-mod-advanced") (cognitive 20) REDACTED:6473 — mods.router.post("/add-mod-advanced") has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, error handling 2, ternaries 2, loops 1 (nesting depth added 1). 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: 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 · debug.collectBundleFilesFromDir · ×1
  • debug.collectBundleFilesFromDir::visit (cognitive 20) REDACTED:417 — debug.collectBundleFilesFromDir::visit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debug.scanSaveStats · ×1
  • debug.scanSaveStats::walk (cognitive 20) REDACTED:2937 — debug.scanSaveStats::walk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · backupService.cleanupOrphanBackupTemps (cognitive 20) · ×1
  • backupService.cleanupOrphanBackupTemps (cognitive 20) server/services/backupService.js:220 — backupService.cleanupOrphanBackupTemps has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resetTokenStrength.decodeResetTokenFile (cognitive 20) · ×1
  • resetTokenStrength.decodeResetTokenFile (cognitive 20) server/utils/resetTokenStrength.js:816 — resetTokenStrength.decodeResetTokenFile has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5, boolean chains 4, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · discord.router.put("/permissions") (cognitive 20) · ×1
  • discord.router.put("/permissions") (cognitive 20) REDACTED:892 — discord.router.put("/permissions") has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, error handling 1, loops 1, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 933, 939). 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 · characterImport.characterImportArgs · ×1
  • characterImport.characterImportArgs::copyItems (cognitive 20) server/utils/characterImport.js:114 — characterImport.characterImportArgs::copyItems has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (characterImport.characterImportArgs) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · panelBridge.router.post("/install-mod-auto") (cognitive 20) · ×1
  • panelBridge.router.post("/install-mod-auto") (cognitive 20) server/routes/panelBridge.js:3464 — panelBridge.router.post("/install-mod-auto") has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · fileManagerProtectedAreas.makeRules.classify (cognitive 20) · ×1
  • fileManagerProtectedAreas.makeRules.classify (cognitive 20) server/services/fileManagerProtectedAreas.js:345 — fileManagerProtectedAreas.makeRules.classify has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileManagerService.checkUploadTarget (cognitive 20) · ×1
  • fileManagerService.checkUploadTarget (cognitive 20) server/services/fileManagerService.js:1444 — fileManagerService.checkUploadTarget has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolveModIdsForAddition (cognitive 20) · ×1
  • resolveModIdsForAddition (cognitive 20) REDACTED:3057 — resolveModIdsForAddition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _findForeignBackupOwner (cognitive 20) · ×1
  • _findForeignBackupOwner (cognitive 20) server/services/backupService.js:809 — _findForeignBackupOwner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, ternaries 3, loops 2, error handling 1, other 1 (nesting depth added 4). 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 · purgeTrash (cognitive 20) · ×1
  • purgeTrash (cognitive 20) server/services/fileManagerService.js:1982 — purgeTrash has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 2 (3 pts), error handling 1, ternaries 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 4 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 · createSftpBackend.trashMove (cognitive 20) · ×1
  • createSftpBackend.trashMove (cognitive 20) server/services/fileManagerSftpBackend.js:1971 — createSftpBackend.trashMove has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (6 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 8). 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 · splitLines (cognitive 20) · ×1
  • splitLines (cognitive 20) server/utils/serverErrorFinder.js:677 — splitLines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeRules.classify (cognitive 20) · ×1
  • makeRules.classify (cognitive 20) server/services/fileManagerProtectedAreas.js:345 — makeRules.classify has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pullRemoteConfigFiles (cognitive 20) · ×1
  • pullRemoteConfigFiles (cognitive 20) server/services/remoteConfigFiles.js:195 — pullRemoteConfigFiles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 3 (5 pts), ternaries 1 (2 pts), boolean chains 1, loops 1, other 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 216). 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 · runManagedLifecycle (cognitive 20) · ×1
  • runManagedLifecycle (cognitive 20) server/services/managedContainer.js:219 — runManagedLifecycle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 2). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Settings.Settings · ×1
  • Settings.Settings::handleDownloadPanelUpdate (cognitive 19) REDACTED:1448 — Settings.Settings::handleDownloadPanelUpdate has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 5 (6 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Settings.Settings) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · DiscoverySetup.DiscoverySetup (cognitive 19) · ×1
  • DiscoverySetup.DiscoverySetup (cognitive 19) client/src/components/DiscoverySetup.tsx:42 — DiscoverySetup.DiscoverySetup has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 5, error handling 2, ternaries 1. Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (handleCreate, a function literal at line 64). 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 · problemFixes.resolveHealthFix (cognitive 19) · ×1
  • problemFixes.resolveHealthFix (cognitive 19) client/src/components/diagnostics/problemFixes.ts:31 — problemFixes.resolveHealthFix has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modGroupTools.autoOrderMembers (cognitive 19) · ×1
  • modGroupTools.autoOrderMembers (cognitive 19) client/src/lib/modGroupTools.ts:158 — modGroupTools.autoOrderMembers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 8). Of this number, 12 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 · fileWriteQueue.writeFileAtomic (cognitive 19) · ×1
  • fileWriteQueue.writeFileAtomic (cognitive 19) server/utils/fileWriteQueue.js:145 — fileWriteQueue.writeFileAtomic has cognitive complexity 19 (threshold 15). Drivers by points: error handling 4 (10 pts), if/else 3 (5 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelBridge.recoverSkippedResults (cognitive 19) · ×1
  • PanelBridge.recoverSkippedResults (cognitive 19) REDACTED:1200 — PanelBridge.recoverSkippedResults has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 3 (6 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modLoadOrder.findIncompatiblePairs (cognitive 19) · ×1
  • modLoadOrder.findIncompatiblePairs (cognitive 19) server/utils/modLoadOrder.js:646 — modLoadOrder.findIncompatiblePairs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workshopModInfo.sanitizeModIdListWithDiskBypass (cognitive 19) · ×1
  • workshopModInfo.sanitizeModIdListWithDiskBypass (cognitive 19) server/services/workshopModInfo.js:335 — workshopModInfo.sanitizeModIdListWithDiskBypass has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 3 (6 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (verifiedOnDisk). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · workshopModInfo.parseModInfoFile (cognitive 19) · ×1
  • workshopModInfo.parseModInfoFile (cognitive 19) server/services/workshopModInfo.js:418 — workshopModInfo.parseModInfoFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modSmartScan.addConflictSuggestions (cognitive 19) · ×1
  • modSmartScan.addConflictSuggestions (cognitive 19) server/services/modSmartScan.js:26 — modSmartScan.addConflictSuggestions has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, loops 4 (5 pts), if/else 2 (4 pts), error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modSmartSort.pullUpOrder (cognitive 19) · ×1
  • modSmartSort.pullUpOrder (cognitive 19) server/utils/modSmartSort.js:1051 — modSmartSort.pullUpOrder has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 9). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/collection/sync") (cognitive 19) · ×1
  • mods.router.post("/collection/sync") (cognitive 19) REDACTED:1579 — mods.router.post("/collection/sync") has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (6 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 6). 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 · debug.inspectModDirectory (cognitive 19) · ×1
  • debug.inspectModDirectory (cognitive 19) REDACTED:982 — debug.inspectModDirectory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debug.router.post("/clear-stale-locks") (cognitive 19) · ×1
  • debug.router.post("/clear-stale-locks") (cognitive 19) REDACTED:6724 — debug.router.post("/clear-stale-locks") has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17 (23 pts), error handling 4 (8 pts), boolean chains 7, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (debug.router.post("/clear-stale-locks")::walk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · updateBundle.acknowledgeUpdateBundle (cognitive 19) · ×1
  • updateBundle.acknowledgeUpdateBundle (cognitive 19) server/services/updateBundle.js:594 — updateBundle.acknowledgeUpdateBundle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · servers.reloadServicesForNewActiveServer (cognitive 19) · ×1
  • servers.reloadServicesForNewActiveServer (cognitive 19) REDACTED:2413 — servers.reloadServicesForNewActiveServer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 4 (7 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · whitelistDb.listWhitelistAccounts (cognitive 19) · ×1
  • whitelistDb.listWhitelistAccounts (cognitive 19) server/utils/whitelistDb.js:101 — whitelistDb.listWhitelistAccounts has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (6 pts), error handling 2, loops 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 111). 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 · characterImport.characterImportRefusal (cognitive 19) · ×1
  • characterImport.characterImportRefusal (cognitive 19) server/utils/characterImport.js:19 — characterImport.characterImportRefusal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pzProcessMemory.readProcessMemoryBytes (cognitive 19) · ×1
  • pzProcessMemory.readProcessMemoryBytes (cognitive 19) server/utils/pzProcessMemory.js:80 — pzProcessMemory.readProcessMemoryBytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 3, error handling 1 (3 pts), ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · checkSpecificServerStopped (cognitive 19) · ×1
  • checkSpecificServerStopped (cognitive 19) REDACTED:6192 — checkSpecificServerStopped has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 2 (3 pts), boolean chains 1, loops 1, other 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · flushWrites (cognitive 19) · ×1
  • flushWrites (cognitive 19) server/database/init.js:434 — flushWrites has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 4 (7 pts), boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 461, 542). 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 · getStatus (cognitive 19) · ×1
  • getStatus (cognitive 19) server/services/backupService.js:1995 — getStatus has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 5, if/else 3 (4 pts), other 4, ternaries 4, error handling 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · handleInteraction (cognitive 19) · ×1
  • handleInteraction (cognitive 19) REDACTED:1243 — handleInteraction has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), error handling 2 (3 pts), ternaries 1 (2 pts), match/switch 1, other 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _autoReconnectTick (cognitive 19) · ×1
  • _autoReconnectTick (cognitive 19) server/services/rcon.js:895 — _autoReconnectTick has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · createSftpBackend.pruneTrash (cognitive 19) · ×1
  • createSftpBackend.pruneTrash (cognitive 19) server/services/fileManagerSftpBackend.js:1209 — createSftpBackend.pruneTrash has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 2, error handling 1, ternaries 1 (nesting depth added 6). Of this number, 17 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 · writeBytesCas (cognitive 19) · ×1
  • writeBytesCas (cognitive 19) server/services/fileManagerLocalBackend.js:808 — writeBytesCas has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 5 (7 pts), other 2, boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 19 points belong to 3 function literals inside it that branch (lines 811, 894, 898). 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 · scheduleAutoUpdate (cognitive 19) · ×1
  • scheduleAutoUpdate (cognitive 19) REDACTED:584 — scheduleAutoUpdate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 2, ternaries 2 (nesting depth added 2). Of this number, 18 points are the body's own statements and 1 belongs 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 · scanAllCandidates (cognitive 19) · ×1
  • scanAllCandidates (cognitive 19) server/services/mountDiscovery.js:376 — scanAllCandidates has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, ternaries 3, loops 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 407, 398, 399, …). 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 · normalizeRow (cognitive 19) · ×1
  • normalizeRow (cognitive 19) server/services/characterSheet.js:235 — normalizeRow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (3 pts), ternaries 1 (2 pts), other 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · restartForModUpdates (cognitive 19) · ×1
  • restartForModUpdates (cognitive 19) server/services/otherServerUpdates.js:301 — restartForModUpdates has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, error handling 1 (2 pts), loops 1, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Leaderboard.sortLeaderboardRows (cognitive 18) · ×1
  • Leaderboard.sortLeaderboardRows (cognitive 18) client/src/pages/Leaderboard.tsx:97 — Leaderboard.sortLeaderboardRows has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 4 (5 pts), boolean chains 3 (nesting depth added 7). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 101). 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 · ConflictSuggestionsBar.ConflictSuggestionsBar (cognitive 18) · ×1
  • ConflictSuggestionsBar.ConflictSuggestionsBar (cognitive 18) client/src/components/mods/ConflictSuggestionsBar.tsx:17 — ConflictSuggestionsBar.ConflictSuggestionsBar has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 4 (6 pts), boolean chains 3, loops 1 (nesting depth added 5). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (applyAll). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · HealthView.HealthView · ×1
  • HealthView.HealthView::applyAllSafe (cognitive 18) client/src/components/mods/HealthView.tsx:118 — HealthView.HealthView::applyAllSafe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (HealthView.HealthView) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · useFixEverything.useFixEverything.apply (cognitive 18) · ×1
  • useFixEverything.useFixEverything.apply (cognitive 18) client/src/components/mods/useFixEverything.tsx:187 — useFixEverything.useFixEverything.apply has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (8 pts), if/else 5 (6 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 3). 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, 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 · consoleLogLine.parseLogLine (cognitive 18) · ×1
  • consoleLogLine.parseLogLine (cognitive 18) client/src/lib/consoleLogLine.ts:47 — consoleLogLine.parseLogLine has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nativeLibraryPaths.parseLibraryPathFromLaunchConfig (cognitive 18) · ×1
  • nativeLibraryPaths.parseLibraryPathFromLaunchConfig (cognitive 18) server/utils/nativeLibraryPaths.js:113 — nativeLibraryPaths.parseLibraryPathFromLaunchConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 4). 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 · sandboxLua.sandboxSectionsFromLua (cognitive 18) · ×1
  • sandboxLua.sandboxSectionsFromLua (cognitive 18) server/utils/sandboxLua.js:619 — sandboxLua.sandboxSectionsFromLua has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chunks.router.get("/browse") (cognitive 18) · ×1
  • chunks.router.get("/browse") (cognitive 18) REDACTED:3090 — chunks.router.get("/browse") has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 5, error handling 2, ternaries 2. 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, 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 · panelBridgeInstaller.installBridge (cognitive 18) · ×1
  • panelBridgeInstaller.installBridge (cognitive 18) server/services/panelBridgeInstaller.js:205 — panelBridgeInstaller.installBridge has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serverFiles.router.put("/sandbox-option") (cognitive 18) · ×1
  • serverFiles.router.put("/sandbox-option") (cognitive 18) REDACTED:1596 — serverFiles.router.put("/sandbox-option") has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8, if/else 6, boolean chains 3, error handling 1. 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: 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 · modLoadOrder.computeEffectiveModOrder · ×1
  • modLoadOrder.computeEffectiveModOrder::loadModAndRequired (cognitive 18) server/utils/modLoadOrder.js:317 — modLoadOrder.computeEffectiveModOrder::loadModAndRequired has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (modLoadOrder.computeEffectiveModOrder) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · workshopDownload.downloadWorkshopItem (cognitive 18) · ×1
  • workshopDownload.downloadWorkshopItem (cognitive 18) REDACTED:80 — workshopDownload.downloadWorkshopItem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 3, error handling 2, ternaries 1. Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 199, 143, 147, …). 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 · mods.scoreWorkshopDependencyMatch (cognitive 18) · ×1
  • mods.scoreWorkshopDependencyMatch (cognitive 18) REDACTED:3128 — mods.scoreWorkshopDependencyMatch has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 8. Of this number, 17 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.
D2 · Cognitive Complexity · mods.router.post("/presets/ · ×1
  • mods.router.post("/presets/:id/apply") (cognitive 18) REDACTED:5322 — mods.router.post("/presets/:id/apply") has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 5360, 5370, 5371, …). 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 · mods.compareLuaSymbols (cognitive 18) · ×1
  • mods.compareLuaSymbols (cognitive 18) REDACTED:7200 — mods.compareLuaSymbols has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debug.parseModInfoMetadata (cognitive 18) · ×1
  • debug.parseModInfoMetadata (cognitive 18) REDACTED:958 — debug.parseModInfoMetadata has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 8, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debug.router.post("/paths") (cognitive 18) · ×1
  • debug.router.post("/paths") (cognitive 18) REDACTED:2370 — debug.router.post("/paths") has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 2 (4 pts), error handling 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: 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 · backupRestartOverlap.everyBackupOverlaps (cognitive 18) · ×1
  • backupRestartOverlap.everyBackupOverlaps (cognitive 18) server/utils/backupRestartOverlap.js:126 — backupRestartOverlap.everyBackupOverlaps has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelUpdateChecker.classifyApplyFailure (cognitive 18) · ×1
  • PanelUpdateChecker.classifyApplyFailure (cognitive 18) server/services/panelUpdateChecker.js:2874 — PanelUpdateChecker.classifyApplyFailure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · resetTokenStrength.utf8CharLength (cognitive 18) · ×1
  • resetTokenStrength.utf8CharLength (cognitive 18) server/utils/resetTokenStrength.js:281 — resetTokenStrength.utf8CharLength has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (6 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · otherServerLifecycle.startOtherServer (cognitive 18) · ×1
  • otherServerLifecycle.startOtherServer (cognitive 18) server/services/otherServerLifecycle.js:147 — otherServerLifecycle.startOtherServer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 2). 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 · fileManagerSftpBackend.createSftpBackend.pruneTrash (cognitive 18) · ×1
  • fileManagerSftpBackend.createSftpBackend.pruneTrash (cognitive 18) server/services/fileManagerSftpBackend.js:1209 — fileManagerSftpBackend.createSftpBackend.pruneTrash has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 6). 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 · fileManagerSftpBackend.createSftpBackend.writeBytesCas (cognitive 18) · ×1
  • fileManagerSftpBackend.createSftpBackend.writeBytesCas (cognitive 18) server/services/fileManagerSftpBackend.js:1614 — fileManagerSftpBackend.createSftpBackend.writeBytesCas has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 1626). 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 · files.router.use() (cognitive 18) · ×1
  • files.router.use() (cognitive 18) server/routes/files.js:332 — files.router.use() has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _runScheduledBackup (cognitive 18) · ×1
  • _runScheduledBackup (cognitive 18) server/services/scheduler.js:1537 — _runScheduledBackup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _excludeOtherServersBackups (cognitive 18) · ×1
  • _excludeOtherServersBackups (cognitive 18) server/services/backupService.js:752 — _excludeOtherServersBackups has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 3, error handling 1, loops 1, other 1 (nesting depth added 2). Of this number, 15 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 · processResult (cognitive 18) · ×1
  • processResult (cognitive 18) REDACTED:1605 — processResult has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (7 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loadConfig (cognitive 18) · ×1
  • loadConfig (cognitive 18) REDACTED:564 — loadConfig has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, error handling 2 (4 pts), if/else 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · checkPermission (cognitive 18) · ×1
  • checkPermission (cognitive 18) REDACTED:1205 — checkPermission has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createSftpBackend.listDir (cognitive 18) · ×1
  • createSftpBackend.listDir (cognitive 18) server/services/fileManagerSftpBackend.js:722 — createSftpBackend.listDir has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · keptInPlace (cognitive 18) · ×1
  • keptInPlace (cognitive 18) server/utils/modSmartSort.js:1163 — keptInPlace has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 4, loops 4, if/else 1 (2 pts) (nesting depth added 4). Of this number, 11 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateEntry (cognitive 18) · ×1
  • validateEntry (cognitive 18) server/services/modSteamKnowledge.js:531 — validateEntry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loadFromDisk (cognitive 18) · ×1
  • loadFromDisk (cognitive 18) server/services/modSteamKnowledge.js:563 — loadFromDisk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, error handling 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · create.Program · ×1
  • create.Program:exit (cognitive 18) eslint-rules/no-unguarded-capability-menu-item.js:429 — create.Program:exit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fetchCharacterSheet (cognitive 18) · ×1
  • fetchCharacterSheet (cognitive 18) server/services/characterSheet.js:463 — fetchCharacterSheet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (6 pts), boolean chains 2, error handling 1, other 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ItemPicker.ItemPicker · ×1
  • ItemPicker.ItemPicker::handleKeyDown (cognitive 17) client/src/components/ItemPicker.tsx:228 — ItemPicker.ItemPicker::handleKeyDown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ItemPicker.ItemPicker) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · DashboardVerdict.VerdictBand (cognitive 17) · ×1
  • DashboardVerdict.VerdictBand (cognitive 17) client/src/components/dashboard/DashboardVerdict.tsx:121 — DashboardVerdict.VerdictBand has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, ternaries 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · problemFixes.runFixAll (cognitive 17) · ×1
  • problemFixes.runFixAll (cognitive 17) client/src/components/diagnostics/problemFixes.ts:136 — problemFixes.runFixAll has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileRowMenu.FileRowMenu (cognitive 17) · ×1
  • FileRowMenu.FileRowMenu (cognitive 17) client/src/components/files/FileRowMenu.tsx:42 — FileRowMenu.FileRowMenu has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (8 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useCharacterSheet.useCharacterSheet (cognitive 17) · ×1
  • useCharacterSheet.useCharacterSheet (cognitive 17) client/src/components/players/useCharacterSheet.ts:49 — useCharacterSheet.useCharacterSheet has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5. None of this is in the body itself: all 17 points belong to 8 function literals inside it that branch (lines 151, 162, 133, …). 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 · TaskDialog.TaskDialog · ×1
  • TaskDialog.TaskDialog::handleSave (cognitive 17) client/src/components/scheduler/TaskDialog.tsx:198 — TaskDialog.TaskDialog::handleSave has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, ternaries 3 (5 pts), boolean chains 4, error handling 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (TaskDialog.TaskDialog) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · iniFormState.mergeIniSchemaDefaults (cognitive 17) · ×1
  • iniFormState.mergeIniSchemaDefaults (cognitive 17) client/src/lib/iniFormState.ts:120 — iniFormState.mergeIniSchemaDefaults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modGroups.parseGroupDocument (cognitive 17) · ×1
  • modGroups.parseGroupDocument (cognitive 17) client/src/lib/modGroups.ts:63 — modGroups.parseGroupDocument has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, ternaries 6, boolean chains 4, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · modVariants.computeVariantSiblings (cognitive 17) · ×1
  • modVariants.computeVariantSiblings (cognitive 17) client/src/lib/modVariants.ts:83 — modVariants.computeVariantSiblings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bridgeCommandArgs.bridgeArgsNestingDepth (cognitive 17) · ×1
  • bridgeCommandArgs.bridgeArgsNestingDepth (cognitive 17) server/utils/bridgeCommandArgs.js:24 — bridgeCommandArgs.bridgeArgsNestingDepth has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · init.recordPlayerSession (cognitive 17) · ×1
  • init.recordPlayerSession (cognitive 17) server/database/init.js:2957 — init.recordPlayerSession has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serverPortPlan.findPortConflicts (cognitive 17) · ×1
  • serverPortPlan.findPortConflicts (cognitive 17) server/services/serverPortPlan.js:138 — serverPortPlan.findPortConflicts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServerManager._getLiveProcess (cognitive 17) · ×1
  • ServerManager._getLiveProcess (cognitive 17) REDACTED:2161 — ServerManager._getLiveProcess has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 6). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 2190, 2215, 2164, …). 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 · PanelBridgeSftpTransport.copyRemote (cognitive 17) · ×1
  • PanelBridgeSftpTransport.copyRemote (cognitive 17) server/services/panelBridgeSftp.js:525 — PanelBridgeSftpTransport.copyRemote has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 2). Of this number, 14 points are the body's own statements and 3 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 · ModChecker.fetchSteamTimestamps (cognitive 17) · ×1
  • ModChecker.fetchSteamTimestamps (cognitive 17) server/services/modChecker.js:1904 — ModChecker.fetchSteamTimestamps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 6). 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 · gameSqliteFile.hasUnfinishedTransaction (cognitive 17) · ×1
  • gameSqliteFile.hasUnfinishedTransaction (cognitive 17) server/utils/gameSqliteFile.js:236 — gameSqliteFile.hasUnfinishedTransaction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, error handling 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serverFiles.router.get("/backups") (cognitive 17) · ×1
  • serverFiles.router.get("/backups") (cognitive 17) REDACTED:2299 — serverFiles.router.get("/backups") has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), boolean chains 2, error handling 2 (nesting depth added 5). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2346, 2313). 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 · serverFiles.router.post("/restore/ · ×1
  • serverFiles.router.post("/restore/:filename") (cognitive 17) REDACTED:2374 — serverFiles.router.post("/restore/:filename") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 2460). 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 · workshopCollectionSync.postSharedfilesAction (cognitive 17) · ×1
  • workshopCollectionSync.postSharedfilesAction (cognitive 17) server/services/workshopCollectionSync.js:215 — workshopCollectionSync.postSharedfilesAction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · modClassification.namesTarget (cognitive 17) · ×1
  • modClassification.namesTarget (cognitive 17) server/utils/modClassification.js:158 — modClassification.namesTarget has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (6 pts), ternaries 1 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modSteamKnowledge.snapshot (cognitive 17) · ×1
  • modSteamKnowledge.snapshot (cognitive 17) server/services/modSteamKnowledge.js:682 — modSteamKnowledge.snapshot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.post("/import-collection") (cognitive 17) · ×1
  • mods.router.post("/import-collection") (cognitive 17) REDACTED:1830 — mods.router.post("/import-collection") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, error handling 2 (nesting depth added 1). Of this number, 14 points are the body's own statements and 3 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 · mods.router.post("/delete-disk-mod") (cognitive 17) · ×1
  • mods.router.post("/delete-disk-mod") (cognitive 17) REDACTED:9711 — mods.router.post("/delete-disk-mod") has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (6 pts), boolean chains 5, if/else 5, ternaries 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debug.router.post("/client-errors") (cognitive 17) · ×1
  • debug.router.post("/client-errors") (cognitive 17) REDACTED:7176 — debug.router.post("/client-errors") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, loops 1 (2 pts), ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · backupFolderWalk.walkDirectory (cognitive 17) · ×1
  • backupFolderWalk.walkDirectory (cognitive 17) server/services/backupFolderWalk.js:7 — backupFolderWalk.walkDirectory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (3 pts), ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · certs.loadOrCreateCerts (cognitive 17) · ×1
  • certs.loadOrCreateCerts (cognitive 17) server/utils/certs.js:325 — certs.loadOrCreateCerts has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (7 pts), if/else 5 (7 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · servers.router.delete("/ · ×1
  • servers.router.delete("/:id") (cognitive 17) REDACTED:2320 — servers.router.delete("/:id") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · panelBridge.router.post("/players/ · ×1
  • panelBridge.router.post("/players/:username/teleport") (cognitive 17) server/routes/panelBridge.js:2648 — panelBridge.router.post("/players/:username/teleport") has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · fileManagerLocalBackend.receiveIntoTemp (cognitive 17) · ×1
  • fileManagerLocalBackend.receiveIntoTemp (cognitive 17) server/services/fileManagerLocalBackend.js:915 — fileManagerLocalBackend.receiveIntoTemp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 3. None of this is in the body itself: all 17 points belong to 9 function literals inside it that branch (lines 934, 974, 981, …). 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 · fileManagerSftpBackend.createSftpBackend.listDir (cognitive 17) · ×1
  • fileManagerSftpBackend.createSftpBackend.listDir (cognitive 17) server/services/fileManagerSftpBackend.js:722 — fileManagerSftpBackend.createSftpBackend.listDir has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileManagerSftpBackend.createSftpBackend.trashMove (cognitive 17) · ×1
  • fileManagerSftpBackend.createSftpBackend.trashMove (cognitive 17) server/services/fileManagerSftpBackend.js:1971 — fileManagerSftpBackend.createSftpBackend.trashMove has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 1 (3 pts), ternaries 3, boolean chains 2 (nesting depth added 6). 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 · autoExportFolders.enforceAutoExportFolderCap (cognitive 17) · ×1
  • autoExportFolders.enforceAutoExportFolderCap (cognitive 17) server/utils/autoExportFolders.js:27 — autoExportFolders.enforceAutoExportFolderCap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (4 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). 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 · openListedLogFile (cognitive 17) · ×1
  • openListedLogFile (cognitive 17) REDACTED:287 — openListedLogFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 3 (5 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · getSupportBundleEntries (cognitive 17) · ×1
  • getSupportBundleEntries (cognitive 17) REDACTED:1997 — getSupportBundleEntries has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, ternaries 6, error handling 2, other 2, loops 1. Of this number, 13 points are the body's own statements and 4 belong to 16 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 · persistUtilities (cognitive 17) · ×1
  • persistUtilities (cognitive 17) server/routes/panelBridge.js:3738 — persistUtilities has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 5, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolveCustomOrDefaultDataPath (cognitive 17) · ×1
  • resolveCustomOrDefaultDataPath (cognitive 17) REDACTED:483 — resolveCustomOrDefaultDataPath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · createSftpBackend.trashList (cognitive 17) · ×1
  • createSftpBackend.trashList (cognitive 17) server/services/fileManagerSftpBackend.js:2009 — createSftpBackend.trashList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 5). Of this number, 14 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 · findServerErrors · ×1
  • findServerErrors::record (cognitive 17) server/utils/serverErrorFinder.js:783 — findServerErrors::record has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · findLogPath (cognitive 17) · ×1
  • findLogPath (cognitive 17) server/services/logTailer.js:229 — findLogPath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, error handling 2 (3 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · validateSftpBridgeConfig (cognitive 17) · ×1
  • validateSftpBridgeConfig (cognitive 17) server/services/panelBridgeSftp.js:138 — validateSftpBridgeConfig has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 5, if/else 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · parseSandboxLua (cognitive 17) · ×1
  • parseSandboxLua (cognitive 17) server/utils/sandboxLua.js:385 — parseSandboxLua has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extract-pz-sandbox-ground-truth.parseApocalypse (cognitive 16) · ×1
  • extract-pz-sandbox-ground-truth.parseApocalypse (cognitive 16) client/scripts/extract-pz-sandbox-ground-truth.mjs:197 — extract-pz-sandbox-ground-truth.parseApocalypse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · demoSmart.demoAddRule (cognitive 16) · ×1
  • demoSmart.demoAddRule (cognitive 16) client/src/lib/demoSmart.ts:377 — demoSmart.demoAddRule has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 6, if/else 3 (nesting depth added 1). 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: 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 · ScheduledBackupServers.ScheduledBackupServers (cognitive 16) · ×1
  • ScheduledBackupServers.ScheduledBackupServers (cognitive 16) client/src/components/backups/ScheduledBackupServers.tsx:23 — ScheduledBackupServers.ScheduledBackupServers has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, if/else 5, ternaries 4 (5 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (toggle, a function literal at line 31, a function literal at line 83, …). 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 · FileToolbar.FileToolbar (cognitive 16) · ×1
  • FileToolbar.FileToolbar (cognitive 16) client/src/components/files/FileToolbar.tsx:56 — FileToolbar.FileToolbar has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, ternaries 6, if/else 4. Of this number, 8 points are the body's own statements and 8 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 · RemoteRootsDialog.RemoteRootsDialog (cognitive 16) · ×1
  • RemoteRootsDialog.RemoteRootsDialog (cognitive 16) client/src/components/files/RemoteRootsDialog.tsx:34 — RemoteRootsDialog.RemoteRootsDialog has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 3, error handling 1. Of this number, 9 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useUploadQueue.pickedFromDrop (cognitive 16) · ×1
  • useUploadQueue.pickedFromDrop (cognitive 16) client/src/components/files/useUploadQueue.ts:301 — useUploadQueue.pickedFromDrop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (walk, a function literal at line 305). 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 · orderRuleErrors.explainOrderRuleError (cognitive 16) · ×1
  • orderRuleErrors.explainOrderRuleError (cognitive 16) client/src/components/mods/orderRuleErrors.ts:57 — orderRuleErrors.explainOrderRuleError has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 4 (8 pts) (nesting depth added 7). Of this number, 10 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 · ConflictSuggestion.ConflictSuggestion (cognitive 16) · ×1
  • ConflictSuggestion.ConflictSuggestion (cognitive 16) client/src/components/mods/ConflictSuggestion.tsx:49 — ConflictSuggestion.ConflictSuggestion has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4, boolean chains 3 (nesting depth added 5). Of this number, 12 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CreateTemplateDialog.CreateTemplateDialog (cognitive 16) · ×1
  • CreateTemplateDialog.CreateTemplateDialog (cognitive 16) client/src/components/templates/CreateTemplateDialog.tsx:31 — CreateTemplateDialog.CreateTemplateDialog has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 4, error handling 1, ternaries 1. Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (handleSave, a function literal at line 65, a function literal at line 46, …). 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 · restoreOutcome.waitForRestoreOutcome (cognitive 16) · ×1
  • restoreOutcome.waitForRestoreOutcome (cognitive 16) client/src/lib/restoreOutcome.ts:112 — restoreOutcome.waitForRestoreOutcome has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceRconClient._onData (cognitive 16) · ×1
  • SourceRconClient._onData (cognitive 16) server/utils/sourceRcon.js:237 — SourceRconClient._onData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · activeSteamOperations.rehydrateActiveSteamOperationsFromDisk (cognitive 16) · ×1
  • activeSteamOperations.rehydrateActiveSteamOperationsFromDisk (cognitive 16) server/services/activeSteamOperations.js:226 — activeSteamOperations.rehydrateActiveSteamOperationsFromDisk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chunks.scanMapFolder (cognitive 16) · ×1
  • chunks.scanMapFolder (cognitive 16) REDACTED:2941 — chunks.scanMapFolder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 3, boolean chains 2, loops 2, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 2978, 2951, 3014, …). 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 · serverFiles.router.post("/templates") (cognitive 16) · ×1
  • serverFiles.router.post("/templates") (cognitive 16) REDACTED:2684 — serverFiles.router.post("/templates") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mapProxy.fetchTileWithRetry (cognitive 16) · ×1
  • mapProxy.fetchTileWithRetry (cognitive 16) REDACTED:979 — mapProxy.fetchTileWithRetry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · browserCookies.firefoxProfilePaths (cognitive 16) · ×1
  • browserCookies.firefoxProfilePaths (cognitive 16) REDACTED:150 — browserCookies.firefoxProfilePaths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (7 pts), error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modSmartSort.solve.modsBetween (cognitive 16) · ×1
  • modSmartSort.solve.modsBetween (cognitive 16) server/utils/modSmartSort.js:674 — modSmartSort.solve.modsBetween has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 6). Of this number, 8 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 · modSmartSort.kahnOrder (cognitive 16) · ×1
  • modSmartSort.kahnOrder (cognitive 16) server/utils/modSmartSort.js:968 — modSmartSort.kahnOrder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mods.router.put("/restart-options") (cognitive 16) · ×1
  • mods.router.put("/restart-options") (cognitive 16) REDACTED:995 — mods.router.put("/restart-options") has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 6, error handling 1. 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, 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 · mods.router.post("/enable-disk-mod") (cognitive 16) · ×1
  • mods.router.post("/enable-disk-mod") (cognitive 16) REDACTED:9498 — mods.router.post("/enable-disk-mod") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 4, error handling 2, ternaries 2, loops 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 4 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 · mods.router.get("/thumbnail/ · ×1
  • mods.router.get("/thumbnail/:workshopId") (cognitive 16) REDACTED:10507 — mods.router.get("/thumbnail/:workshopId") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, error handling 3 (nesting depth added 1). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · serverErrorFinder.modByPath (cognitive 16) · ×1
  • serverErrorFinder.modByPath (cognitive 16) server/utils/serverErrorFinder.js:393 — serverErrorFinder.modByPath has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debug.listDir (cognitive 16) · ×1
  • debug.listDir (cognitive 16) REDACTED:1296 — debug.listDir has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), error handling 3 (4 pts), if/else 3 (4 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.router.get("/branches") (cognitive 16) · ×1
  • server.router.get("/branches") (cognitive 16) REDACTED:3531 — server.router.get("/branches") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 4, error handling 1. 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: 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 · ServerPlayersWatch.tick (cognitive 16) · ×1
  • ServerPlayersWatch.tick (cognitive 16) server/services/serverPlayersWatch.js:79 — ServerPlayersWatch.tick has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (5 pts), boolean chains 4, error handling 2 (3 pts), loops 2, ternaries 2 (nesting depth added 2). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupService._findExtractedWorld (cognitive 16) · ×1
  • BackupService._findExtractedWorld (cognitive 16) server/services/backupService.js:2680 — BackupService._findExtractedWorld has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 5). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanelUpdateChecker.cleanupOrphanStagedClientDirs (cognitive 16) · ×1
  • PanelUpdateChecker.cleanupOrphanStagedClientDirs (cognitive 16) server/services/panelUpdateChecker.js:3499 — PanelUpdateChecker.cleanupOrphanStagedClientDirs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · auth.router.post("/reset-password") (cognitive 16) · ×1
  • auth.router.post("/reset-password") (cognitive 16) REDACTED:1345 — auth.router.post("/reset-password") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 3, error handling 3, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oidc.router.get("/callback") (cognitive 16) · ×1
  • oidc.router.get("/callback") (cognitive 16) REDACTED:322 — oidc.router.get("/callback") has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (5 pts), if/else 5, ternaries 2 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · discord.router.put("/webhook-events") (cognitive 16) · ×1
  • discord.router.put("/webhook-events") (cognitive 16) REDACTED:797 — discord.router.put("/webhook-events") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1, loops 1 (nesting depth added 3). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serverFinder.parseA2SInfoResponse (cognitive 16) · ×1
  • serverFinder.parseA2SInfoResponse (cognitive 16) server/routes/serverFinder.js:227 — serverFinder.parseA2SInfoResponse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uploadStream.streamUploadToFile (cognitive 16) · ×1
  • uploadStream.streamUploadToFile (cognitive 16) server/utils/uploadStream.js:27 — uploadStream.streamUploadToFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (nesting depth added 3). None of this is in the body itself: all 16 points belong to 5 function literals inside it that branch (lines 94, 74, 84, …). 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 · fileManagerLocalBackend.trashRestore (cognitive 16) · ×1
  • fileManagerLocalBackend.trashRestore (cognitive 16) server/services/fileManagerLocalBackend.js:1409 — fileManagerLocalBackend.trashRestore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 5). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 1418). 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 · fileManagerService.assertNoOperationInProgress (cognitive 16) · ×1
  • fileManagerService.assertNoOperationInProgress (cognitive 16) server/services/fileManagerService.js:459 — fileManagerService.assertNoOperationInProgress has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.isAllowedHostHeader (cognitive 16) · ×1
  • index.isAllowedHostHeader (cognitive 16) REDACTED:814 — index.isAllowedHostHeader has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.recoverFromStartupInspectionFailure (cognitive 16) · ×1
  • index.recoverFromStartupInspectionFailure (cognitive 16) REDACTED:2048 — index.recoverFromStartupInspectionFailure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (5 pts), error handling 3 (4 pts), ternaries 4, boolean chains 3 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · readText (cognitive 16) · ×1
  • readText (cognitive 16) server/services/fileManagerService.js:780 — readText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 1 (2 pts), boolean chains 1, other 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · isContainerOnly (cognitive 16) · ×1
  • isContainerOnly (cognitive 16) server/services/fileManagerLocalBackend.js:322 — isContainerOnly has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · solve.modsBetween (cognitive 16) · ×1
  • solve.modsBetween (cognitive 16) server/utils/modSmartSort.js:674 — solve.modsBetween has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 6). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mapSteamServer (cognitive 16) · ×1
  • mapSteamServer (cognitive 16) server/routes/serverFinder.js:519 — mapSteamServer has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, ternaries 4, other 1. 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, 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 · buildRemoteProtectionContext (cognitive 16) · ×1
  • buildRemoteProtectionContext (cognitive 16) server/services/fileManagerProtectedAreas.js:442 — buildRemoteProtectionContext has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (nesting depth added 3). Of this number, 9 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: ItemPicker.tsx ↔ VehiclePicker.tsx client/src/components/ItemPicker.tsx:1 — `client/src/components/ItemPicker.tsx` and `client/src/components/VehiclePicker.tsx` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `e89960da` fix(client): picker keys act where they start; picker tests can fail; `4b7553e1` fix(client): keep World Map's item and vehicle pickers inside the window; `7be495b3` fix(client): make CatalogItem.weight / CatalogVehicle.mass,seats opti… — run `git show` on any of them.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
IC1 · Incompleteness & stubs · Both branches are identical · ×1
  • Both branches are identical — the condition decides nothing client/src/pages/Debug.tsx:4832 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
IC1 · Incompleteness & stubs · Guard cannot change the result · ×1
  • Guard cannot change the result — returns what the code already falls through to REDACTED:1236 — The guard above `return false;` also returns `false`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 941 typed · 1341 plain JS — the untyped files are browser-extension/popup.js, REDACTED, build.js, client/scripts/de-lint.mjs, client/scripts/extract-pz-character-names.mjs, client/scripts/extract-pz-sandbox-ground-truth.mjs (+1335 more).
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (82 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (82 clone groups) client/src/components/WorkshopCollectionPanel.tsx:946 — 82 duplicated blocks under client/src/ have copies in at least two of the sibling directories components, hooks, lib, pages, types — 26 of them are reported below, and 56 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 82 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 82 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 82 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (36 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (36 clone groups) server/services/dockerClient.js:274 — 36 duplicated blocks under server/ have copies in at least two of the sibling directories database, routes, services, utils — 27 of them are reported below, and 9 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 36 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 36 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 36 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 10 sibling directories (18 clone groups) · ×1
  • Duplication concentrated across 10 sibling directories (18 clone groups) client/src/components/diagnostics/problemFixes.ts:150 — 18 duplicated blocks under client/src/components/ have copies in at least two of the sibling directories backups, bridge, dashboard, diagnostics, files, mods (+4 more sibling(s) not listed) — 11 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 18 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (14 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (14 clone groups) client/src/lib/leaderboardDiagnostics.ts:96 — 14 duplicated blocks under the repository root have copies in at least two of the sibling directories browser-extension, client, scripts, server — 10 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 14 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 14 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 14 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (234 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (234 matched lines × 2 locations) client/src/components/ItemPicker.tsx:278 — client/src/components/ItemPicker.tsx:278 · client/src/components/VehiclePicker.tsx:247 — the two spans are one implementation copied and then locally edited — 1357 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (135 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (135 matched lines × 2 locations) REDACTED:1484 — REDACTED:1484 · REDACTED:2009 — the two spans are one implementation copied and then locally edited — 711 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (108 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (108 matched lines × 2 locations) client/src/components/ItemPicker.tsx:102 — client/src/components/ItemPicker.tsx:102 · client/src/components/VehiclePicker.tsx:92 — the two spans are one implementation copied and then locally edited — 761 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (80 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (80 matched lines × 2 locations) client/src/pages/Events.tsx:2764 — client/src/pages/Events.tsx:2764 · client/src/pages/Events.tsx:2921 — the two spans are one implementation copied and then locally edited — 795 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (77 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (77 matched lines × 2 locations) client/src/components/WorkshopCollectionPanel.tsx:946 — client/src/components/WorkshopCollectionPanel.tsx:946 · REDACTED:7552 — the two spans are one implementation copied and then locally edited — 619 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (71 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (71 matched lines × 2 locations) REDACTED:4131 — REDACTED:4131 · REDACTED:5607 — the two spans are one implementation copied and then locally edited — 449 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (65 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (65 matched lines × 2 locations) client/src/components/ErrorBoundary.tsx:10 — client/src/components/ErrorBoundary.tsx:10 · client/src/components/FeatureErrorBoundary.tsx:23 — the two spans are one implementation copied and then locally edited — 368 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (53 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (53 matched lines × 2 locations) client/src/components/templates/CreateTemplateDialog.tsx:25 — client/src/components/templates/CreateTemplateDialog.tsx:25 · client/src/components/templates/ImportTemplateDialog.tsx:21 — the two spans are one implementation copied and then locally edited — 423 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (52 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (52 matched lines × 2 locations) REDACTED:9606 — REDACTED:9606 · REDACTED:9922 — the two spans are one implementation copied and then locally edited — 399 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (49 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (49 matched lines × 2 locations) REDACTED:4093 — REDACTED:4093 · REDACTED:5350 — the two spans are one implementation copied and then locally edited — 231 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (46 lines × 2 locations) · ×1
  • Duplicated block (46 lines × 2 locations) REDACTED:4609 — REDACTED:4609 · REDACTED:5794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (45 lines × 2 locations) · ×1
  • Duplicated block (45 lines × 2 locations) client/src/pages/ServerConfig.tsx:3788 — client/src/pages/ServerConfig.tsx:3788 · client/src/pages/ServerConfig.tsx:3835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (43 lines × 3 locations) · ×1
  • Duplicated block (43 lines × 3 locations) client/src/pages/Players.tsx:2733 — client/src/pages/Players.tsx:2733 · client/src/pages/Players.tsx:2785 · client/src/pages/Players.tsx:2829 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (42 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (42 matched lines × 2 locations) client/src/pages/Login.tsx:472 — client/src/pages/Login.tsx:472 · client/src/pages/Login.tsx:598 — the two spans are one implementation copied and then locally edited — 263 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (41 lines × 2 locations) · ×1
  • Duplicated block (41 lines × 2 locations) REDACTED:5761 — REDACTED:5761 · REDACTED:6040 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (40 lines × 2 locations) · ×1
  • Duplicated block (40 lines × 2 locations) REDACTED:5122 — REDACTED:5122 · REDACTED:5181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (38 lines × 2 locations) · ×1
  • Duplicated block (38 lines × 2 locations) REDACTED:3976 — REDACTED:3976 · REDACTED:4834 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (34 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (34 matched lines × 2 locations) client/src/lib/leaderboardDiagnostics.ts:96 — client/src/lib/leaderboardDiagnostics.ts:96 · server/services/leaderboardDiagnostics.js:46 — the two spans are one implementation copied and then locally edited — 288 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) server/services/logTailer.js:316 — server/services/logTailer.js:316 · server/services/logTailer.js:407 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (32 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (32 matched lines × 2 locations) scripts/jar-audit/classfile-parser.mjs:21 — scripts/jar-audit/classfile-parser.mjs:21 · scripts/jar-audit/constructor-bytecode.mjs:18 — the two spans are one implementation copied and then locally edited — 404 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function Settings (cyclomatic 382, cognitive 315) · ×1
  • Complex function Settings (cyclomatic 382, cognitive 315) REDACTED:370 — Settings has cyclomatic complexity 382 and cognitive complexity 315; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 265, cognitive 544) · ×1
  • Complex function (anonymous) (cyclomatic 265, cognitive 544) REDACTED:3451 — (anonymous) has cyclomatic complexity 265 and cognitive complexity 544; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Events (cyclomatic 256, cognitive 221) · ×1
  • Complex function Events (cyclomatic 256, cognitive 221) client/src/pages/Events.tsx:1082 — Events has cyclomatic complexity 256 and cognitive complexity 221; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Players (cyclomatic 245, cognitive 205) · ×1
  • Complex function Players (cyclomatic 245, cognitive 205) client/src/pages/Players.tsx:288 — Players has cyclomatic complexity 245 and cognitive complexity 205; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Dashboard (cyclomatic 220, cognitive 214) · ×1
  • Complex function Dashboard (cyclomatic 220, cognitive 214) client/src/pages/Dashboard.tsx:264 — Dashboard has cyclomatic complexity 220 and cognitive complexity 214; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 210, cognitive 261) · ×1
  • Complex function (anonymous) (cyclomatic 210, cognitive 261) client/src/lib/demo.ts:1665 — (anonymous) has cyclomatic complexity 210 and cognitive complexity 261; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Servers (cyclomatic 192, cognitive 164) · ×1
  • Complex function Servers (cyclomatic 192, cognitive 164) client/src/pages/Servers.tsx:334 — Servers has cyclomatic complexity 192 and cognitive complexity 164; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Discord (cyclomatic 154, cognitive 139) · ×1
  • Complex function Discord (cyclomatic 154, cognitive 139) client/src/pages/Discord.tsx:337 — Discord has cyclomatic complexity 154 and cognitive complexity 139; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function WorldMap (cyclomatic 147, cognitive 136) · ×1
  • Complex function WorldMap (cyclomatic 147, cognitive 136) client/src/pages/WorldMap.tsx:657 — WorldMap has cyclomatic complexity 147 and cognitive complexity 136; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ServerConfig (cyclomatic 141, cognitive 126) · ×1
  • Complex function ServerConfig (cyclomatic 141, cognitive 126) client/src/pages/ServerConfig.tsx:1011 — ServerConfig has cyclomatic complexity 141 and cognitive complexity 126; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function computeModHealth (cyclomatic 140, cognitive 237) · ×1
  • Complex function computeModHealth (cyclomatic 140, cognitive 237) server/utils/modHealth.js:168 — computeModHealth has cyclomatic complexity 140 and cognitive complexity 237; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 135, cognitive 203) · ×1
  • Complex function (anonymous) (cyclomatic 135, cognitive 203) REDACTED:1795 — (anonymous) has cyclomatic complexity 135 and cognitive complexity 203; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 121, cognitive 210) · ×1
  • Complex function (anonymous) (cyclomatic 121, cognitive 210) REDACTED:441 — (anonymous) has cyclomatic complexity 121 and cognitive complexity 210; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Debug (cyclomatic 121, cognitive 112) · ×1
  • Complex function Debug (cyclomatic 121, cognitive 112) client/src/pages/Debug.tsx:1028 — Debug has cyclomatic complexity 121 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function current (cyclomatic 117, cognitive 199) · ×1
  • Complex function current (cyclomatic 117, cognitive 199) client/src/pages/ChunkCleaner.tsx:1236 — current has cyclomatic complexity 117 and cognitive complexity 199; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 117, cognitive 177) · ×1
  • Complex function (anonymous) (cyclomatic 117, cognitive 177) client/src/pages/WorldMap.tsx:1734 — (anonymous) has cyclomatic complexity 117 and cognitive complexity 177; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function performRestart (cyclomatic 112, cognitive 178) · ×1
  • Complex function performRestart (cyclomatic 112, cognitive 178) server/services/scheduler.js:1946 — performRestart has cyclomatic complexity 112 and cognitive complexity 178; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function findServerErrors (cyclomatic 108, cognitive 208) · ×1
  • Complex function findServerErrors (cyclomatic 108, cognitive 208) server/utils/serverErrorFinder.js:763 — findServerErrors has cyclomatic complexity 108 and cognitive complexity 208; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Console (cyclomatic 97, cognitive 85) · ×1
  • Complex function Console (cyclomatic 97, cognitive 85) client/src/pages/Console.tsx:242 — Console has cyclomatic complexity 97 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 92, cognitive 116) · ×1
  • Complex function (anonymous) (cyclomatic 92, cognitive 116) server/routes/panelBridge.js:1584 — (anonymous) has cyclomatic complexity 92 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 90, cognitive 128) · ×1
  • Complex function (anonymous) (cyclomatic 90, cognitive 128) REDACTED:2014 — (anonymous) has cyclomatic complexity 90 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Files (cyclomatic 88, cognitive 70) · ×1
  • Complex function Files (cyclomatic 88, cognitive 70) client/src/pages/Files.tsx:187 — Files has cyclomatic complexity 88 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function decide (cyclomatic 84, cognitive 119) · ×1
  • Complex function decide (cyclomatic 84, cognitive 119) server/utils/modClassification.js:273 — decide has cyclomatic complexity 84 and cognitive complexity 119; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function checkForUpdates (cyclomatic 81, cognitive 140) · ×1
  • Complex function checkForUpdates (cyclomatic 81, cognitive 140) server/services/modChecker.js:1953 — checkForUpdates has cyclomatic complexity 81 and cognitive complexity 140; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 80, cognitive 76) · ×1
  • Complex function (anonymous) (cyclomatic 80, cognitive 76) client/src/pages/ServerConfig.tsx:390 — (anonymous) has cyclomatic complexity 80 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 77, cognitive 91) · ×1
  • Complex function (anonymous) (cyclomatic 77, cognitive 91) REDACTED:1410 — (anonymous) has cyclomatic complexity 77 and cognitive complexity 91; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getDiagnosticsFixAction (cyclomatic 77, cognitive 45) · ×1
  • Complex function getDiagnosticsFixAction (cyclomatic 77, cognitive 45) client/src/pages/Debug.tsx:390 — getDiagnosticsFixAction has cyclomatic complexity 77 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function solve (cyclomatic 72, cognitive 136) · ×1
  • Complex function solve (cyclomatic 72, cognitive 136) server/utils/modSmartSort.js:538 — solve has cyclomatic complexity 72 and cognitive complexity 136; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 71, cognitive 98) · ×1
  • Complex function (anonymous) (cyclomatic 71, cognitive 98) REDACTED:1489 — (anonymous) has cyclomatic complexity 71 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function TaskDialog (cyclomatic 68, cognitive 64) · ×1
  • Complex function TaskDialog (cyclomatic 68, cognitive 64) client/src/components/scheduler/TaskDialog.tsx:69 — TaskDialog has cyclomatic complexity 68 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ChunkCleaner (cyclomatic 68, cognitive 60) · ×1
  • Complex function ChunkCleaner (cyclomatic 68, cognitive 60) client/src/pages/ChunkCleaner.tsx:320 — ChunkCleaner has cyclomatic complexity 68 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function startServer (cyclomatic 67, cognitive 105) · ×1
  • Complex function startServer (cyclomatic 67, cognitive 105) REDACTED:2427 — startServer has cyclomatic complexity 67 and cognitive complexity 105; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 67, cognitive 96) · ×1
  • Complex function (anonymous) (cyclomatic 67, cognitive 96) client/src/pages/Debug.tsx:1340 — (anonymous) has cyclomatic complexity 67 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 66, cognitive 99) · ×1
  • Complex function (anonymous) (cyclomatic 66, cognitive 99) REDACTED:6122 — (anonymous) has cyclomatic complexity 66 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 63, cognitive 71) · ×1
  • Complex function (anonymous) (cyclomatic 63, cognitive 71) client/src/components/mods/healthText.ts:117 — (anonymous) has cyclomatic complexity 63 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Scheduler (cyclomatic 62, cognitive 60) · ×1
  • Complex function Scheduler (cyclomatic 62, cognitive 60) client/src/pages/Scheduler.tsx:112 — Scheduler has cyclomatic complexity 62 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 61, cognitive 58) · ×1
  • Complex function (anonymous) (cyclomatic 61, cognitive 58) client/src/pages/Mods.tsx:4917 — (anonymous) has cyclomatic complexity 61 and cognitive complexity 58; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 60, cognitive 93) · ×1
  • Complex function (anonymous) (cyclomatic 60, cognitive 93) REDACTED:8347 — (anonymous) has cyclomatic complexity 60 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 60, cognitive 77) · ×1
  • Complex function (anonymous) (cyclomatic 60, cognitive 77) REDACTED:474 — (anonymous) has cyclomatic complexity 60 and cognitive complexity 77; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function WorkshopCollectionSyncCard (cyclomatic 59, cognitive 49) · ×1
  • Complex function WorkshopCollectionSyncCard (cyclomatic 59, cognitive 49) REDACTED:6532 — WorkshopCollectionSyncCard has cyclomatic complexity 59 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 9852 lines of code REDACTED:1 — REDACTED has 9852 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 8141 lines of code REDACTED:1 — REDACTED has 8141 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 7566 lines of code REDACTED:1 — REDACTED has 7566 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/Debug.tsx · ×1
  • client/src/pages/Debug.tsx: 7202 lines of code client/src/pages/Debug.tsx:1 — client/src/pages/Debug.tsx has 7202 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 7142 lines of code REDACTED:1 — REDACTED has 7142 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/Mods.tsx · ×1
  • client/src/pages/Mods.tsx: 7017 lines of code client/src/pages/Mods.tsx:1 — client/src/pages/Mods.tsx has 7017 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 5170 lines of code REDACTED:1 — REDACTED has 5170 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/lib/serverConfigSchema.ts · ×1
  • client/src/lib/serverConfigSchema.ts: 5106 lines of code client/src/lib/serverConfigSchema.ts:1 — client/src/lib/serverConfigSchema.ts has 5106 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/lib/api.ts · ×1
  • client/src/lib/api.ts: 5104 lines of code client/src/lib/api.ts:1 — client/src/lib/api.ts has 5104 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/ServerConfig.tsx · ×1
  • client/src/pages/ServerConfig.tsx: 4710 lines of code client/src/pages/ServerConfig.tsx:1 — client/src/pages/ServerConfig.tsx has 4710 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/routes/panelBridge.js · ×1
  • server/routes/panelBridge.js: 4692 lines of code server/routes/panelBridge.js:1 — server/routes/panelBridge.js has 4692 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/WorldMap.tsx · ×1
  • client/src/pages/WorldMap.tsx: 4681 lines of code client/src/pages/WorldMap.tsx:1 — client/src/pages/WorldMap.tsx has 4681 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 3981 lines of code REDACTED:1 — REDACTED has 3981 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/Events.tsx · ×1
  • client/src/pages/Events.tsx: 3836 lines of code client/src/pages/Events.tsx:1 — client/src/pages/Events.tsx has 3836 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/Servers.tsx · ×1
  • client/src/pages/Servers.tsx: 3728 lines of code client/src/pages/Servers.tsx:1 — client/src/pages/Servers.tsx has 3728 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/Players.tsx · ×1
  • client/src/pages/Players.tsx: 3438 lines of code client/src/pages/Players.tsx:1 — client/src/pages/Players.tsx has 3438 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/services/panelUpdateChecker.js · ×1
  • server/services/panelUpdateChecker.js: 3364 lines of code server/services/panelUpdateChecker.js:1 — server/services/panelUpdateChecker.js has 3364 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/ChunkCleaner.tsx · ×1
  • client/src/pages/ChunkCleaner.tsx: 3349 lines of code client/src/pages/ChunkCleaner.tsx:1 — client/src/pages/ChunkCleaner.tsx has 3349 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/database/init.js · ×1
  • server/database/init.js: 3204 lines of code server/database/init.js:1 — server/database/init.js has 3204 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 3089 lines of code REDACTED:1 — REDACTED has 3089 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/services/scheduler.js · ×1
  • server/services/scheduler.js: 3041 lines of code server/services/scheduler.js:1 — server/services/scheduler.js has 3041 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 3000 lines of code REDACTED:1 — REDACTED has 3000 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 2787 lines of code REDACTED:1 — REDACTED has 2787 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 2531 lines of code REDACTED:1 — REDACTED has 2531 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/services/backupService.js · ×1
  • server/services/backupService.js: 2523 lines of code server/services/backupService.js:1 — server/services/backupService.js has 2523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 2487 lines of code REDACTED:1 — REDACTED has 2487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/services/modChecker.js · ×1
  • server/services/modChecker.js: 2444 lines of code server/services/modChecker.js:1 — server/services/modChecker.js has 2444 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/services/rcon.js · ×1
  • server/services/rcon.js: 2390 lines of code server/services/rcon.js:1 — server/services/rcon.js has 2390 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/Dashboard.tsx · ×1
  • client/src/pages/Dashboard.tsx: 2385 lines of code client/src/pages/Dashboard.tsx:1 — client/src/pages/Dashboard.tsx has 2385 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/Discord.tsx · ×1
  • client/src/pages/Discord.tsx: 2373 lines of code client/src/pages/Discord.tsx:1 — client/src/pages/Discord.tsx has 2373 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 2296 lines of code REDACTED:1 — REDACTED has 2296 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/lib/demo.ts · ×1
  • client/src/lib/demo.ts: 2229 lines of code client/src/lib/demo.ts:1 — client/src/lib/demo.ts has 2229 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/Backups.tsx · ×1
  • client/src/pages/Backups.tsx: 2159 lines of code client/src/pages/Backups.tsx:1 — client/src/pages/Backups.tsx has 2159 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/services/fileManagerSftpBackend.js · ×1
  • server/services/fileManagerSftpBackend.js: 2046 lines of code server/services/fileManagerSftpBackend.js:1 — server/services/fileManagerSftpBackend.js has 2046 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/services/fileManagerService.js · ×1
  • server/services/fileManagerService.js: 1962 lines of code server/services/fileManagerService.js:1 — server/services/fileManagerService.js has 1962 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · build.js · ×1
  • build.js: 1941 lines of code build.js:1 — build.js has 1941 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/Files.tsx · ×1
  • client/src/pages/Files.tsx: 1794 lines of code client/src/pages/Files.tsx:1 — client/src/pages/Files.tsx has 1794 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/components/mods/ConflictsPanel.tsx · ×1
  • client/src/components/mods/ConflictsPanel.tsx: 1714 lines of code client/src/components/mods/ConflictsPanel.tsx:1 — client/src/components/mods/ConflictsPanel.tsx has 1714 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · client/src/pages/Console.tsx · ×1
  • client/src/pages/Console.tsx: 1614 lines of code client/src/pages/Console.tsx:1 — client/src/pages/Console.tsx has 1614 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/services/bridgeDelivery.js · ×1
  • server/services/bridgeDelivery.js: 1578 lines of code server/services/bridgeDelivery.js:1 — server/services/bridgeDelivery.js has 1578 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
X13 · Undrained process stream · Redirected process stream is never drained (deadlock) · ×1
  • Redirected process stream is never drained (deadlock) server/services/panelUpdateChecker.js:1725 — `spawn` pipes `stdout` here — it is given no `stdio` option, or `'pipe'` — but nothing in this scope ever reads `child.stdout`, while `child.stderr` is read and the child's end is awaited. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to stdout (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles, the request never returns, and the stuck child holds its resources until something kills it. Consume both streams (`child.stdout.on('data', …)`, or `child.stdout.resume()` to discard it), or stop piping the one you do not want — `stdio: ['pipe', 'pipe', 'inherit']` or `'ignore'` in that slot.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×1
  • Recursive walk over a caller-supplied document has no depth cap client/src/components/mods/healthText.ts:21 — `canonicalFixParams` is exported and takes `value: unknown` from its caller, and it calls itself at line 21 (`canonicalFixParams`) with a piece of `value` (and at line 24) — and nowhere in `canonicalFixParams` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalFixParams` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×1
  • Swallowed exception (caught, then discarded) server/utils/embeddedClient.js:178 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Minor — 353 finding(s)
D10 · Test Quality · Mock-dominated test · ×97
  • Mock-dominated test: refuses before saving or stopping the active server server/tests/aioMultiServer.test.js:207 — This test sets up 7 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: writes Steam cookies through canonical secret storage instead of db.json server/tests/appSettingsRoute.test.js:81 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: passes an omitted or masked Steam cookie as unchanged during a partial update server/tests/appSettingsRoute.test.js:114 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: fails closed when server state cannot be verified server/tests/bugfixes.test.js:317 — This test sets up 5 test doubles (for example `vi .spyOn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: lets a remote server's config mutation through without probing local process state server/tests/bugfixes.test.js:345 — This test sets up 5 test doubles (for example `vi .spyOn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: treats a failed process scan as running when RCON is connected server/tests/containerShutdown.test.js:124 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: still creates the explicitly named server when the mount is ambiguous, without triggering the ambiguity refusal server/tests/discoveryRoute.test.js:253 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: applies the same bounded save to the native (non-Docker) branch too -- not a smaller version of the divergence this fixes server/tests/forceStopSaveOutcome.test.js:193 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: SERVER_START_STATE_UNKNOWN reaches the dashboard, and only a literal ignoreUnknownState: true is passed on server/tests/launchTargetEveryStart.test.js:674 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: an uncoded start failure keeps the plain-message shape server/tests/launchTargetEveryStart.test.js:706 — This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: activates an installed stopped service only after the direct process is confirmed stopped server/tests/linuxLifecycleRoutes.test.js:151 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: refuses to adopt a running direct process server/tests/linuxLifecycleRoutes.test.js:173 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: surfaces an installed-service ownership conflict server/tests/linuxLifecycleRoutes.test.js:190 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: startup grace period releases once real (monotonic) time exceeds startupGraceMs, even if Date.now() has stepped backward server/tests/modCheckerClockJump.test.js:71 — This test sets up 4 test doubles (for example `vi.spyOn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: an update handled on one server still restarts the next active server that has it server/tests/modCheckerRestartServerSwitch.test.js:98 — This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uploads commands to a temporary remote name before publishing them server/tests/panelBridgeSftp.test.js:296 — This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not attempt to delete a remote file that does not exist yet server/tests/panelBridgeSftpQueueStateUpload.test.js:128 — This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not attempt to upload the queue-state file when nothing has been persisted locally yet server/tests/panelBridgeSftpQueueStateUpload.test.js:168 — This test sets up 5 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: refuses the update and never calls downloadUpdate() when the process still reports running after quit() server/tests/panelUpdateDockerQuitNotConfirmedStopped.test.js:50 — This test sets up 5 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: proceeds to downloadUpdate() once the process confirms stopped on a later poll server/tests/panelUpdateDockerQuitNotConfirmedStopped.test.js:83 — This test sets up 5 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: a process scan that fails while waiting stays SERVER_STATE_UNKNOWN server/tests/panelUpdateDockerSaveFailedNextStep.test.js:141 — This test sets up 5 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: a single failed scan while the server exits doesn't call the update off server/tests/panelUpdateDockerSaveFailedNextStep.test.js:162 — This test sets up 5 test doubles (for example `vi .spyOn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: keeps waiting through a longer run of failed scans, within the wait's own budget server/tests/panelUpdateDockerSaveFailedNextStep.test.js:186 — This test sets up 5 test doubles (for example `vi .spyOn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not add the stopped-server notice when the download/apply actually succeeds server/tests/panelUpdateDockerStoppedServerNotice.test.js:104 — This test sets up 4 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uses managed lifecycle when an already-stopped server is container-owned server/tests/performRestartRefreshesLaunchTarget.test.js:115 — This test sets up 6 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • + 72 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×51
  • redundant comment client/src/components/SpawnBrowser.tsx:791 — "Icon for the row (item group icon, or vehicle type icon)" repeats the code it sits on: 6 of its 6 words (icon, row, item, group, vehicle, type) are already in `const Icon = isItem`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/components/mods/LoadOrderList.tsx:106 — "A dragged row (its index) or a dragged group block (its id)." repeats the code it sits on: 6 of its 6 words (dragged, row, index, group, block, id) are already in `const [dragged, setDragged] = useState<{ kind: 'row'; index: number } | { kind: 'block'; groupId: string } | null>(null)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/lib/__tests__/restoreOutcome.test.ts:81 — "The route's own failed-restore answer: { success: false, message }." repeats the code it sits on: 6 of its 7 words (failed, restore, answer, success, false, message) are already in `expect(restoreFailureKind(new ApiError('Restore failed', {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/lib/api.ts:372 — "Check if error is retryable" repeats the code it sits on: 3 of its 3 words (check, error, retryable) are already in `function isRetryableError(error: unknown, response?: Response): boolean`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Chat.tsx:191 — "ScrollArea (Radix) renders a viewport div with [data-radix-scroll-area-viewport]." repeats the code it sits on: 6 of its 7 words (scroll, area, radix, viewport, div, data) are already in `const root = chatEndRef.current?.closest('[data-radix-scroll-area-viewport]') as HTMLDivElement | null`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Console.tsx:73 — "Log line type → text color" repeats the code it sits on: 4 of its 5 words (log, type, text, color) are already in `const typeColors: Record<string, string> = {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Console.tsx:83 — "Log line type → badge color" repeats the code it sits on: 4 of its 5 words (log, type, badge, color) are already in `const typeBadgeColors: Record<string, string> = {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Debug.tsx:1201 — "Path editing state" repeats the code it sits on: 3 of its 3 words (path, editing, state) are already in `const [editingPaths, setEditingPaths] = useState(false);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Debug.tsx:1245 — "Fetch system info" repeats the code it sits on: 3 of its 3 words (fetch, system, info) are already in `const fetchSystemInfo = async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Debug.tsx:1264 — "Fetch health status" repeats the code it sits on: 3 of its 3 words (fetch, health, status) are already in `const fetchHealthStatus = async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Players.tsx:411 — "Add User states" repeats the code it sits on: 3 of its 3 words (add, user, states) are already in `const [addUserUsername, setAddUserUsername] = useState('')`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Players.tsx:421 — "SteamID Ban states" repeats the code it sits on: 4 of its 4 words (steam, id, ban, states) are already in `const [banSteamId, setBanSteamId] = useState('')`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Players.tsx:425 — "Voice Ban states" repeats the code it sits on: 3 of its 3 words (voice, ban, states) are already in `const [voiceBanUsername, setVoiceBanUsername] = useState('')`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Players.tsx:432 — "Player search filter" repeats the code it sits on: 3 of its 3 words (player, search, filter) are already in `const [playerSearchFilter, setPlayerSearchFilter] = useState('')`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/ServerConfig.tsx:2158 — "File browser: confirm selection" repeats the code it sits on: 4 of its 4 words (file, browser, confirm, selection) are already in `const confirmFileBrowserSelection = useCallback(() =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/ServerConfig.tsx:2880 — "Search results count" repeats the code it sits on: 3 of its 3 words (search, results, count) are already in `const searchResultsCount = useMemo(() =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:454 — "SteamCMD auto-download state" repeats the code it sits on: 4 of its 5 words (steam, cmd, download, state) are already in `const [downloadingSteamCmd, setDownloadingSteamCmd] = useState(false);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:2120 — "Full Install Step 1: SteamCMD" repeats the code it sits on: 4 of its 5 words (full, step, steam, cmd) are already in `const renderFullStep1 = () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Servers.tsx:534 — "Steam update/verify state" repeats the code it sits on: 4 of its 4 words (steam, update, verify, state) are already in `const [steamOperation, setSteamOperation] = useState<{ server: ServerInstance; type: 'update' | 'verify'; branch: string …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/Servers.tsx:1226 — "Select a detected server config" repeats the code it sits on: 4 of its 4 words (select, detected, server, config) are already in `const handleSelectServerConfig = (config: DetectedServer, result?: DetectResult) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment client/src/pages/__tests__/Mods.dialogsFitWindow.test.tsx:142 — "The unspaced map folder name wraps." repeats the code it sits on: 4 of its 5 words (map, folder, name, wraps) are already in `expect(within(body).getByText('RavenCreek_Expanded_Community_Edition_Map_Folder').className).toContain('[overflow-wrap:a …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:260 — 5 comments in this file only repeat the code they sit on (lines 260, 296, 342, 5167, 5170), for example "Stop player polling". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:291 — "Get list of backups" repeats the code it sits on: 3 of its 3 words (get, list, backups) are already in `router.get("/list", requireAnyBackupCapability, async (req, res) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment server/routes/panelBridge.js:1965 — "Get server info" repeats the code it sits on: 3 of its 3 words (get, server, info) are already in `router.get("/server-info", requirePermission("players.view"), async (req, res) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment server/routes/panelBridge.js:4249 — "Clear zombies near a player" repeats the code it sits on: 4 of its 4 words (clear, zombies, near, player) are already in `router.post("/zombies/clear-near-player", requirePermission("server.world_events"), async (req, res) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • + 26 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate server/services/backupDiskSpace.js:44 — `!Number.isFinite(sourceBytes) || sourceBytes <= 0` appears character-identically in 2 files — server/services/backupDiskSpace.js, server/services/backupService.js. 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 server/routes/panelBridge.js:1264 — `!Number.isInteger(port) || port < 1 || port > 65535` appears character-identically in 4 files — server/routes/panelBridge.js, server/services/panelBridgeSftp.js, server/services/remoteConfigFiles.js, server/utils/stoppedEvidence.js. 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 client/src/components/mods/useModHealth.ts:38 — `!aliveRef.current || seq !== seqRef.current` appears character-identically in 2 files — client/src/components/mods/useModHealth.ts, client/src/components/mods/useOrderRules.ts. 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 client/src/pages/Events.tsx:2404 — `!bridgeStatusLoading && !bridgeConnected` appears character-identically in 2 files — client/src/pages/Events.tsx, client/src/pages/Leaderboard.tsx. 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 server/services/serverCapacity.js:50 — `!configPath || !serverName || typeof serverName !== "string" || path.basename(serverName) !== serverName || serverName.includes("..")` appears character-identically in 2 files — server/services/serverCapacity.js, server/utils/discordMessageRedaction.js. 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 server/services/zomboidDataPath.js:231 — `!configured || !path.isAbsolute(configured)` appears character-identically in 2 files — server/services/zomboidDataPath.js, server/utils/serverConfigPath.js. 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 server/routes/docker.js:59 — `!dockerClient?.enabled || !dockerClient.available` appears character-identically in 2 files — server/routes/docker.js, server/services/managedContainer.js. 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 client/src/components/mods/ConflictsPanel.tsx:1307 — `!force && depSearchData[key] && !depSearchData[key].error` appears character-identically in 2 files — client/src/components/mods/ConflictsPanel.tsx, client/src/pages/Mods.tsx. 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 server/services/otherServerLifecycle.js:342 — `!forced?.success || forced.confirmed === false` appears character-identically in 3 files — server/services/otherServerLifecycle.js, server/services/scheduler.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate client/src/lib/modVariants.ts:43 — `!from || !to || from === to || !catalog.has(from) || !catalog.has(to)` appears character-identically in 2 files — client/src/lib/modVariants.ts, server/utils/modLoadOrder.js. 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 server/routes/panelBridge.js:1261 — `!host || host.length > 253 || /[\s/\\]/.test(host)` appears character-identically in 3 files — server/routes/panelBridge.js, server/services/panelBridgeSftp.js, server/services/remoteConfigFiles.js. 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 REDACTED:99 — `!line || line.startsWith("#") || !line.includes("=")` appears character-identically in 2 files — REDACTED, server/utils/iniGameView.js. 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 server/utils/backupRestartOverlap.js:56 — `!minutes || !hours || !doms || !months || !dows` appears character-identically in 2 files — server/utils/backupRestartOverlap.js, server/utils/cronNextRun.js. 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 REDACTED:2630 — `!processDetails || processDetails.scanFailed` appears character-identically in 3 files — REDACTED, REDACTED, server/utils/serverStatus.js. 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 REDACTED:345 — `!req.body || typeof req.body !== "object" || Array.isArray(req.body)` appears character-identically in 2 files — REDACTED, server/routes/files.js. 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 REDACTED:152 — `!req.body || typeof req.body !== 'object' || Array.isArray(req.body)` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate client/src/components/mods/GroupSections.tsx:143 — `!row.collapsed && 'rotate-90 rtl:-rotate-90'` appears character-identically in 2 files — client/src/components/mods/GroupSections.tsx, client/src/components/mods/LoadOrderList.tsx. 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 REDACTED:448 — `!settings || typeof settings !== "object"` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:674 — `!trimmed || trimmed.startsWith("#") || trimmed.startsWith(";")` appears character-identically in 4 files — REDACTED, REDACTED, server/services/mountDiscovery.js, server/utils/iniSecretLines.js. 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 server/services/panelBridgeSftp.js:152 — `!username || username.length > 128 || /[\r\n]/.test(username)` appears character-identically in 2 files — server/services/panelBridgeSftp.js, server/services/remoteConfigFiles.js. 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 REDACTED:441 — `(typeof id === "string" && id.trim() !== "" && id.length <= 100) || Number.isSafeInteger(id)` appears character-identically in 3 files — REDACTED, REDACTED, server/services/backupService.js. 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 server/utils/modGroups.js:358 — `/[\r\n;=]/.test(id) || hasControlCharacters(id)` appears character-identically in 2 files — server/utils/modGroups.js, server/utils/modOrderRules.js. 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 REDACTED:3049 — `Array.isArray(role?.capabilities) && role.capabilities.includes(capability)` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate server/database/init.js:2297 — `Boolean(installPath && fs.existsSync(installPath)) || Boolean(zomboidDataPath && fs.existsSync(zomboidDataPath))` appears character-identically in 2 files — server/database/init.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate client/src/components/ItemPicker.tsx:177 — `GROUP_META[group] || GROUP_META['Other']` appears character-identically in 2 files — client/src/components/ItemPicker.tsx, client/src/components/SpawnBrowser.tsx. 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.
  • + 15 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging REDACTED:206 — `error` at line 206 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:257 — `info` at line 257 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:434 — `warn` at line 434 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:444 — `info` at line 444 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:467 — `warn` at line 467 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:706 — `info` at line 706 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:855 — `warn` at line 855 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:939 — `error` at line 939 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:962 — `error` at line 962 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1000 — `error` at line 1000 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1004 — `error` at line 1004 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1017 — `info` at line 1017 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1020 — `error` at line 1020 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1139 — `warn` at line 1139 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1235 — `warn` at line 1235 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1632 — `debug` at line 1632 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1648 — `info` at line 1648 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1651 — `warn` at line 1651 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1658 — `debug` at line 1658 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1666 — `info` at line 1666 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1669 — `warn` at line 1669 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1735 — `debug` at line 1735 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1829 — `debug` at line 1829 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1845 — `debug` at line 1845 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging REDACTED:1897 — `warn` at line 1897 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×35
  • Silent fallback default in catch build.js:60 — `resolveBuildSha` swallows every exception into `return "unknown"` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch client/src/lib/trustedDevice.ts:41 — `readAll` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch client/src/lib/demo.ts:646 — `readJsonBody` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch client/src/pages/Login.tsx:37 — `readDeviceFailureCount` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch client/src/components/SpawnBrowser.tsx:58 — `loadRecent` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch client/src/components/mods/groupPlacementMigration.ts:17 — `readLegacyPlacements` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch client/src/lib/dateFormat.ts:58 — `getDateFormatPref` swallows every exception into `return 'auto'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/utils/savesFolder.js:32 — `listWorldFolders` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/services/adminPasswordLaunch.js:55 — `readApplied` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/utils/nativeLibraryPaths.js:319 — `listPzLibraries` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/utils/zomboidPaths.js:210 — `holdsSaveFiles` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/services/zomboidDataPath.js:195 — `holdsOnlyFolders` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/services/zomboidDataPath.js:356 — `listNames` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/utils/configBackup.js:103 — `listBackupsFor` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/services/permissions.js:783 — `getActingCapabilities` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/services/bridgeDisk.js:69 — `readDirNames` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/services/bridgeDisk.js:109 — `readHead` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/services/bridgeDelivery.js:192 — `resolveBridgeIniPath` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/services/bridgeDelivery.js:206 — `readLauncherHead` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:3046 — `holdsFilesManage` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:155 — `firefoxProfilePaths` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/utils/modContentProfile.js:188 — `listDir` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/services/modSmartContext.js:226 — `hardOrderEdges` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:3454 — `listServersRootEntries` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/services/panelUpdateChecker.js:1177 — `findStagedFileOnDisk` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • + 10 more in this group — see findings.md.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×14
  • Diagnostic log message is built whether or not it is wanted server/services/modChecker.js:649 — `debug` at line 649 is called with an argument built by `installPaths.join(" or ")` (line 649), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted server/services/modSteamKnowledge.js:576 — `debug` at line 576 is called with an argument built by `safeMessage(err)` (line 576), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted server/services/modSteamKnowledge.js:585 — `debug` at line 585 is called with an argument built by `safeMessage(err)` (line 585), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted server/services/modSteamKnowledge.js:628 — `debug` at line 628 is called with an argument built by `safeMessage(err)` (line 628), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted server/services/modSteamKnowledge.js:719 — `debug` at line 719 is called with an argument built by `safeMessage(err)` (line 719), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted server/services/modSteamKnowledge.js:854 — `debug` at line 854 is called with an argument built by `safeMessage(err, secret)` (line 854), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted server/services/modSteamKnowledge.js:1156 — `debug` at line 1156 is called with an argument built by `safeMessage(err)` (line 1156), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted server/services/modSteamKnowledge.js:1179 — `debug` at line 1179 is called with an argument built by `safeMessage(err)` (line 1179), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted server/services/modSteamKnowledge.js:1212 — `debug` at line 1212 is called with an argument built by `safeMessage(err)` (line 1212), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted server/services/modSteamKnowledge.js:1220 — `debug` at line 1220 is called with an argument built by `safeMessage(err)` (line 1220), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted REDACTED:920 — `debug` at line 920 is called with an argument built by `JSON.stringify(args)` (line 920), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted REDACTED:2791 — `debug` at line 2791 is called with an argument built by `args.join(" ")` (line 2792), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted REDACTED:3186 — `debug` at line 3186 is called with an argument built by `errors.join("; ")` (line 3187), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted REDACTED:7486 — `debug` at line 7486 is called with an argument built by `map((m) => m.id)` (line 7487), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
P2 · Observability · Console output used as the logging channel · ×9
  • Console output used as the logging channel REDACTED:168 — `REDACTED` reports through `console.*` at line 168 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel server/utils/paths.js:64 — `server/utils/paths.js` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel server/utils/paths.js:93 — `server/utils/paths.js` reports through `console.*` at line 93 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel docker/all-in-one/updater/server.js:148 — `docker/all-in-one/updater/server.js` reports through `console.*` at line 148 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel docker/all-in-one/updater/server.js:150 — `docker/all-in-one/updater/server.js` reports through `console.*` at line 150 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel docker/all-in-one/updater/server.js:186 — `docker/all-in-one/updater/server.js` reports through `console.*` at line 186 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel docker/all-in-one/updater/server.js:191 — `docker/all-in-one/updater/server.js` reports through `console.*` at line 191 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel docker/all-in-one/updater/server.js:201 — `docker/all-in-one/updater/server.js` reports through `console.*` at line 201 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel docker/all-in-one/updater/server.js:235 — `docker/all-in-one/updater/server.js` reports through `console.*` at line 235 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
IC1 · Incompleteness & stubs · Disabled test · ×4
  • Disabled test server/tests/errorCodeRegistry.test.js:363 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/tests/errorCodeRegistry.test.js:369 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/tests/extensionBundleCurrentCopy.test.js:221 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/tests/supervisor-restart.test.js:1650 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
X7 · Silent fallback defaults · Pending state with no failure state · ×4
  • Pending state with no failure state client/src/components/mods/ConflictSuggestionsBar.tsx:79 — The view draws `<Loader2 class="animate-spin" aria-hidden="true"/>` under `progress`, but `progress` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state client/src/components/mods/ItemInsights.tsx:90 — The view draws `<Loader2 class="animate-spin" aria-hidden="true"/>` under `adding === requirement . workshopId`, but `adding` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state client/src/components/dashboard/ServersOverview.tsx:311 — The view draws `<Loader2 class="h-3 w-3 animate-spin" aria-hidden="true"/>` under `pending ?. id === id && pending . action === action`, but `pending` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state client/src/components/dashboard/ServersOverview.tsx:477 — The view draws `<Loader2 class="h-3 w-3 animate-spin" aria-hidden="true"/>` under `switching === id`, but `switching` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
GD1 · Unfinished & placeholder code · Placeholder literal left in code · ×3
  • Placeholder literal left in code server/services/passwordPolicy.js:41 — A placeholder string ("changeme") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code server/services/rcon.js:163 — A placeholder string ("CHANGE_ME") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code server/utils/resetTokenStrength.js:626 — A placeholder string ("changeme") is still in shipped code — typical of generated boilerplate that was never filled in.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×2
  • Projects may be oversized for their cohesion package.json:1 — `(repository root)` (149300 LoC, 301 module-visible types across 15 directories) overshoots its size bounds. 2 of 2 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion client/package.json:1 — `client` (121242 LoC, 781 module-visible types across 19 directories) overshoots its size bounds. 2 of 2 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D12 · Dependency Hygiene · Deprecated · ×1
  • Deprecated: prebuild-install package-lock.json:5524 — prebuild-install 7.1.3 is resolved in package-lock.json and is marked deprecated by its publisher: "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 1 of 432 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 432 of the 553 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: server/utils/diskSpace.js. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D34 · Knowledge Freshness · Orphaned file · ×1
  • Orphaned file server/utils/diskSpace.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · ADRs not easily discoverable · ×1
  • ADRs not easily discoverable — 1 ADR-shaped document(s) detected by content — `ARCHITECTURE.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate REDACTED:191 — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
R7 · Dead Code · Unused export 'SEVERITY_ORDER' · ×1
  • Unused export 'SEVERITY_ORDER' client/src/components/diagnostics/problemFixes.ts:187 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'childPath' · ×1
  • Unused export 'childPath' client/src/components/files/filesUi.ts:248 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'VIRTUALIZE_ROWS_AT' · ×1
  • Unused export 'VIRTUALIZE_ROWS_AT' client/src/components/mods/VirtualRows.tsx:6 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SmartText' · ×1
  • Unused export 'SmartText' client/src/components/mods/smartText.ts:152 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'AGE_UNITS' · ×1
  • Unused export 'AGE_UNITS' client/src/components/mods/smartText.ts:154 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SmartMods' · ×1
  • Unused export 'SmartMods' client/src/components/mods/useSmartMods.ts:123 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'useCapability' · ×1
  • Unused export 'useCapability' client/src/contexts/AuthContext.tsx:399 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'switchActionFor' · ×1
  • Unused export 'switchActionFor' client/src/lib/bridgeDeliveryView.ts:173 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'hasMethod' · ×1
  • Unused export 'hasMethod' scripts/jar-audit/classfile-parser.mjs:217 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_IMAGE_BYTES' · ×1
  • Unused export 'MAX_IMAGE_BYTES' scripts/workshop/lib.mjs:20 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'BRIDGE_CODE_FILES' · ×1
  • Unused export 'BRIDGE_CODE_FILES' scripts/workshop/lib.mjs:49 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'hasStartBlockingSteamOperation' · ×1
  • Unused export 'hasStartBlockingSteamOperation' server/services/activeSteamOperations.js:110 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'AUTO_START_RETRY_DELAYS_MS' · ×1
  • Unused export 'AUTO_START_RETRY_DELAYS_MS' REDACTED:330 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CHECK_INTERVAL_MS' · ×1
  • Unused export 'CHECK_INTERVAL_MS' server/services/diskMonitor.js:7 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'createLocalBackend' · ×1
  • Unused export 'createLocalBackend' server/services/fileManagerLocalBackend.js:1524 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'registerBackend' · ×1
  • Unused export 'registerBackend' server/services/fileManagerRoots.js:30 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getBackendFactory' · ×1
  • Unused export 'getBackendFactory' server/services/fileManagerRoots.js:35 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'UPDATES_INTERVAL_MS' · ×1
  • Unused export 'UPDATES_INTERVAL_MS' server/services/otherServerUpdates.js:25 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'LATEST_BUILD_TTL_MS' · ×1
  • Unused export 'LATEST_BUILD_TTL_MS' server/services/otherServerUpdates.js:28 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'assertNewPasswordPolicy' · ×1
  • Unused export 'assertNewPasswordPolicy' server/services/passwordPolicy.js:104 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PLAYERS_WATCH_INTERVAL_MS' · ×1
  • Unused export 'PLAYERS_WATCH_INTERVAL_MS' server/services/serverPlayersWatch.js:23 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'WATCH_INTERVAL_MS' · ×1
  • Unused export 'WATCH_INTERVAL_MS' server/services/serverWatch.js:28 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CRASH_RESTART_DELAY_MS' · ×1
  • Unused export 'CRASH_RESTART_DELAY_MS' server/services/serverWatch.js:34 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CRASH_RESTART_BUSY_POLL_MS' · ×1
  • Unused export 'CRASH_RESTART_BUSY_POLL_MS' server/services/serverWatch.js:45 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CRASH_RESTART_BUSY_WAIT_MS' · ×1
  • Unused export 'CRASH_RESTART_BUSY_WAIT_MS' server/services/serverWatch.js:46 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'fingerprintOf' · ×1
  • Unused export 'fingerprintOf' server/services/sftpHostKeys.js:38 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'WORKSHOP_DOWNLOAD_TIMEOUT_MS' · ×1
  • Unused export 'WORKSHOP_DOWNLOAD_TIMEOUT_MS' REDACTED:20 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getContainerInfo' · ×1
  • Unused export 'getContainerInfo' server/utils/dockerDetect.js:26 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getEmbeddedPanelBridgeVersion' · ×1
  • Unused export 'getEmbeddedPanelBridgeVersion' server/utils/embeddedLua.js:25 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'EXTRA_JVM_ARGS_MAX_LENGTH' · ×1
  • Unused export 'EXTRA_JVM_ARGS_MAX_LENGTH' server/utils/extraJvmArgs.js:11 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'HOST_PATH_FIELDS' · ×1
  • Unused export 'HOST_PATH_FIELDS' server/utils/hostPathView.js:19 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'FILE_CACHE_MAX_ENTRIES' · ×1
  • Unused export 'FILE_CACHE_MAX_ENTRIES' server/utils/modConflictRules.js:81 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'conflictFileCacheSize' · ×1
  • Unused export 'conflictFileCacheSize' server/utils/modConflictRules.js:165 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'HEALTH_SEVERITIES' · ×1
  • Unused export 'HEALTH_SEVERITIES' server/utils/modHealth.js:46 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SCAN_RETRY_DELAY_MS' · ×1
  • Unused export 'SCAN_RETRY_DELAY_MS' server/utils/processScanRetry.js:18 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'FINDING_SEVERITIES' · ×1
  • Unused export 'FINDING_SEVERITIES' server/utils/serverErrorFinder.js:43 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'FINDING_CATEGORIES' · ×1
  • Unused export 'FINDING_CATEGORIES' server/utils/serverErrorFinder.js:44 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PROCESS_SCAN_FAILURES_FOR_FINDING' · ×1
  • Unused export 'PROCESS_SCAN_FAILURES_FOR_FINDING' server/utils/serverErrorFinder.js:596 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'FINDING_KINDS' · ×1
  • Unused export 'FINDING_KINDS' server/utils/serverErrorFinder.js:598 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'QUIET_AFTER_FINISHED_MS' · ×1
  • Unused export 'QUIET_AFTER_FINISHED_MS' server/utils/stoppedEvidence.js:24 — Nothing imports this binding — it is safe to review for removal.
R8 · Dependency Hygiene · Test-only dependency 'bcryptjs' in production deps · ×1
  • Test-only dependency 'bcryptjs' in production deps package.json:39 — Only test files import it (first: server/tests/authSessionLifecycle.test.js:2) — move it to devDependencies.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 21/29 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~0.6 `!` null assertions per 1k TypeScript source lines — 70 assertion(s) across the 126587 source line(s) of the 302 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: client/src/components/mods/ConflictsPanel.tsx (15), client/src/pages/WorldMap.tsx (12), client/src/lib/demoSmart.ts (11). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. 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.
Minor — 148 finding(s)
D10 · Test Quality · Skipped (documented) · ×134
  • Skipped (documented): (unnamed test) server/tests/adminPasswordOutOfScripts.test.js:114 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/backupOwnershipCaseInsensitive.test.js:131 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/backupOwnershipCaseInsensitive.test.js:143 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/backupRestoreSafety.test.js:537 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/backupRestoreStagingDir.test.js:60 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/backupRestoreStagingDir.test.js:76 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/bridgeDeliveryApply.test.js:492 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/bridgeDisk.test.js:127 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/bridgeDisk.test.js:138 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/browseRootsSymlinkEscape.test.js:93 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/changelogWorkshopRelease.test.js:28 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) server/tests/chunksBrowse.test.js:141 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/chunksBrowse.test.js:152 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/chunksBrowse.test.js:164 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/crashLogsListedOnly.test.js:201 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/crashLogsListedOnly.test.js:370 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): matches the real client/dist/index.html shipped with this repo, if it has been built server/tests/cspScriptHash.test.js:43 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): (unnamed test) server/tests/dataFolderMapCleanupShapes.test.js:338 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/dataFolderMapCleanupShapes.test.js:406 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/dataFolderMapCleanupShapes.test.js:423 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): refuses a symbolic link named x.log pointing at a secret server/tests/debugLogDownloadListedOnly.test.js:119 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): (unnamed test) server/tests/debugLogScanOpenFirst.test.js:69 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) server/tests/diagnosticsJavaProbeUntrusted.test.js:109 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): replaces a link standing in for a file instead of writing through it server/tests/extensionBundleCurrentCopy.test.js:211 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): (unnamed test) server/tests/fileManagerLocalBackend.test.js:120 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • + 109 more in this group — see findings.md.
D12 · Dependency Hygiene · Outdated (npm) · ×12
  • Outdated (npm): dotenv — dotenv is pinned at 16.6.1; registry.npmjs.org publishes 18.0.10 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): express-rate-limit — express-rate-limit is pinned at 8.7.3; registry.npmjs.org publishes 8.7.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): i18next — i18next is pinned at 26.7.1; registry.npmjs.org publishes 27.1.5 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): lucide-react — lucide-react is pinned at 0.577.0; registry.npmjs.org publishes 1.74.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): openid-client — openid-client is pinned at 6.8.9; registry.npmjs.org publishes 6.9.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): react — react is pinned at 18.3.1; registry.npmjs.org publishes 19.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): react-dom — react-dom is pinned at 18.3.1; registry.npmjs.org publishes 19.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): react-i18next — react-i18next is pinned at 17.1.12; registry.npmjs.org publishes 18.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): sql.js — sql.js is pinned at 1.15.2; registry.npmjs.org publishes 1.16.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): tailwind-merge — tailwind-merge is pinned at 2.6.1; registry.npmjs.org publishes 3.7.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): undici — undici is pinned at 8.12.3; registry.npmjs.org publishes 8.12.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): uuid — uuid is pinned at 13.0.2; registry.npmjs.org publishes 14.0.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
D24 · Comment Value · doc comments repeat the names · ×2
  • doc comments repeat the names server/services/backupService.js:1799 — 3 of 102 documented parameters and 5 of 1398 summaries in `pz-server-manager` only repeat the member or parameter name (e.g. "Delete a backup" for `deleteBackup`). Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names client/src/lib/weatherUnits.ts:24 — 0 of 0 documented parameters and 1 of 692 summaries in `pz-server-manager-client` only repeat the member or parameter name (e.g. "A slider step of 5% of its range (at least 1)." for `sliderStepForRange`). Delete the restating tags, or add what the name does not say.

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-5e371aa623394ebe8c5d0d1c6cc411ca/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-5e371aa623394ebe8c5d0d1c6cc411ca/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=2697" --report-format json --report-path /tmp/watchdog-gitleaks-5e371aa623394ebe8c5d0d1c6cc411ca/history-2.json --exit-code 0 --source .7artifacts/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-5e371aa623394ebe8c5d0d1c6cc411ca/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .171artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .9artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 11 file(s) — `client/src/App.tsx`, `client/src/components/Layout.tsx`, `client/src/lib/api.ts`, `client/src/pages/Events.tsx`, `client/src/pages/Mods.tsx`, … (+6 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1ea14-0cda-738c-b99f-d17ff63af1d5 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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