Public report — copyparty, published 26 Sep 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.09.15 (frozen) · verify this surveyFiledcd_91598c97075e4a56a672cf1aeba9128a
Filed 26 September 2026, 16:24 UTC
Public
Medium · 80,144 LoC · rebuild ~0.5 person-years · weakest lens: Code Health (16%)
Findings by grade
65 critical954 serious17 minor42 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 September 2026, 16:09 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
1026findings with an exact file:lineof 1036 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
43/126dimensions across the health lenses80144 LoC — wide & deep
⚠ A critical security finding caps this grade — resolve it before relying on the score below; see the Security lens.
The system is at risk, scoring 28% overall. While the architecture is sound, the code quality is critically low, creating a fragile foundation for a medium-sized asset. This imbalance means that while the structure can hold, the daily work to maintain and extend it is unnecessarily difficult, expensive, and error-prone. The business faces a significant drag on delivery speed and increased operational costs due to this technical debt.
The primary risk is concentrated in the code health, which sits at a mere 16%. This is not a minor issue; it acts as a velocity tax on every change. Modifications in these weak areas likely cost 9–20% more time and effort than they should, compounding with every release. The cost of inaction is substantial, with annual drag estimated to exceed the one-time cost of remediation within months. This inefficiency directly impacts the team’s ability to deliver new features quickly and reliably, tying up engineering resources in maintenance rather than innovation.
A second theme is the lack of modern tooling in the frontend. With no type checking in place, the system is exposed to runtime errors and integration issues that static analysis would catch early. This absence of safety nets increases the likelihood of defects reaching production, raising support costs and potentially affecting customer trust. The frontend, comprising a significant portion of the codebase, is currently operating without the guardrails necessary for stable, long-term growth.
Despite these risks, the architecture scores well at 75%, indicating that the high-level design is robust and changes do not ripple uncontrollably. This provides a stable base upon which to build improvements. However, the low code health and missing frontend type safety undermine this strength by making it harder to leverage the architecture effectively.
The highest-leverage action is to adopt TypeScript for the frontend. Adding a type-checking step to the build process is a low-effort, high-impact move that will immediately reduce defects and improve developer confidence. This should be prioritized above other refactoring efforts, as it pays for itself quickly by reducing the annual drag on engineering productivity. Focus here first to unlock faster, safer delivery.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Raise Code Health 16 → 70 (the Healthy floor) ⇒ headline 28 → ~39.
Code composition — where the lines go
Tests 100%
New since the last scan (100+)
956 finding(s) are new versus the previous scan (2026-08-07) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
0.7× (at 28% quality) — the last 20% of quality is most of the work
Size & shape
Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~0.5 person-years of build effort (about ~€71,000 to rebuild). Its weakest lens is Code Health at 16% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Value concentrated against a weak lens · High · Value at risk
This is a Medium asset (~0.5 person-years to rebuild), and its weakest lens is Code Health at 16%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Code Health first — highest risk-reduction per euro on an asset this size.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 4.4–26.2 engineer-days every year, paid as drag on the ~19,191 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–27 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 9–20% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 4,732 line(s) changed over a 90-day window ⇒ ~19,191/year · D1/D2/D4 code quality: averaging 4.4/10 ⇒ a 9–20% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 27 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 4.4/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 9–20% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 4.4/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
80 modules, 24 dependencies. Every dependency points down the layering — no cycles.
Showing the 40 most-connected modules; 40 more are not drawn.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
copyparty.stolen.dnslib.label uses copyparty.stolen.dnslib.buffer. Changing copyparty.stolen.dnslib.buffer can break copyparty.stolen.dnslib.label, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→20 copyparty.stolen.ifaddr depends on copyparty.stolen.ifaddr._win32✕
Type pairs
1 distinct (type in copyparty.stolen.ifaddr → type in copyparty.stolen.ifaddr._win32) reference.
copyparty.stolen.ifaddr uses copyparty.stolen.ifaddr._win32. Changing copyparty.stolen.ifaddr._win32 can break copyparty.stolen.ifaddr, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→17 copyparty.sutil depends on copyparty.authsrv✕
Type pairs
1 distinct (type in copyparty.sutil → type in copyparty.authsrv) reference.
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 category
Findings
Severity
A05:2021 — Security Misconfiguration
60
High / Critical
A03:2021 — Injection
45
High / Critical
A02:2021 — Cryptographic Failures
4
High / Critical
Roadmap
Begin by establishing type safety in the frontend through a new build-time check or incremental conversion of high-traffic modules. Simultaneously, reduce maintenance burden by splitting large files into focused modules, breaking down overly complex functions, and removing dead code to eliminate unnecessary maintenance costs. Finally, implement a CI/CD pipeline to automatically build the project and run tests on every change, ensuring these improvements are sustained.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Run what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
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 — 65
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 — 954
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 — 17
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 42
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
Watchdog 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. 41 of 43 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 2 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 43 dimensions across the health lenses
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
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, 1026 of 1036 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.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D12 Dependency Hygiene — not measured this run — Watchdog 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. Not scored — 1 shipped Python distribution(s) were read, but the outdated signal needs pypi.org, and no declaration here carries an exact pin to ask about — a floor or a range installs the newest release it admits and cannot be behind one, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
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 (125 contributor(s) across 4807 commit(s) sampled, automation and bot accounts excluded). One of them holds 94% of the history; the other 124 hold 0% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D19 Documentation Quality — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
D22 Internal API Consistency — not measured this run — Watchdog 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 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
AX3 Project dependency cycles — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which project references which. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj files only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. Its modules are declared as: Python distributions (pyproject.toml, REDACTED, setup.cfg). A reader for that graph is the collector this check is missing. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
AX4 Dependency direction — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the direction each project reference points. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj files only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. Its modules are declared as: Python distributions (pyproject.toml, REDACTED, setup.cfg). A reader for that graph is the collector this check is missing. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AX8 Test isolation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which projects are test projects, and what they reference. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj files only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. Its modules are declared as: Python distributions (pyproject.toml, REDACTED, setup.cfg). A reader for that graph is the collector this check is missing. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
C1 Data Protection — not measured this run — Watchdog 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — Watchdog 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. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — Watchdog 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. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — Watchdog 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. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — Watchdog 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. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
ED5 Idempotency — not measured this run — Watchdog 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 finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
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.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
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").
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.
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.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (2): D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
255 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was up2k.up2k_init at 678. A further 2 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 (anonymous)::onclick at 23 — they are counted neither in the figure above nor in this dimension's score.
+ 184 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 27 (anonymous) finding(s) in Cyclomatic Complexity — start with browser.js (20), baguettebox.js (4), REDACTED. — One of this dimension's main actionable groups (27 warning-level).
Resolve the 11 up2k_init finding(s) in Cyclomatic Complexity — start with up2k.js (11). — One of this dimension's main actionable groups (11 warning-level).
Resolve the 2 u2c.main (cyclomatic 46) finding(s) in Cyclomatic Complexity — start with u2c.py (2). — One of this dimension's main actionable groups (2 warning-level).
Stand up a CI pipeline, then gate Cyclomatic Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 272 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 43 (anonymous) finding(s) in Cognitive Complexity — start with browser.js (34), baguettebox.js (5), REDACTED (2). — One of this dimension's main actionable groups (43 warning-level).
Resolve the 14 up2k_init finding(s) in Cognitive Complexity — start with up2k.js (14). — One of this dimension's main actionable groups (14 warning-level).
Resolve the 3 CPPF.read (cognitive 17) finding(s) in Cognitive Complexity — start with partyfuse.py (2), partyfuse-streaming.py. — One of this dimension's main actionable groups (3 warning-level).
Stand up a CI pipeline, then gate Cognitive Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.0 / 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.
Resolve the 19 FileTooLong finding(s) in God Classes — start with browser.js, REDACTED, REDACTED. — One of this dimension's main actionable groups (19 warning-level).
Resolve the 8 FunctionTooLong finding(s) in God Classes — start with up2k.js (2), browser.js (2), meadup.js. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 4 TooManyMethods finding(s) in God Classes — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Stand up a CI pipeline, then gate God Classes in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
77 duplicated block group(s) detected. A further 4 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 28 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 9 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with REDACTED (3), authsrv.py, ftpd.py. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 8 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with REDACTED (3), authsrv.py, smbd.py. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 6 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), authsrv.py, REDACTED. — One of this dimension's main actionable groups (6 warning-level).
Stand up a CI pipeline, then gate Code Duplication in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
31 test methods: 31 unit, 0 integration, 0 BDD, 0 e2e. The Python suite contributes 31 test function(s) across 13 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
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.
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Stand up a CI pipeline, then gate REDACTED Scanning in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
0 of 2 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 1 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (1 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 1 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. This repository publishes itself under MIT, which is its own choice and is not judged here.
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.
Resolve the 25 Hotspot finding(s) in Churn × Complexity Hotspots — start with authsrv.py, REDACTED, up2k.js. — One of this dimension's main actionable groups (25 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
13 deducted task-comment markers across 39738 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment · ×12REDACTED:5676
XxxCommentREDACTED:527
What to do
Resolve the 12 TodoComment finding(s) in Explicit Debt — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 1 XxxComment finding(s) in Explicit Debt — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Stand up a CI pipeline, then gate Explicit Debt in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
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.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
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.
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).
45 finding(s): 0 critical, 4 high, 39 medium, 2 low. semgrep hit a parse error in 17 file(s) — `bin/up2k.sh` (line 51), `copyparty/__main__.py`, `copyparty/web/browser.js`, `REDACTED` (lines 116–129), `REDACTED` (line 54, line 55, line 80, …), … (+12 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.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 9 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 18 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (12), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 35 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (14), REDACTED (4), REDACTED (3). — One of this dimension's main actionable groups (35 warning-level).
Resolve the 15 High IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (15 issue-level).
Resolve the 1 Critical IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 92 of the 121 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
Resolve the 9 Change coupling finding(s) in Change Coupling — start with __main__.py (2), up2k.js, broker_mpw.py. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 1 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, 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.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives1.8 / 10Critical✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×4) — contrib/plugins/meadup.js:492, copyparty/web/browser.js:851, copyparty/web/browser.js:852, …
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — copyparty/web/browser.js:856
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.
Do you agree with this assessment?
AC2 · Forms & labels5.5 / 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.
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). — copyparty/web/baguettebox.js:333
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×23) — copyparty/web/browser.js:643, copyparty/web/browser.js:901, copyparty/web/browser.js:1007, …
A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×3) — copyparty/web/browser.js:1138, copyparty/web/browser.js:1357, copyparty/web/browser.js:5519
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×8) — copyparty/web/browser.js:6544, copyparty/web/browser.js:9793, copyparty/web/browser.js:9798, …
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.
Do you agree with this assessment?
AC3 · Page structure4.6 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×16) — contrib/index.html:2, REDACTED:2, copyparty/web/browser.js:9333, …
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×3) — copyparty/web/browser.js:9333, srv/ceditable.html:1, srv/ping.html:1
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×2) — copyparty/web/browser.js:9333, srv/ceditable.html:1
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). (×13) — copyparty/web/browser.js:873, copyparty/web/browser.js:935, copyparty/web/browser.js:3163, …
An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label. — copyparty/web/wopi.html:35
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.
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: interactive elements plus elements the markup gives a click/key handler or the repo's own CSS styles `cursor: pointer`, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). 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".
An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action. — contrib/plugins/minimal-up2k.html:46
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
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.
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.
outline:none/0 with no :focus rule in the same stylesheet removes the focus ring. Provide a visible :focus / :focus-visible style. — srv/ceditable.html:5
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.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 28 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
What to do
Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
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.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Run what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ 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.
0 typed · 44 plain JS — the untyped files are contrib/plugins/banner.js, contrib/plugins/graft-thumbs.js, contrib/plugins/meadup.js, contrib/plugins/minimal-up2k.js, contrib/plugins/quickmove.js, contrib/plugins/rave.js (+38 more).
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): 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. Deterministic.
REDACTED:351 · copyparty/web/mde.js:112 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — REDACTED:351
copyparty/web/browser.js:4654 · copyparty/web/browser.js:4705 — 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. — copyparty/web/browser.js:4654
REDACTED:423 · copyparty/web/mde.js:178 — the two spans are one implementation copied and then locally edited — 143 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. — REDACTED:423
copyparty/web/browser.js:3094 · copyparty/web/browser.js:3119 — 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. — copyparty/web/browser.js:3094
copyparty/web/browser.js:4682 · copyparty/web/browser.js:4742 — 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. — copyparty/web/browser.js:4682
REDACTED:549 · REDACTED:566 — 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:549
REDACTED:701 · REDACTED:734 — 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:701
REDACTED:610 · REDACTED:623 — 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:610
copyparty/web/browser.js:9638 · copyparty/web/up2k.js:1633 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — copyparty/web/browser.js:9638
copyparty/web/up2k.js:397 · copyparty/web/up2k.js:2000 — 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. — copyparty/web/up2k.js:397
copyparty/web/up2k.js:2290 · copyparty/web/up2k.js:2467 — 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. — copyparty/web/up2k.js:2290
copyparty/web/browser.js:3879 · copyparty/web/browser.js:3894 — 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. — copyparty/web/browser.js:3879
copyparty/web/browser.js:9225 · copyparty/web/md.js:205 — the two spans are one implementation copied and then locally edited — 53 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. — copyparty/web/browser.js:9225
copyparty/web/up2k.js:2306 · copyparty/web/w.hash.js:103 — the two spans are one implementation copied and then locally edited — 63 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. — copyparty/web/up2k.js:2306
REDACTED:1473 · REDACTED:1533 — 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:1473
copyparty/web/baguettebox.js:673 · copyparty/web/baguettebox.js:698 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — copyparty/web/baguettebox.js:673
copyparty/web/browser.js:1333 · copyparty/web/browser.js:3702 — 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. — copyparty/web/browser.js:1333
copyparty/web/svcs.js:62 · copyparty/web/svcs.js:78 — 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. — copyparty/web/svcs.js:62
copyparty/web/browser.js:3188 · copyparty/web/browser.js:3200 — 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. — copyparty/web/browser.js:3188
copyparty/web/browser.js:4423 · REDACTED:2115 — 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. — copyparty/web/browser.js:4423
copyparty/web/browser.js:4609 · copyparty/web/browser.js:4892 — 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. — copyparty/web/browser.js:4609
copyparty/web/browser.js:6025 · copyparty/web/browser.js:6035 — 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. — copyparty/web/browser.js:6025
REDACTED:416 · copyparty/web/mde.js:118 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — REDACTED:416
REDACTED:1047 · REDACTED:1055 — 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:1047
REDACTED:1081 · REDACTED:1089 · REDACTED:1097 — all 3 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:1081
copyparty/web/baguettebox.js:408 · copyparty/web/browser.js:6258 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — copyparty/web/baguettebox.js:408
copyparty/web/baguettebox.js:660 · copyparty/web/baguettebox.js:667 · copyparty/web/baguettebox.js:685 · copyparty/web/baguettebox.js:692 · +1 more site(s) not listed — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — copyparty/web/baguettebox.js:660
copyparty/web/browser.js:2607 · copyparty/web/browser.js:2618 — 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. — copyparty/web/browser.js:2607
copyparty/web/browser.js:6262 · REDACTED:993 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — copyparty/web/browser.js:6262
copyparty/web/up2k.js:1374 · copyparty/web/up2k.js:1386 — 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. — copyparty/web/up2k.js:1374
copyparty/web/up2k.js:2244 · copyparty/web/up2k.js:3056 — 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. — copyparty/web/up2k.js:2244
REDACTED:1853 · REDACTED:1860 — 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:1853
copyparty/web/browser.js:9934 · copyparty/web/browser.js:9939 — 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. — copyparty/web/browser.js:9934
REDACTED:263 · REDACTED:415 · copyparty/web/mde.js:170 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — REDACTED:263
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.
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.
ahotkeys has cyclomatic complexity 136 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 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. — copyparty/web/browser.js:6248
taskerd has cyclomatic complexity 74 and cognitive complexity 132; 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. — copyparty/web/up2k.js:1836
orz has cyclomatic complexity 68 and cognitive complexity 150; 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. — copyparty/web/up2k.js:2589
recvls has cyclomatic complexity 51 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 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. — copyparty/web/browser.js:7501
keyDownHandler has cyclomatic complexity 50 and cognitive complexity 46; 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. — copyparty/web/baguettebox.js:401
gentab has cyclomatic complexity 44 and cognitive complexity 83; 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. — copyparty/web/browser.js:7654
drawbuf has cyclomatic complexity 41 and cognitive complexity 41; 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. — copyparty/web/browser.js:2182
loadgrid has cyclomatic complexity 40 and cognitive complexity 75; 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. — copyparty/web/browser.js:5840
convert_markdown has cyclomatic complexity 37 and cognitive complexity 53; 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. — copyparty/web/md.js:196
etafun has cyclomatic complexity 37 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 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. — copyparty/web/up2k.js:1647
updater_impl has cyclomatic complexity 35 and cognitive complexity 54; 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. — copyparty/web/browser.js:2651
apply_perms has cyclomatic complexity 35 and cognitive complexity 40; 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. — copyparty/web/browser.js:8064
keydown has cyclomatic complexity 34 and cognitive complexity 54; 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:982
play has cyclomatic complexity 32 and cognitive complexity 42; 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. — copyparty/web/browser.js:3244
up_them has cyclomatic complexity 30 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 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. — copyparty/web/up2k.js:1486
vis_exh has cyclomatic complexity 30 and cognitive complexity 35; 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:178
fmt_table2 has cyclomatic complexity 28 and cognitive complexity 52; 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:748
apply has cyclomatic complexity 28 and cognitive complexity 30; 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. — copyparty/web/browser.js:2915
a_up2k_namefilter has cyclomatic complexity 26 and cognitive complexity 74; 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:40
dive has cyclomatic complexity 26 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 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. — copyparty/web/browser.js:3828
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files0.0 / 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.
29 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: copyparty/web/browser.js (8702), copyparty/web/up2k.js (2990), REDACTED (1995), copyparty/web/baguettebox.js (1196), REDACTED (1019), copyparty/web/tl/cze.js (670) (+23 more).
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage0.0 / 10Critical✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
0% of 44 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R7 · Dead Code0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 6 application, 0 tooling and 0 test entry point(s) detected in this repo. This repository declares no build, type-check or test script, so nothing here would fail on a wrong deletion — confirm by hand that nothing loads each file (including by a path built at runtime) before removing it. An undetected custom entry would make these reachable.
no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×38) — REDACTED, copyparty/web/baguettebox.js, REDACTED, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
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.
Other · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.
No Content-Security-Policy / X-Frame-Options / X-Content-Type-Options configuration found — defense in depth, even when a reverse proxy could set them. This is reported because `copyparty.conf` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — contrib/nginx/copyparty.conf:65
What to do
Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
Do you agree with this assessment?
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).
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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 79 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 — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
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.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~3123 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D12 Dependency Hygiene — Not scored — 1 shipped Python distribution(s) were read, but the outdated signal needs pypi.org, and no declaration here carries an exact pin to ask about — a floor or a range installs the newest release it admits and cannot be behind one, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
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.
D19 Documentation Quality — LLM evaluation failed
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — Production source is present (.py) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — symbol resolution incomplete — navigability not assessed
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry) — not scanned yet).
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry) — not scanned yet).
D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a CS/VB/GO/SCALA/SWIFT/DART class graph, and this repository's production source is .c, .py, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — 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 — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — no CI workflow found
P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
P8 Schema migrations — not assessed — schema-migration practice is read from 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
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
X1 Async correctness — 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
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X3 Exception handling — 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
X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X4 Structured logging — 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
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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 — 65 finding(s)
AC2 · Forms & labels· <input> without a programmatic label · ×21
<input> without a programmatic label copyparty/web/browser.js:643— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label copyparty/web/browser.js:901— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label copyparty/web/browser.js:4328— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label copyparty/web/browser.js:4329— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label copyparty/web/browser.js:4340— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label copyparty/web/browser.js:4341— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label copyparty/web/browser.js:4348— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label copyparty/web/browser.js:6544— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label copyparty/web/browser.js:8933— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label copyparty/web/browser.js:9793— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label copyparty/web/browser.js:9798— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label REDACTED:24— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label REDACTED:20— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label REDACTED:114— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label REDACTED:140— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label REDACTED:141— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label REDACTED:143— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label copyparty/web/up2k.js:1608— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label copyparty/web/up2k.js:1609— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label srv/ping.html:56— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label srv/ping.html:60— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· <select> without a programmatic label · ×6
<select> without a programmatic label copyparty/web/browser.js:1007— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label copyparty/web/browser.js:1027— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label copyparty/web/browser.js:1032— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label copyparty/web/browser.js:1079— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label copyparty/web/browser.js:4311— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label REDACTED:2161— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· <textarea> without a programmatic label · ×4
<textarea> without a programmatic label copyparty/web/browser.js:8934— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<textarea> without a programmatic label REDACTED:45— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<textarea> without a programmatic label REDACTED:60— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<textarea> without a programmatic label srv/ceditable.html:48— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· Link with no accessible name · ×3
Link with no accessible name copyparty/web/browser.js:1138— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name copyparty/web/browser.js:1357— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name copyparty/web/browser.js:5519— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
<html> without a lang copyparty/web/browser.js:9333— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang srv/ceditable.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang srv/ping.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC3 · Page structure· Document without a <title> · ×2
Document without a <title> copyparty/web/browser.js:9333— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> srv/ceditable.html:1— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC1 · Text alternatives· <img> without a text alternative · ×1
<img> without a text alternative copyparty/web/browser.js:856— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels· <button> with no accessible text · ×1
<button> with no accessible text copyparty/web/baguettebox.js:333— 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).
AC3 · Page structure· <iframe> without a title · ×1
<iframe> without a title copyparty/web/wopi.html:35— An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
(anonymous)::gentab (cognitive 83) copyparty/web/browser.js:7654— (anonymous)::gentab has cognitive complexity 83 (threshold 15). Drivers by points: if/else 24 (41 pts), ternaries 6 (19 pts), loops 7 (14 pts), boolean chains 9 (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.
(anonymous)::loadgrid (cognitive 75) copyparty/web/browser.js:5840— (anonymous)::loadgrid has cognitive complexity 75 (threshold 15). Drivers by points: if/else 20 (41 pts), ternaries 7 (18 pts), boolean chains 10, loops 4 (6 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.
(anonymous)::encode_query (cognitive 71) copyparty/web/browser.js:6624— (anonymous)::encode_query has cognitive complexity 71 (threshold 15). Drivers by points: if/else 15 (53 pts), loops 5 (14 pts), boolean chains 4 (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.
(anonymous)::recvls (cognitive 60) copyparty/web/browser.js:7501— (anonymous)::recvls has cognitive complexity 60 (threshold 15). Drivers by points: if/else 25 (32 pts), boolean chains 12, ternaries 7 (10 pts), loops 3 (5 pts), error handling 1 (nesting depth added 12). 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)::keydown (cognitive 54) REDACTED:982— (anonymous)::keydown has cognitive complexity 54 (threshold 15). Drivers by points: if/else 27 (46 pts), boolean chains 8 (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.
(anonymous)::updater_impl (cognitive 54) copyparty/web/browser.js:2651— (anonymous)::updater_impl has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 10, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
(anonymous)::ansify (cognitive 47) copyparty/web/browser.js:5371— (anonymous)::ansify has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (38 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (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.
(anonymous)::keyDownHandler (cognitive 46) copyparty/web/baguettebox.js:401— (anonymous)::keyDownHandler has cognitive complexity 46 (threshold 15). Drivers by points: if/else 26, boolean chains 16, ternaries 2 (4 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.
(anonymous)::drawbuf (cognitive 41) copyparty/web/browser.js:2182— (anonymous)::drawbuf has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 24 (29 pts), loops 5, if/else 4, boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
(anonymous)::onscroll2 (cognitive 32) copyparty/web/browser.js:7119— (anonymous)::onscroll2 has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 6, loops 2 (5 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::apply (cognitive 30) copyparty/web/browser.js:2915— (anonymous)::apply has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 10, ternaries 2 (4 pts), loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::rename (cognitive 30) copyparty/web/browser.js:4233— (anonymous)::rename has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 5 (8 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.
(anonymous)::show (cognitive 29) copyparty/web/browser.js:9884— (anonymous)::show has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 9, ternaries 2 (6 pts) (nesting depth added 11). 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.
(anonymous)::announce (cognitive 28) copyparty/web/browser.js:1608— (anonymous)::announce has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (9 pts), ternaries 5, loops 1 (2 pts) (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)::rendertree (cognitive 28) copyparty/web/browser.js:7283— (anonymous)::rendertree has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 pts), boolean chains 3, error handling 2 (3 pts), ternaries 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.
(anonymous)::render (cognitive 27) copyparty/web/browser.js:6741— (anonymous)::render has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 5 (9 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::seltgl (cognitive 27) copyparty/web/browser.js:8850— (anonymous)::seltgl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::load (cognitive 26) copyparty/web/browser.js:8755— (anonymous)::load has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::init_ac2 (cognitive 25) copyparty/web/browser.js:1535— (anonymous)::init_ac2 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9, ternaries 4, loops 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
(anonymous)::drawpos (cognitive 24) copyparty/web/browser.js:2246— (anonymous)::drawpos has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 5 (9 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::draw (cognitive 24) copyparty/web/browser.js:2352— (anonymous)::draw has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 11 (21 pts), if/else 3 (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.
(anonymous)::gclick (cognitive 24) copyparty/web/browser.js:5710— (anonymous)::gclick has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (12 pts) (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.
(anonymous)::loadImage (cognitive 24) copyparty/web/baguettebox.js:931— (anonymous)::loadImage has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 8, ternaries 5 (6 pts), loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
(anonymous)::render (cognitive 23) copyparty/web/browser.js:5286— (anonymous)::render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7, ternaries 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.
(anonymous)::parsetree (cognitive 23) copyparty/web/browser.js:7923— (anonymous)::parsetree has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 5 (7 pts), loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::recvls (cyclomatic 51) copyparty/web/browser.js:7501— (anonymous)::recvls has cyclomatic complexity 51 (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)::keyDownHandler (cyclomatic 50) copyparty/web/baguettebox.js:401— (anonymous)::keyDownHandler has cyclomatic complexity 50 (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)::gentab (cyclomatic 44) copyparty/web/browser.js:7654— (anonymous)::gentab 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.
(anonymous)::drawbuf (cyclomatic 41) copyparty/web/browser.js:2182— (anonymous)::drawbuf has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
(anonymous)::loadgrid (cyclomatic 40) copyparty/web/browser.js:5840— (anonymous)::loadgrid has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous)::updater_impl (cyclomatic 35) copyparty/web/browser.js:2651— (anonymous)::updater_impl 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.
(anonymous)::keydown (cyclomatic 34) REDACTED:982— (anonymous)::keydown 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.
(anonymous)::apply (cyclomatic 28) copyparty/web/browser.js:2915— (anonymous)::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.
(anonymous)::gclick (cyclomatic 26) copyparty/web/browser.js:5710— (anonymous)::gclick 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.
(anonymous)::onscroll2 (cyclomatic 26) copyparty/web/browser.js:7119— (anonymous)::onscroll2 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.
(anonymous)::announce (cyclomatic 25) copyparty/web/browser.js:1608— (anonymous)::announce 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.
(anonymous)::init_ac2 (cyclomatic 24) copyparty/web/browser.js:1535— (anonymous)::init_ac2 has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
(anonymous)::loadImage (cyclomatic 24) copyparty/web/baguettebox.js:931— (anonymous)::loadImage has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
(anonymous)::ansify (cyclomatic 23) copyparty/web/browser.js:5371— (anonymous)::ansify 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)::encode_query (cyclomatic 23) copyparty/web/browser.js:6624— (anonymous)::encode_query 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)::onkey (cyclomatic 22) REDACTED:2009— (anonymous)::onkey 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.
(anonymous)::drawpos (cyclomatic 21) copyparty/web/browser.js:2246— (anonymous)::drawpos has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: (anonymous)::onclick (cyclomatic 23) 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.
(anonymous)::render (cyclomatic 20) copyparty/web/browser.js:3958— (anonymous)::render 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. This is NOT this file's highest cyclomatic complexity: (anonymous)::onclick (cyclomatic 23) 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.
(anonymous)::rename (cyclomatic 19) copyparty/web/browser.js:4233— (anonymous)::rename has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: (anonymous)::onclick (cyclomatic 23) 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.
(anonymous)::render (cyclomatic 19) copyparty/web/browser.js:6741— (anonymous)::render has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: (anonymous)::onclick (cyclomatic 23) 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.
(anonymous)::show (cyclomatic 19) copyparty/web/browser.js:9884— (anonymous)::show has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: (anonymous)::onclick (cyclomatic 23) 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.
(anonymous)::raver (cyclomatic 19) contrib/plugins/rave.js:109— (anonymous)::raver 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)::rendertree (cyclomatic 18) copyparty/web/browser.js:7283— (anonymous)::rendertree 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: (anonymous)::onclick (cyclomatic 23) 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.
(anonymous)::seltgl (cyclomatic 18) copyparty/web/browser.js:8850— (anonymous)::seltgl 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: (anonymous)::onclick (cyclomatic 23) 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.
(anonymous)::rotn (cyclomatic 18) copyparty/web/baguettebox.js:1102— (anonymous)::rotn 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.
Hotspot: copyparty/authsrv.py copyparty/authsrv.py:1773— copyparty/authsrv.py changed 26 times in last 90 days, max cyclomatic complexity 511 in AuthSrv._reload at line 1773. 2 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/authsrv.py`: 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:7043— REDACTED changed 36 times in last 90 days, max cyclomatic complexity 314 in HttpCli.tx_browser at line 7043. 4 of those changes were fix/bug commits, and the other 32 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +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: copyparty/web/up2k.js copyparty/web/up2k.js:806— copyparty/web/up2k.js changed 9 times in last 90 days, max cyclomatic complexity 678 in up2k.up2k_init at line 806. 1 of those changes was a fix/bug commit, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/web/up2k.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: copyparty/web/browser.js copyparty/web/browser.js:6248— copyparty/web/browser.js changed 22 times in last 90 days, max cyclomatic complexity 136 in browser.ahotkeys at line 6248. 3 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/web/browser.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: copyparty/__main__.py copyparty/__main__.py:2368— copyparty/__main__.py changed 40 times in last 90 days, max cyclomatic complexity 71 in __main__.main at line 2368. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/__main__.py`: 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:3192— REDACTED changed 19 times in last 90 days, max cyclomatic complexity 124 in Up2k._handle_json at line 3192. 1 of those changes was a fix/bug commit, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +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:159— REDACTED changed 14 times in last 90 days, max cyclomatic complexity 115 in SvcHub.__init__ at line 159. 1 of those changes was a fix/bug commit, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +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: copyparty/util.py copyparty/util.py:4196— copyparty/util.py changed 20 times in last 90 days, max cyclomatic complexity 33 in util._runhook at line 4196. 4 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/util.py`: 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:534— REDACTED changed 8 times in last 90 days, max cyclomatic complexity 58 in ThumbSrv.worker at line 534. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +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: copyparty/mtag.py copyparty/mtag.py:277— copyparty/mtag.py changed 5 times in last 90 days, max cyclomatic complexity 43 in mtag.parse_ffprobe at line 277. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/mtag.py`: 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: copyparty/tcpsrv.py copyparty/tcpsrv.py:53— copyparty/tcpsrv.py changed 3 times in last 90 days, max cyclomatic complexity 65 in TcpSrv.__init__ at line 53. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/tcpsrv.py`: 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: copyparty/th_cli.py copyparty/th_cli.py:53— copyparty/th_cli.py changed 3 times in last 90 days, max cyclomatic complexity 62 in ThumbCli.get at line 53. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/th_cli.py`: 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: bin/u2c.py bin/u2c.py:1550— bin/u2c.py changed 4 times in last 90 days, max cyclomatic complexity 46 in u2c.main at line 1550. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- bin/u2c.py`: 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:327— REDACTED changed 5 times in last 90 days, max cyclomatic complexity 31 in HttpSrv.thr_listen at line 327. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +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: scripts/help2html.py scripts/help2html.py:36— scripts/help2html.py changed 4 times in last 90 days, max cyclomatic complexity 35 in help2html.cnv at line 36. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- scripts/help2html.py`: 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: copyparty/mdns.py copyparty/mdns.py:414— copyparty/mdns.py changed 2 times in last 90 days, max cyclomatic complexity 62 in MDNS.eat at line 414. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/mdns.py`: 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:178— REDACTED changed 4 times in last 90 days, max cyclomatic complexity 30 in util.vis_exh 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +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: copyparty/sftpd.py copyparty/sftpd.py:476— copyparty/sftpd.py changed 4 times in last 90 days, max cyclomatic complexity 28 in SFTP_Srv._open at line 476. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/sftpd.py`: 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: copyparty/ftpd.py copyparty/ftpd.py:632— copyparty/ftpd.py changed 4 times in last 90 days, max cyclomatic complexity 23 in Ftpd.__init__ at line 632. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/ftpd.py`: 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: copyparty/u2idx.py copyparty/u2idx.py:204— copyparty/u2idx.py changed 2 times in last 90 days, max cyclomatic complexity 39 in U2idx.search at line 204. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/u2idx.py`: 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: scripts/sfx.py scripts/sfx.py:264— scripts/sfx.py changed 4 times in last 90 days, max cyclomatic complexity 18 in sfx.unpack at line 264. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- scripts/sfx.py`: 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: copyparty/httpconn.py copyparty/httpconn.py:140— copyparty/httpconn.py changed 3 times in last 90 days, max cyclomatic complexity 23 in HttpConn.run at line 140. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/httpconn.py`: 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:982— REDACTED changed 2 times in last 90 days, max cyclomatic complexity 34 in md2.keydown at line 982. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +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: copyparty/fsutil.py copyparty/fsutil.py:221— copyparty/fsutil.py changed 3 times in last 90 days, max cyclomatic complexity 22 in fsutil.ramdisk_chk at line 221. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/fsutil.py`: 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: copyparty/cert.py copyparty/cert.py:151— copyparty/cert.py changed 2 times in last 90 days, max cyclomatic complexity 22 in cert._gen_srv at line 151. 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-06-26..2026-09-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-26 19:31:21 +00:00' --until='2026-09-24 19:31:21 +00:00' --full-history --no-merges -- copyparty/cert.py`: 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.
FileTooLong: web/browser.js copyparty/web/browser.js— FileTooLong — 7573 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 7073 over it, 15.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 6276 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5776 over it, 12.55× 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 — 4786 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4286 over it, 9.57× 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: copyparty/authsrv.py copyparty/authsrv.py— FileTooLong — 3480 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2980 over it, 6.96× 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: copyparty/util.py copyparty/util.py— FileTooLong — 3299 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2799 over it, 6.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: web/up2k.js copyparty/web/up2k.js— FileTooLong — 2507 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 77% of them inside a single declaration: up2k_init (806-3537). The bar is 500 significant lines; this is 2007 over it, 5.01× 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 — 1742 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1242 over it, 3.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1649 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 1149 over it, 3.30× 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: copyparty/__main__.py copyparty/__main__.py— FileTooLong — 1639 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1139 over it, 3.28× 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 — 1293 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 793 over it, 2.59× 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: a/u2c.py copyparty/web/a/u2c.py— FileTooLong — 1214 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 714 over it, 2.43× 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 — 831 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 331 over it, 1.66× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: a/partyfuse.py copyparty/web/a/partyfuse.py— FileTooLong — 811 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 311 over it, 1.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: copyparty/sftpd.py copyparty/sftpd.py— FileTooLong — 778 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 278 over it, 1.56× 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: copyparty/mtag.py copyparty/mtag.py— FileTooLong — 692 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 192 over it, 1.38× 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: dnslib/dns.py copyparty/stolen/dnslib/dns.py— FileTooLong — 599 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 99 over it, 1.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: copyparty/ftpd.py copyparty/ftpd.py— FileTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 59 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 59 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: copyparty/tcpsrv.py copyparty/tcpsrv.py— FileTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 57 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
AC3 · Page structure· Page without a main landmark · ×16
Page without a main landmark contrib/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark copyparty/web/browser.js:9333— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark copyparty/web/cf.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark copyparty/web/mde.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark copyparty/web/svcs.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark copyparty/web/wopi.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark srv/ceditable.html:1— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark srv/ping.html:1— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
up2k_init::exec_handshake::orz (cognitive 150) copyparty/web/up2k.js:2589— up2k_init::exec_handshake::orz has cognitive complexity 150 (threshold 15). Drivers by points: if/else 34 (86 pts), ternaries 9 (28 pts), loops 6 (19 pts), boolean chains 15, error handling 1 (2 pts) (nesting depth added 85). 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.
up2k_init::(anonymous)::taskerd (cognitive 132) copyparty/web/up2k.js:1836— up2k_init::(anonymous)::taskerd has cognitive complexity 132 (threshold 15). Drivers by points: if/else 32 (82 pts), boolean chains 19, loops 6 (15 pts), ternaries 3 (10 pts), error handling 2 (6 pts) (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
up2k_init::up_them (cognitive 49) copyparty/web/up2k.js:1486— up2k_init::up_them has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (25 pts), ternaries 3 (9 pts), boolean chains 7, loops 3 (6 pts), error handling 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
up2k_init::etafun (cognitive 45) copyparty/web/up2k.js:1647— up2k_init::etafun has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 11, loops 1, ternaries 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.
up2k_init::gotfile (cognitive 41) copyparty/web/up2k.js:1193— up2k_init::gotfile has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 7, error handling 2 (5 pts), ternaries 2 (5 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
up2k_init::set_fsearch (cognitive 32) copyparty/web/up2k.js:3361— up2k_init::set_fsearch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 8 (12 pts), boolean chains 4, error handling 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.
up2k_init::uptoast (cognitive 29) copyparty/web/up2k.js:2030— up2k_init::uptoast has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 6 (11 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
up2k_init::gotallfiles (cognitive 27) copyparty/web/up2k.js:1364— up2k_init::gotallfiles has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 6 (10 pts), boolean chains 4 (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.
up2k_init::wexec_hash::onmsg (cognitive 25) copyparty/web/up2k.js:2398— up2k_init::wexec_hash::onmsg has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 3, loops 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.
up2k_init::onovercmn (cognitive 20) copyparty/web/up2k.js:1090— up2k_init::onovercmn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, 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.
up2k_init::read_dirs (cognitive 19) copyparty/web/up2k.js:1278— up2k_init::read_dirs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
up2k_init::exec_hash::segm_next (cognitive 18) copyparty/web/up2k.js:2186— up2k_init::exec_hash::segm_next has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, error handling 1 (2 pts), loops 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.
up2k_init::upload_sub::orz (cognitive 18) copyparty/web/up2k.js:2968— up2k_init::upload_sub::orz has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, loops 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.
up2k_init::exec_handshake (cognitive 17) copyparty/web/up2k.js:2556— up2k_init::exec_handshake has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 1, 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.
AC3 · Page structure· Data table has no header cells · ×13
Data table has no header cells copyparty/web/browser.js:873— 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).
Data table has no header cells copyparty/web/browser.js:935— 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).
Data table has no header cells copyparty/web/browser.js:3163— 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).
Data table has no header cells copyparty/web/browser.js:3193— 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).
Data table has no header cells copyparty/web/browser.js:3205— 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).
Data table has no header cells copyparty/web/browser.js:4327— 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).
Data table has no header cells copyparty/web/browser.js:4332— 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).
Data table has no header cells copyparty/web/browser.js:6556— 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).
Data table has no header cells copyparty/web/browser.js:9485— 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).
Data table has no header cells REDACTED:66— 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).
Data table has no header cells REDACTED:1900— 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).
Data table has no header cells srv/ping.html:53— 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).
Data table has no header cells srv/ping.html:66— 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).
Dead file (~730 LoC) copyparty/web/tl/deu.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/epo.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/fin.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/fra.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/grc.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/ita.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/jpn.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/kor.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/nld.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/por.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/rus.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/swe.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~730 LoC) copyparty/web/tl/ukr.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
TodoComment REDACTED:5676— # TODO is undef if vol 404 on startup — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:246— # (TODO: move the "listening @ ..." infolog in partftpy to — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:883— # todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:896— # todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:911— # todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:4359— # TODO reply should parser.drop() — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment copyparty/broker_thr.py:33— # instantiate all services here (TODO: inheritance?) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment copyparty/broker_mpw.py:62— # instantiate all services here (TODO: inheritance?) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment copyparty/broker_mp.py:110— # TODO will deadlock if dest performs another ipc — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment copyparty/web/a/partyfuse.py:1082— # TODO untested — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/test_vfs.py:147— # doesn't really matter but makes the test messy, TODO? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/test_mv.py:54— # tc_e2d = [True, False] # maybe-TODO only known symlinks are translated — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
up2k_init::(anonymous)::taskerd (cyclomatic 74) copyparty/web/up2k.js:1836— up2k_init::(anonymous)::taskerd has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
up2k_init::exec_handshake::orz (cyclomatic 68) copyparty/web/up2k.js:2589— up2k_init::exec_handshake::orz has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
up2k_init::etafun (cyclomatic 37) copyparty/web/up2k.js:1647— up2k_init::etafun 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.
up2k_init::up_them (cyclomatic 30) copyparty/web/up2k.js:1486— up2k_init::up_them 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.
up2k_init::gotfile (cyclomatic 26) copyparty/web/up2k.js:1193— up2k_init::gotfile 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.
up2k_init::set_fsearch (cyclomatic 24) copyparty/web/up2k.js:3361— up2k_init::set_fsearch 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.
up2k_init::uptoast (cyclomatic 23) copyparty/web/up2k.js:2030— up2k_init::uptoast 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.
up2k_init::gotallfiles (cyclomatic 21) copyparty/web/up2k.js:1364— up2k_init::gotallfiles 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.
up2k_init::wexec_hash::onmsg (cyclomatic 20) copyparty/web/up2k.js:2398— up2k_init::wexec_hash::onmsg 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.
up2k_init::exec_hash::segm_next (cyclomatic 17) copyparty/web/up2k.js:2186— up2k_init::exec_hash::segm_next 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.
up2k_init::onovercmn (cyclomatic 16) copyparty/web/up2k.js:1090— up2k_init::onovercmn 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.
Change coupling: up2k.js ↔ w.hash.js copyparty/web/up2k.js— `copyparty/web/up2k.js` and `copyparty/web/w.hash.js` change together 83% of the time (10 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). Neither file is a module — they declare no import/export and are loaded together into one shared scope by a script tag or a bundle — so there is no dependency edge that COULD be declared between them, and this pass cannot tell a real relationship from a coincidence of release. Read the pair before acting: if one defines what the other uses through the shared global, that is the coupling, and making it explicit (a module boundary, or one named object they both go through) is what removes it; if they duplicate structure, extract the common part; if neither holds, the co-change is incidental and there is nothing to do. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `49c71247` fix errorhandling for browser-oom; `499ae1c7` other minor html-escaping fixes; `5ca8f070` up2k.js: detect broken webworkers; — run `git show` on any of them.
Change coupling: broker_mpw.py ↔ broker_thr.py copyparty/broker_mpw.py— `copyparty/broker_mpw.py` and `copyparty/broker_thr.py` change together 76% of the time (13 of the 17 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 13 shared commits counted here, the most recent 3 are `4e75534e` optimize BrokerThr, 7x faster:; `b5405174` add login sessions; `0006f933` hmac uploader-ip when avoiding filename collisions — run `git show` on any of them.
Change coupling: star.py ↔ szip.py copyparty/star.py— `copyparty/star.py` and `copyparty/szip.py` change together 71% of the time (10 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency 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 10 shared commits counted here, the most recent 3 are `5919607a` sanitize fs-paths in archive error summary; `2b24c50e` add option `--iobuf` (file r/w buffersize):; `76769618` add ?tar=gz, ?tar=bz2, ?tar=xz with optional level; defaults are ?tar… — run `git show` on any of them.
Change coupling: broker_mp.py ↔ broker_thr.py copyparty/broker_mp.py— `copyparty/broker_mp.py` and `copyparty/broker_thr.py` change together 71% of the time (12 of the 17 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 12 shared commits counted here, the most recent 3 are `1afe48b8` thumbs: fix th=x on non-jxl-capable servers;; `c6965f06` add optional update-checker (#1315); `4e75534e` optimize BrokerThr, 7x faster: — run `git show` on any of them.
Change coupling: __main__.py ↔ ssdp.py copyparty/__main__.py— `copyparty/__main__.py` and `copyparty/ssdp.py` change together 65% of the time (11 of the 17 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 11 shared commits counted here, the most recent 3 are `1e7697b5` misc cleanup;; `07b2bf11` better support for 700+ connections; `18c763ac` smb: upgrade to impacket 0.11, full user account support, permissions… — run `git show` on any of them.
Change coupling: ftpd.py ↔ REDACTED copyparty/ftpd.py— `copyparty/ftpd.py` and `REDACTED` change together 62% of the time (16 of the 26 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 16 shared commits counted here, the most recent 3 are `beb634dc` support .hidden file for dotfiles exclusion (#1351); `c17c3be0` wo_up_readme according to volflags;; `87a5c22a` per-protocol ip binds; closes #1176 — run `git show` on any of them.
Change coupling: __main__.py ↔ multicast.py copyparty/__main__.py— `copyparty/__main__.py` and `copyparty/multicast.py` change together 57% of the time (13 of the 23 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 13 shared commits counted here, the most recent 3 are `54caf63f` optimize; `b377791b` support cidr notation for `--xff-src`, `--ipa`, `--*-ipa`; `f8e3e87a` add event hooks — run `git show` on any of them.
Change coupling: browser.js ↔ REDACTED copyparty/web/browser.js— `copyparty/web/browser.js` and `REDACTED` change together 53% of the time (147 of the 275 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). Neither file is a module — they declare no import/export and are loaded together into one shared scope by a script tag or a bundle — so there is no dependency edge that COULD be declared between them, and this pass cannot tell a real relationship from a coincidence of release. Read the pair before acting: if one defines what the other uses through the shared global, that is the coupling, and making it explicit (a module boundary, or one named object they both go through) is what removes it; if they duplicate structure, extract the common part; if neither holds, the co-change is incidental and there is nothing to do. You can check this without leaving the row: of the 147 shared commits counted here, the most recent 3 are `f19ef033` up2k: u2sz: allow 1 as max + detect http413; `d33d1132` fix directory sort-order (closes #1119) (#1528);; `43773f2c` filesize units 6/7; closes #1389 — run `git show` on any of them.
Change coupling: mdns.py ↔ ssdp.py copyparty/mdns.py— `copyparty/mdns.py` and `copyparty/ssdp.py` change together 53% of the time (9 of the 17 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 9 shared commits counted here, the most recent 3 are `760ff2db` other linter nitpicks (not actually bugs); `07b2bf11` better support for 700+ connections; `60a1ff0f` macos: mute select() noise on wake from suspend — run `git show` on any of them.
Duplicated block (7 lines × 2) copyparty/authsrv.py:2643— copyparty/authsrv.py:2643-2649 | copyparty/authsrv.py:2653-2659 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) copyparty/ftpd.py:186— copyparty/ftpd.py:186-192 | copyparty/sftpd.py:336-342 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `copyparty/ftpd.py:186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) copyparty/mtag.py:833— copyparty/mtag.py:833-839 | copyparty/util.py:3998-4004 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) REDACTED:1852— REDACTED:1852-1858 | REDACTED:1916-1922 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) REDACTED:3530— REDACTED:3530-3536 | REDACTED:5419-5425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) REDACTED:4534— REDACTED:4534-4540 | REDACTED:4768-4774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) REDACTED:4687— REDACTED:4687-4693 | REDACTED:5007-5014 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) contrib/zfs-tune.py:41— contrib/zfs-tune.py:41-47 | copyparty/util.py:1855-1861 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) REDACTED:131— REDACTED:131-137 | REDACTED:228-234 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
FunctionTooLong: up2k.up2k_init copyparty/web/up2k.js:806— FunctionTooLong — up2k_init runs 1919 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1819 over it, 19.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: up2k.U2pvis copyparty/web/up2k.js:157— FunctionTooLong — U2pvis runs 328 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 228 over it, 3.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: meadup.initKeybaord contrib/plugins/meadup.js:16— FunctionTooLong — initKeybaord runs 323 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 223 over it, 3.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: up2k-hook-ytid.a_up2k_namefilter REDACTED:40— FunctionTooLong — a_up2k_namefilter runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× 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: browser.MPlayer copyparty/web/browser.js:1721— FunctionTooLong — MPlayer runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: md.convert_markdown copyparty/web/md.js:196— FunctionTooLong — convert_markdown runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: browser.play copyparty/web/browser.js:3244— FunctionTooLong — play runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: md2.fmt_table2 REDACTED:748— FunctionTooLong — fmt_table2 runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (8 lines × 2) copyparty/authsrv.py:2278— copyparty/authsrv.py:2278-2285 | copyparty/authsrv.py:2292-2299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) REDACTED:2202— REDACTED:2202-2209 | REDACTED:2349-2356 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) REDACTED:2760— REDACTED:2760-2767 | REDACTED:5414-5421 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2760` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) REDACTED:6359— REDACTED:6359-6366 | REDACTED:6492-6499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) copyparty/smbd.py:336— copyparty/smbd.py:336-343 | copyparty/smbd.py:375-382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) copyparty/sutil.py:75— copyparty/sutil.py:75-82 | copyparty/sutil.py:135-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `copyparty/sutil.py:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) REDACTED:4591— REDACTED:4591-4598 | REDACTED:4851-4858 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) copyparty/util.py:2595— copyparty/util.py:2595-2602 | copyparty/util.py:2606-2613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `s` to `str` in one and `bytes` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) copyparty/authsrv.py:2732— copyparty/authsrv.py:2732-2736 | copyparty/authsrv.py:2740-2744 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) REDACTED:548— REDACTED:548-552 | REDACTED:665-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) REDACTED:1847— REDACTED:1847-1851 | REDACTED:1911-1915 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) contrib/package/nix/copyparty/update.py:25— contrib/package/nix/copyparty/update.py:25-29 | contrib/package/nix/partftpy/update.py:20-24 — `contrib/package/nix/copyparty/update.py` and `contrib/package/nix/partftpy/update.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 2 separate duplicated blocks between them, totalling at least 16 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) copyparty/__main__.py:1503— copyparty/__main__.py:1503-1507 | copyparty/__main__.py:1754-1758 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `copyparty/__main__.py:1500` calls `add_argument` and `copyparty/__main__.py:1753` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) REDACTED:638— REDACTED:638-642 | REDACTED:655-659 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2 locations) copyparty/web/browser.js:3188— copyparty/web/browser.js:3188 · copyparty/web/browser.js:3200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2 locations) copyparty/web/browser.js:4423— copyparty/web/browser.js:4423 · REDACTED:2115 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) copyparty/web/browser.js:4609— copyparty/web/browser.js:4609 · copyparty/web/browser.js:4892 — 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 (8 lines × 2 locations) copyparty/web/browser.js:6025— copyparty/web/browser.js:6025 · copyparty/web/browser.js:6035 — 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 (8 lines × 2 locations) REDACTED:416— REDACTED:416 · copyparty/web/mde.js:118 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (8 lines × 2 locations) REDACTED:1047— REDACTED:1047 · REDACTED:1055 — 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 (16 lines × 2) copyparty/authsrv.py:2198— copyparty/authsrv.py:2198-2213 | copyparty/authsrv.py:2233-2248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) copyparty/cert.py:131— copyparty/cert.py:131-146 | copyparty/cert.py:225-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) REDACTED:2099— REDACTED:2099-2114 | REDACTED:7290-7305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) REDACTED:2217— REDACTED:2217-2232 | REDACTED:2279-2294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:2277` calls `dcanonical` and `REDACTED:2215` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) copyparty/mdns.py:341— copyparty/mdns.py:341-356 | copyparty/ssdp.py:143-158 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `copyparty/mdns.py:338` calls `time` and `copyparty/ssdp.py:142` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) REDACTED:4023— REDACTED:4023-4032 | REDACTED:4135-4144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4023` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:4145` calls `wunlink` and `REDACTED:4033` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) REDACTED:6343— REDACTED:6343-6352 | REDACTED:6469-6478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) copyparty/multicast.py:104— copyparty/multicast.py:104-113 | copyparty/util.py:990-999 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) copyparty/web/a/partyfuse.py:482— copyparty/web/a/partyfuse.py:482-491 | copyparty/web/a/partyfuse.py:582-591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) REDACTED:5871— REDACTED:5871-5880 | docs/chunksizes.py:25-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5871` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
AC1 · Text alternatives· <canvas> without a text alternative · ×4
<canvas> without a text alternative contrib/plugins/meadup.js:492— 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.
<canvas> without a text alternative copyparty/web/browser.js:851— 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.
<canvas> without a text alternative copyparty/web/browser.js:852— 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.
<canvas> without a text alternative copyparty/web/browser.js:853— 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.
TooManyMethods: Up2k REDACTED:149— TooManyMethods — 117 methods. The bar is 30 methods; this is 87 over it, 3.90× 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: HttpCli REDACTED:243— TooManyMethods — 109 methods. The bar is 30 methods; this is 79 over it, 3.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SvcHub REDACTED:148— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ThumbSrv REDACTED:268— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (9 lines × 2) REDACTED:2877— REDACTED:2877-2885 | REDACTED:4484-4492 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) REDACTED:4632— REDACTED:4632-4640 | REDACTED:4651-4659 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) REDACTED:6256— REDACTED:6256-6264 | REDACTED:6426-6434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) copyparty/sftpd.py:674— copyparty/sftpd.py:674-682 | copyparty/sftpd.py:718-726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) copyparty/ftpd.py:179— copyparty/ftpd.py:179-184 | copyparty/sftpd.py:329-334 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `copyparty/ftpd.py:179` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) REDACTED:2766— REDACTED:2766-2771 | REDACTED:2942-2947 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:2941` calls `wunlink` and `REDACTED:2765` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) REDACTED:3822— REDACTED:3822-3827 | REDACTED:4349-4354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) REDACTED:4567— REDACTED:4567-4572 | REDACTED:4807-4812 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2 locations) copyparty/web/browser.js:6262— copyparty/web/browser.js:6262 · REDACTED:993 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (6 lines × 2 locations) copyparty/web/up2k.js:1374— copyparty/web/up2k.js:1374 · copyparty/web/up2k.js:1386 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (6 lines × 2 locations) copyparty/web/up2k.js:2244— copyparty/web/up2k.js:2244 · copyparty/web/up2k.js:3056 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (6 lines × 2 locations) REDACTED:1853— REDACTED:1853 · REDACTED:1860 — 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.
CPPF.read (cognitive 17) bin/partyfuse-streaming.py:820— CPPF.read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 1 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 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.
CPPF.read (cognitive 17) bin/partyfuse.py:933— CPPF.read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 1 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 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.
CPPF.read (cognitive 17) copyparty/web/a/partyfuse.py:933— CPPF.read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 1 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 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.
Duplicated block (21 lines × 2) REDACTED:4033— REDACTED:4033-4053 | REDACTED:4146-4166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:4145` calls `wunlink` and `REDACTED:4032` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21 lines × 2) copyparty/stolen/qrcodegen.py:340— copyparty/stolen/qrcodegen.py:340-360 | copyparty/stolen/qrcodegen.py:366-386 — 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 (21 lines × 2) REDACTED:4616— REDACTED:4616-4636 | REDACTED:4881-4901 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4616` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) copyparty/authsrv.py:3874— copyparty/authsrv.py:3874-3891 | copyparty/authsrv.py:3988-4005 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) REDACTED:2548— REDACTED:2548-2565 | REDACTED:2598-2615 — 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 (18 lines × 2) copyparty/sftpd.py:147— copyparty/sftpd.py:147-164 | copyparty/sftpd.py:220-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) REDACTED:2821— REDACTED:2821-2837 | REDACTED:3931-3947 — 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 (17 lines × 2) REDACTED:6375— REDACTED:6375-6391 | REDACTED:6510-6526 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) copyparty/util.py:4544— copyparty/util.py:4544-4560 | copyparty/web/a/u2c.py:512-528 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) REDACTED:1814— REDACTED:1814-1828 | REDACTED:1861-1875 — 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 (15 lines × 2) REDACTED:5356— REDACTED:5356-5370 | REDACTED:5891-5905 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15 lines × 2) copyparty/web/a/partyfuse.py:471— copyparty/web/a/partyfuse.py:471-485 | copyparty/web/a/partyfuse.py:519-533 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) contrib/package/nix/copyparty/update.py:43— contrib/package/nix/copyparty/update.py:43-53 | contrib/package/nix/partftpy/update.py:28-38 — `contrib/package/nix/copyparty/update.py` and `contrib/package/nix/partftpy/update.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 2 separate duplicated blocks between them, totalling at least 16 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) copyparty/util.py:2951— copyparty/util.py:2951-2961 | copyparty/util.py:2969-2979 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `copyparty/util.py:2980` calls `unlink` and `copyparty/util.py:2962` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) copyparty/web/a/partyfuse.py:553— copyparty/web/a/partyfuse.py:553-563 | copyparty/web/a/partyfuse.py:604-614 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2 locations) copyparty/web/browser.js:9638— copyparty/web/browser.js:9638 · copyparty/web/up2k.js:1633 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (11 lines × 2 locations) copyparty/web/up2k.js:397— copyparty/web/up2k.js:397 · copyparty/web/up2k.js:2000 — 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 (11 lines × 2 locations) copyparty/web/up2k.js:2290— copyparty/web/up2k.js:2290 · copyparty/web/up2k.js:2467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2 locations) copyparty/web/baguettebox.js:673— copyparty/web/baguettebox.js:673 · copyparty/web/baguettebox.js:698 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2 locations) copyparty/web/browser.js:1333— copyparty/web/browser.js:1333 · copyparty/web/browser.js:3702 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2 locations) copyparty/web/svcs.js:62— copyparty/web/svcs.js:62 · copyparty/web/svcs.js:78 — 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.
u2c.main (cyclomatic 46) bin/u2c.py:1550— u2c.main has cyclomatic complexity 46 (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.
u2c.main (cyclomatic 46) copyparty/web/a/u2c.py:1550— u2c.main has cyclomatic complexity 46 (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 40) copyparty/web/browser.js:8242— (anonymous) has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 6 of the 40 points are its own statements and the rest belongs to 14 function items inside it that branch (set_style, add_btns, reset, …). 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.
(anonymous) (cyclomatic 40) copyparty/web/browser.js:9440— (anonymous) 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 11 function items inside it that branch (load::unpost_load_cb, unpost_delete_cb, onclick, …). 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.
Ctl.hasher (cyclomatic 37) bin/u2c.py:1214— Ctl.hasher 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.
Ctl.hasher (cyclomatic 37) copyparty/web/a/u2c.py:1214— Ctl.hasher 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.
CPPF.get_cached_file (cyclomatic 34) bin/partyfuse.py:727— CPPF.get_cached_file 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.
CPPF.get_cached_file (cyclomatic 34) copyparty/web/a/partyfuse.py:727— CPPF.get_cached_file 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.
Ctl._fancy (cyclomatic 34) bin/u2c.py:1111— Ctl._fancy 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.
Ctl._fancy (cyclomatic 34) copyparty/web/a/u2c.py:1111— Ctl._fancy 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.
Ctl.handshaker (cyclomatic 30) bin/u2c.py:1357— Ctl.handshaker 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.
Ctl.handshaker (cyclomatic 30) copyparty/web/a/u2c.py:1357— Ctl.handshaker 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.
u2c.handshake (cyclomatic 23) bin/u2c.py:822— u2c.handshake 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.
u2c.handshake (cyclomatic 23) copyparty/web/a/u2c.py:822— u2c.handshake 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.
U2pvis::changecard (cyclomatic 19) copyparty/web/up2k.js:533— U2pvis::changecard 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.
U2pvis::bzw (cyclomatic 16) copyparty/web/up2k.js:373— U2pvis::bzw 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.
HCli.req (cyclomatic 17) bin/u2c.py:193— HCli.req 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.
HCli.req (cyclomatic 17) copyparty/web/a/u2c.py:193— HCli.req 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.
partyfuse.main (cyclomatic 16) bin/partyfuse.py:1124— partyfuse.main 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.
partyfuse.main (cyclomatic 16) copyparty/web/a/partyfuse.py:1124— partyfuse.main 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) REDACTED:1118— (anonymous) 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 7 function items inside it that branch (diff, push, apply, …). 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.
(anonymous) (cyclomatic 16) contrib/plugins/banner.js:1— (anonymous) has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs 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.
Ctl.hasher (cognitive 100) bin/u2c.py:1214— Ctl.hasher has cognitive complexity 100 (threshold 15). Drivers by points: if/else 18 (60 pts), loops 5 (18 pts), boolean chains 9, error handling 2 (9 pts), ternaries 2 (4 pts) (nesting depth added 64). 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.
Ctl.hasher (cognitive 100) copyparty/web/a/u2c.py:1214— Ctl.hasher has cognitive complexity 100 (threshold 15). Drivers by points: if/else 18 (60 pts), loops 5 (18 pts), boolean chains 9, error handling 2 (9 pts), ternaries 2 (4 pts) (nesting depth added 64). 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.
Ctl.handshaker (cognitive 74) bin/u2c.py:1357— Ctl.handshaker has cognitive complexity 74 (threshold 15). Drivers by points: if/else 20 (44 pts), loops 7 (18 pts), error handling 2 (5 pts), ternaries 1 (4 pts), boolean chains 3 (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.
Ctl.handshaker (cognitive 74) copyparty/web/a/u2c.py:1357— Ctl.handshaker has cognitive complexity 74 (threshold 15). Drivers by points: if/else 20 (44 pts), loops 7 (18 pts), error handling 2 (5 pts), ternaries 1 (4 pts), boolean chains 3 (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.
u2c.main (cognitive 61) bin/u2c.py:1550— u2c.main has cognitive complexity 61 (threshold 15). Drivers by points: if/else 28 (38 pts), error handling 4 (8 pts), boolean chains 6, loops 5 (6 pts), ternaries 3 (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
u2c.main (cognitive 61) copyparty/web/a/u2c.py:1550— u2c.main has cognitive complexity 61 (threshold 15). Drivers by points: if/else 28 (38 pts), error handling 4 (8 pts), boolean chains 6, loops 5 (6 pts), ternaries 3 (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Ctl._fancy (cognitive 60) bin/u2c.py:1111— Ctl._fancy has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 12, loops 4 (6 pts), ternaries 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ctl._fancy (cognitive 60) copyparty/web/a/u2c.py:1111— Ctl._fancy has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 12, loops 4 (6 pts), ternaries 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CPPF.get_cached_file (cognitive 59) bin/partyfuse.py:727— CPPF.get_cached_file has cognitive complexity 59 (threshold 15). Drivers by points: if/else 28 (50 pts), boolean chains 8, loops 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.
CPPF.get_cached_file (cognitive 59) copyparty/web/a/partyfuse.py:727— CPPF.get_cached_file has cognitive complexity 59 (threshold 15). Drivers by points: if/else 28 (50 pts), boolean chains 8, loops 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.
Ctl._safe (cognitive 32) bin/u2c.py:1058— Ctl._safe has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (12 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ctl._safe (cognitive 32) copyparty/web/a/u2c.py:1058— Ctl._safe has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (12 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
u2c.handshake (cognitive 31) bin/u2c.py:822— u2c.handshake has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 5, error handling 2 (3 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.
u2c.handshake (cognitive 31) copyparty/web/a/u2c.py:822— u2c.handshake has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 5, error handling 2 (3 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.
u2c.walkdirs (cognitive 26) bin/u2c.py:653— u2c.walkdirs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts), error handling 1 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
u2c.walkdirs (cognitive 26) copyparty/web/a/u2c.py:653— u2c.walkdirs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts), error handling 1 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
U2pvis::changecard (cognitive 26) copyparty/web/up2k.js:533— U2pvis::changecard has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (7 pts), ternaries 5, 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.
U2pvis::bzw (cognitive 19) copyparty/web/up2k.js:373— U2pvis::bzw has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ctl.uploader (cognitive 24) bin/u2c.py:1478— Ctl.uploader has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 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.
Ctl.uploader (cognitive 24) copyparty/web/a/u2c.py:1478— Ctl.uploader has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 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.
Gateway.parse_nginx (cognitive 23) bin/partyfuse.py:516— Gateway.parse_nginx has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (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. This shape REPEATS in the file: one other method here (Gateway.parse_iis) 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.
Gateway.parse_nginx (cognitive 23) copyparty/web/a/partyfuse.py:516— Gateway.parse_nginx has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (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. This shape REPEATS in the file: one other method here (Gateway.parse_iis) 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.
Gateway.parse_iis (cognitive 23) bin/partyfuse.py:565— Gateway.parse_iis has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (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. This shape REPEATS in the file: one other method here (Gateway.parse_nginx) 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.
Gateway.parse_iis (cognitive 23) copyparty/web/a/partyfuse.py:565— Gateway.parse_iis has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (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. This shape REPEATS in the file: one other method here (Gateway.parse_nginx) 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.
u2c.upload (cognitive 22) bin/u2c.py:914— u2c.upload has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (4 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.
u2c.upload (cognitive 22) copyparty/web/a/u2c.py:914— u2c.upload has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (4 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.
Gateway.parse_cpp (cognitive 21) bin/partyfuse.py:468— Gateway.parse_cpp has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Gateway.parse_cpp (cognitive 21) copyparty/web/a/partyfuse.py:468— Gateway.parse_cpp has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HCli.req (cognitive 20) bin/u2c.py:193— HCli.req has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (7 pts), boolean chains 2, error handling 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
HCli.req (cognitive 20) copyparty/web/a/u2c.py:193— HCli.req has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (7 pts), boolean chains 2, error handling 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
u2c.get_hashlist_f (cognitive 19) bin/u2c.py:743— u2c.get_hashlist_f has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
u2c.get_hashlist_f (cognitive 19) copyparty/web/a/u2c.py:743— u2c.get_hashlist_f has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partyfuse.main (cognitive 17) bin/partyfuse.py:1124— partyfuse.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 3 (6 pts), boolean chains 1, ternaries 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.
partyfuse.main (cognitive 17) copyparty/web/a/partyfuse.py:1124— partyfuse.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 3 (6 pts), boolean chains 1, ternaries 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:1118— (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 2 (nesting depth added 2). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (diff, push, apply, …). 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.
(anonymous) (cognitive 17) contrib/plugins/quickmove.js:17— (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 4, loops 1, ternaries 1. Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (our_hotkey_handler, move_selected_files, move_next_file, …). 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.
(anonymous) (cognitive 16) contrib/plugins/graft-thumbs.js:22— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 2 (nesting depth added 4). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function items inside it that branch (graft_thumbs, graft_thumbs::(anonymous), bagit, …). 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.
(anonymous) (cognitive 16) contrib/plugins/banner.js:1— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) copyparty/ftpd.py:242— copyparty/ftpd.py:242-313 | copyparty/sftpd.py:477-593 | copyparty/smbd.py:235-289 | REDACTED:353-404 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:2201— REDACTED:2201-2257 | REDACTED:2260-2326 | REDACTED:2329-2342 | REDACTED:2345-2366 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (24 lines × 2) copyparty/smbd.py:251— copyparty/smbd.py:251-274 | REDACTED:369-392 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (24 lines × 2) REDACTED:4658— REDACTED:4658-4681 | REDACTED:4982-5005 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) REDACTED:1600— REDACTED:1600-1611 | REDACTED:3580-3591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 2) copyparty/web/a/u2c.py:707— copyparty/web/a/u2c.py:707-718 | docs/chunksizes.py:10-21 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–9 lines × 2) REDACTED:7857— REDACTED:7857-7865 | REDACTED:7867-7874 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7857` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) REDACTED:740— REDACTED:740-748 | REDACTED:851-858 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:751` calls `execute` and `REDACTED:860` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2 locations) copyparty/web/browser.js:3094— copyparty/web/browser.js:3094 · copyparty/web/browser.js:3119 — 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 (15 lines × 2 locations) copyparty/web/browser.js:4682— copyparty/web/browser.js:4682 · copyparty/web/browser.js:4742 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2 locations) REDACTED:549— REDACTED:549 · REDACTED:566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2 locations) REDACTED:701— REDACTED:701 · REDACTED:734 — 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 (10 lines × 2 locations) copyparty/web/browser.js:3879— copyparty/web/browser.js:3879 · copyparty/web/browser.js:3894 — 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 (10 lines × 2 locations) REDACTED:1473— REDACTED:1473 · REDACTED:1533 — 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 with local edits (10 matched lines × 2 locations) · ×2
Duplicated block with local edits (10 matched lines × 2 locations) copyparty/web/browser.js:9225— copyparty/web/browser.js:9225 · copyparty/web/md.js:205 — the two spans are one implementation copied and then locally edited — 53 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.
Duplicated block with local edits (10 matched lines × 2 locations) copyparty/web/up2k.js:2306— copyparty/web/up2k.js:2306 · copyparty/web/w.hash.js:103 — the two spans are one implementation copied and then locally edited — 63 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.
Duplicated block (7 lines × 2 locations) copyparty/web/baguettebox.js:408— copyparty/web/baguettebox.js:408 · copyparty/web/browser.js:6258 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (7 lines × 2 locations) copyparty/web/browser.js:2607— copyparty/web/browser.js:2607 · copyparty/web/browser.js:2618 — 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.
Dead file (~731 LoC) copyparty/web/tl/chi.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~731 LoC) copyparty/web/tl/hun.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
AC4 · Keyboard semantics· Link used as a button (placeholder href) · ×1
Link used as a button (placeholder href) contrib/plugins/minimal-up2k.html:46— An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×1
Focus outline removed in CSS without a :focus replacement srv/ceditable.html:5— outline:none/0 with no :focus rule in the same stylesheet removes the focus ring. Provide a visible :focus / :focus-visible style.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 28 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
up2k.up2k_init (cyclomatic 678) copyparty/web/up2k.js:806— up2k.up2k_init has cyclomatic complexity 678 (threshold 15). Of this number, 447 points are the body's own statements and 231 belong to 36 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.
AuthSrv._reload (cyclomatic 511) copyparty/authsrv.py:1773— AuthSrv._reload has cyclomatic complexity 511 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HttpCli.tx_browser (cyclomatic 314) REDACTED:7043— HttpCli.tx_browser has cyclomatic complexity 314 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HttpCli.run (cyclomatic 207) REDACTED:367— HttpCli.run has cyclomatic complexity 207 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
browser.ahotkeys (cyclomatic 136) copyparty/web/browser.js:6248— browser.ahotkeys has cyclomatic complexity 136 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Up2k._handle_json (cyclomatic 124) REDACTED:3192— Up2k._handle_json has cyclomatic complexity 124 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SvcHub.__init__ (cyclomatic 115) REDACTED:159— SvcHub.__init__ has cyclomatic complexity 115 (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.
HttpCli.dump_to_file (cyclomatic 101) REDACTED:2650— HttpCli.dump_to_file has cyclomatic complexity 101 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Up2k._build_dir (cyclomatic 95) REDACTED:1536— Up2k._build_dir has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
up2k.U2pvis (cyclomatic 94) copyparty/web/up2k.js:157— up2k.U2pvis has cyclomatic complexity 94 (threshold 15). Of this number, 23 points are the body's own statements and 71 belong to 18 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.
HttpCli.handle_plain_upload (cyclomatic 87) REDACTED:3912— HttpCli.handle_plain_upload has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SvcHub._process_config (cyclomatic 74) REDACTED:1196— SvcHub._process_config has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
__main__.main (cyclomatic 71) copyparty/__main__.py:2368— __main__.main 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.
HttpCli.handle_propfind (cyclomatic 68) REDACTED:1950— HttpCli.handle_propfind has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Up2k.init_indexes (cyclomatic 66) REDACTED:895— Up2k.init_indexes 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.
Up2k.register_vpath (cyclomatic 66) REDACTED:1155— Up2k.register_vpath 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.
TcpSrv.__init__ (cyclomatic 65) copyparty/tcpsrv.py:53— TcpSrv.__init__ has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HttpCli.tx_file (cyclomatic 63) REDACTED:4854— HttpCli.tx_file has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MCast.create_servers (cyclomatic 63) copyparty/multicast.py:96— MCast.create_servers has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MDNS.eat (cyclomatic 62) copyparty/mdns.py:414— MDNS.eat 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.
ThumbCli.get (cyclomatic 62) copyparty/th_cli.py:53— ThumbCli.get 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.
HttpCli.handle_get (cyclomatic 60) REDACTED:1420— HttpCli.handle_get 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.
AuthSrv.cgen (cyclomatic 59) copyparty/authsrv.py:3834— AuthSrv.cgen has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ThumbSrv.worker (cyclomatic 58) REDACTED:534— ThumbSrv.worker 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.
HttpCli.tx_mounts (cyclomatic 56) REDACTED:5780— HttpCli.tx_mounts 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.
HttpCli.tx_rups (cyclomatic 51) REDACTED:6422— HttpCli.tx_rups has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AuthSrv._parse_config_file_2 (cyclomatic 50) copyparty/authsrv.py:1395— AuthSrv._parse_config_file_2 has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HttpCli.tx_ups (cyclomatic 50) REDACTED:6255— HttpCli.tx_ups has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Up2k._handle_rm (cyclomatic 49) REDACTED:4329— Up2k._handle_rm has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
up2k-hook-ytid.a_up2k_namefilter (cyclomatic 46) REDACTED:40— up2k-hook-ytid.a_up2k_namefilter has cyclomatic complexity 46 (threshold 15). Of this number, 45 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HttpCli.handle_post_binary (cyclomatic 45) REDACTED:3359— HttpCli.handle_post_binary has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HttpCli.tx_zip (cyclomatic 45) REDACTED:5407— HttpCli.tx_zip has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Up2k._redup (cyclomatic 44) REDACTED:2111— Up2k._redup 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.
Up2k._mv_file (cyclomatic 44) REDACTED:4846— Up2k._mv_file 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.
mtag.parse_ffprobe (cyclomatic 43) copyparty/mtag.py:277— mtag.parse_ffprobe 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.
Up2k._symlink (cyclomatic 42) REDACTED:3748— Up2k._symlink has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HttpCli.handle_text_upload (cyclomatic 41) REDACTED:4323— HttpCli.handle_text_upload has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous) (cyclomatic 41) copyparty/web/browser.js:10056— (anonymous) 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 11 function items inside it that branch (sel_move, sel_start, sel_end, …). 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.
browser.MPlayer (cyclomatic 40) copyparty/web/browser.js:1721— browser.MPlayer has cyclomatic complexity 40 (threshold 15). Of this number, 21 points are the body's own statements and 19 belong to 9 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.
Metrics.tx (cyclomatic 39) copyparty/metrics.py:19— Metrics.tx 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.
U2idx.search (cyclomatic 39) copyparty/u2idx.py:204— U2idx.search 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.
HttpCli.handle_share (cyclomatic 38) REDACTED:6686— HttpCli.handle_share has cyclomatic complexity 38 (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.
U2idx.run_query (cyclomatic 38) copyparty/u2idx.py:379— U2idx.run_query has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
md.convert_markdown (cyclomatic 38) copyparty/web/md.js:196— md.convert_markdown has cyclomatic complexity 38 (threshold 15). Of this number, 37 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.
Donut (cyclomatic 36) copyparty/web/up2k.js:630— Donut has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 2 of the 36 points are its own statements and the rest belongs to 6 function items inside it that branch ((anonymous), svg, enstrobe, …). 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.
TcpSrv._listen (cyclomatic 35) copyparty/tcpsrv.py:253— TcpSrv._listen 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.
TcpSrv._qr (cyclomatic 35) copyparty/tcpsrv.py:575— TcpSrv._qr has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Up2k._verify_integrity (cyclomatic 35) REDACTED:1972— Up2k._verify_integrity 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.
help2html.cnv (cyclomatic 35) scripts/help2html.py:36— help2html.cnv 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.
browser.apply_perms (cyclomatic 35) copyparty/web/browser.js:8064— browser.apply_perms has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
authsrv.upgrade_cfg_fmt (cyclomatic 34) copyparty/authsrv.py:4171— authsrv.upgrade_cfg_fmt 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.
HttpCli.tx_rss (cyclomatic 34) REDACTED:1734— HttpCli.tx_rss 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.
md2.keydown (cyclomatic 34) REDACTED:982— md2.keydown 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.
(anonymous) (cyclomatic 34) REDACTED:1567— (anonymous) has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 11 function items inside it that branch (show, getmsg, hide, …). 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.
util._runhook (cyclomatic 33) copyparty/util.py:4196— util._runhook 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.
CPPF.get_cached_file (cyclomatic 32) bin/partyfuse-streaming.py:613— CPPF.get_cached_file has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AuthSrv._map_volume_idp (cyclomatic 32) copyparty/authsrv.py:1182— AuthSrv._map_volume_idp has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HttpCli.handle_post (cyclomatic 32) REDACTED:2472— HttpCli.handle_post has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HttpCli.handle_post_json (cyclomatic 32) REDACTED:3174— HttpCli.handle_post_json has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Up2k._cp_file (cyclomatic 32) REDACTED:4586— Up2k._cp_file has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Up2k._relink (cyclomatic 32) REDACTED:5181— Up2k._relink has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
browser.play (cyclomatic 32) copyparty/web/browser.js:3244— browser.play 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.
HttpCli.tx_md (cyclomatic 31) REDACTED:5613— HttpCli.tx_md 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.
HttpSrv.thr_listen (cyclomatic 31) REDACTED:327— HttpSrv.thr_listen 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.
HttpCli.tx_pipe (cyclomatic 30) REDACTED:5254— HttpCli.tx_pipe 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.
HttpCli.gen_tree (cyclomatic 30) REDACTED:6125— HttpCli.gen_tree 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.
Up2k._new_upload (cyclomatic 30) REDACTED:5382— Up2k._new_upload 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.
util.vis_exh (cyclomatic 30) REDACTED:178— util.vis_exh 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.
browser.sortfiles (cyclomatic 29) copyparty/web/browser.js:3734— browser.sortfiles 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.
HttpCli.tx_res (cyclomatic 28) REDACTED:4718— HttpCli.tx_res has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SFTP_Srv._open (cyclomatic 28) copyparty/sftpd.py:476— SFTP_Srv._open 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.
util.ren_open (cyclomatic 28) copyparty/util.py:1864— util.ren_open 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.
browser.evau_error (cyclomatic 28) copyparty/web/browser.js:3414— browser.evau_error has cyclomatic complexity 28 (threshold 15). Of this number, 23 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.
md2.fmt_table2 (cyclomatic 28) REDACTED:748— md2.fmt_table2 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.
(anonymous) (cyclomatic 28) copyparty/web/browser.js:2331— (anonymous) has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (draw, mousemove, mousemove::(anonymous), …). 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.
AuthSrv.dbg_ls (cyclomatic 27) copyparty/authsrv.py:3711— AuthSrv.dbg_ls 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.
ThumbSrv.__init__ (cyclomatic 27) REDACTED:269— ThumbSrv.__init__ has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
util._zmq_hook (cyclomatic 27) copyparty/util.py:4095— util._zmq_hook 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.
browser.fmt_ren (cyclomatic 27) copyparty/web/browser.js:3826— browser.fmt_ren 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.
Up2k._run_one_mtp (cyclomatic 26) REDACTED:2507— Up2k._run_one_mtp 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.
Up2k.db_add (cyclomatic 26) REDACTED:4188— Up2k.db_add has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Up2k.handle_mv (cyclomatic 26) REDACTED:4754— Up2k.handle_mv 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.
Up2k._snap_reg (cyclomatic 26) REDACTED:5553— Up2k._snap_reg 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.
fmt_ren::dive (cyclomatic 26) copyparty/web/browser.js:3828— fmt_ren::dive 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.
CPPF.get_cached_file (cyclomatic 25) bin/partyfuse2.py:378— CPPF.get_cached_file 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.
Up2k._sched_rescan (cyclomatic 25) REDACTED:557— Up2k._sched_rescan 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.
Up2k._build_file_index (cyclomatic 25) REDACTED:1405— Up2k._build_file_index 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.
util.sortTable (cyclomatic 25) REDACTED:700— util.sortTable 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.
(anonymous) (cyclomatic 25) copyparty/web/browser.js:1965— (anonymous) has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 13 function items inside it that branch (onclick, onclick, set, …). 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.
dbtool.compare (cyclomatic 24) bin/dbtool.py:50— dbtool.compare 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.
authsrv.expand_config_file (cyclomatic 24) copyparty/authsrv.py:4079— authsrv.expand_config_file 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.
mtag.au_unpk (cyclomatic 24) copyparty/mtag.py:152— mtag.au_unpk 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.
util.runcmd (cyclomatic 24) copyparty/util.py:3807— util.runcmd 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.
VFS.walk (cyclomatic 23) copyparty/authsrv.py:816— VFS.walk 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.
Ftpd.__init__ (cyclomatic 23) copyparty/ftpd.py:632— Ftpd.__init__ 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.
HttpConn.run (cyclomatic 23) copyparty/httpconn.py:140— HttpConn.run has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SSH_Srv._check_auth_password (cyclomatic 23) copyparty/sftpd.py:138— SSH_Srv._check_auth_password 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.
Tftpd.__init__ (cyclomatic 23) REDACTED:87— Tftpd.__init__ 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.
md.init_toc (cyclomatic 23) copyparty/web/md.js:359— md.init_toc 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.
AuthSrv._read_vol_str_idp (cyclomatic 22) copyparty/authsrv.py:1589— AuthSrv._read_vol_str_idp 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.
cert._gen_srv (cyclomatic 22) copyparty/cert.py:151— cert._gen_srv 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.
fsutil.ramdisk_chk (cyclomatic 22) copyparty/fsutil.py:221— fsutil.ramdisk_chk 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.
HttpCli._add_logues (cyclomatic 22) REDACTED:4624— HttpCli._add_logues 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.
MDNS.build_svcs (cyclomatic 22) copyparty/mdns.py:137— MDNS.build_svcs 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.
SvcHub._check_env (cyclomatic 22) REDACTED:1132— SvcHub._check_env 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.
SvcHub._log_enabled (cyclomatic 22) REDACTED:1845— SvcHub._log_enabled 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.
ThumbSrv._clean (cyclomatic 22) REDACTED:1563— ThumbSrv._clean 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.
Up2k.handle_chunks (cyclomatic 22) REDACTED:3864— Up2k.handle_chunks 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.
util.runhook (cyclomatic 22) copyparty/util.py:4307— util.runhook 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.
browser.eval_hash (cyclomatic 22) copyparty/web/browser.js:3552— browser.eval_hash has cyclomatic complexity 22 (threshold 15). Of this number, 19 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.
util.xhrchk (cyclomatic 22) REDACTED:2387— util.xhrchk 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.
HttpSrv._pregen_thumbs (cyclomatic 21) REDACTED:668— HttpSrv._pregen_thumbs 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.
SMB.__init__ (cyclomatic 21) copyparty/smbd.py:29— SMB.__init__ 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.
(anonymous) (cyclomatic 21) copyparty/web/browser.js:10210— (anonymous) 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 4 function items inside it that branch (detectSilence, stop, go, …). 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. This is NOT this file's highest cyclomatic complexity: (anonymous)::onclick (cyclomatic 23) 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.
VFS._ls (cyclomatic 20) copyparty/authsrv.py:768— VFS._ls 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.
VFS.chk_ap (cyclomatic 20) copyparty/authsrv.py:954— VFS.chk_ap 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.
FtpFs.open (cyclomatic 20) copyparty/ftpd.py:241— FtpFs.open 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.
HttpCli.tx_tail (cyclomatic 20) REDACTED:5131— HttpCli.tx_tail 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.
MTag.__init__ (cyclomatic 20) copyparty/mtag.py:512— MTag.__init__ 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.
SvcHub.setup_db (cyclomatic 20) REDACTED:587— SvcHub.setup_db 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.
SvcHub.setup_share_db (cyclomatic 20) REDACTED:759— SvcHub.setup_share_db 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.
SvcHub._log_en_f2 (cyclomatic 20) REDACTED:1910— SvcHub._log_en_f2 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.
SvcHub.check_ver (cyclomatic 20) REDACTED:2063— SvcHub.check_ver 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.
Up2k._drop_lost (cyclomatic 20) REDACTED:1884— Up2k._drop_lost 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.
util._fs_mvrm (cyclomatic 20) copyparty/util.py:2985— util._fs_mvrm 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.
util._parsehook (cyclomatic 20) copyparty/util.py:3954— util._parsehook 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.
uncomment.uncomment (cyclomatic 20) scripts/uncomment.py:17— uncomment.uncomment 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.
browser.show_md (cyclomatic 20) copyparty/web/browser.js:9197— browser.show_md 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.
md.copydom (cyclomatic 20) copyparty/web/md.js:71— md.copydom 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.
util.humansize_fuzzy (cyclomatic 20) REDACTED:1107— util.humansize_fuzzy 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.
(anonymous) (cyclomatic 20) copyparty/web/browser.js:8425— (anonymous) has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (render, load_notation, try_render, …). 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. This is NOT this file's highest cyclomatic complexity: (anonymous)::onclick (cyclomatic 23) 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.
dbtool.main (cyclomatic 19) bin/dbtool.py:209— dbtool.main 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.
__main__.showlic (cyclomatic 19) copyparty/__main__.py:608— __main__.showlic 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.
AuthSrv.setup_chpw (cyclomatic 19) copyparty/authsrv.py:3588— AuthSrv.setup_chpw 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.
FtpAuth.validate_authentication (cyclomatic 19) copyparty/ftpd.py:62— FtpAuth.validate_authentication 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.
HttpCli.send_headers (cyclomatic 19) REDACTED:1132— HttpCli.send_headers 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.
HttpCli.reply (cyclomatic 19) REDACTED:1203— HttpCli.reply 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.
HttpCli.tx_wopi (cyclomatic 19) REDACTED:1639— HttpCli.tx_wopi 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.
MTag.get_mutagen (cyclomatic 19) copyparty/mtag.py:752— MTag.get_mutagen 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.
TcpSrv.detect_interfaces (cyclomatic 19) copyparty/tcpsrv.py:464— TcpSrv.detect_interfaces 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.
Up2k._get_parsers (cyclomatic 19) REDACTED:2655— Up2k._get_parsers 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.
util.statdir (cyclomatic 19) copyparty/util.py:3539— util.statdir 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.
rave.raver (cyclomatic 19) contrib/plugins/rave.js:109— rave.raver 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:1759— (anonymous) 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 items inside it that branch (show, scrollchk, hide, …). 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.
FtpFs.v2a (cyclomatic 18) copyparty/ftpd.py:163— FtpFs.v2a 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.
HttpCli._cors (cyclomatic 18) REDACTED:1356— HttpCli._cors 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.
MDNS.run2 (cyclomatic 18) copyparty/mdns.py:337— MDNS.run2 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.
MTag.get_bin (cyclomatic 18) copyparty/mtag.py:827— MTag.get_bin 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.
ThumbSrv._run_ff (cyclomatic 18) REDACTED:990— ThumbSrv._run_ff 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.
Up2k._e2ts_q (cyclomatic 18) REDACTED:2348— Up2k._e2ts_q 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.
Up2k.handle_cp (cyclomatic 18) REDACTED:4522— Up2k.handle_cp 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.
fusefuzz.main (cyclomatic 18) scripts/fusefuzz.py:34— fusefuzz.main has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
sfx.unpack (cyclomatic 18) scripts/sfx.py:264— sfx.unpack has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
up2k_flagbus (cyclomatic 18) copyparty/web/up2k.js:60— up2k_flagbus has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 7 function items inside it that branch (onmessage, take, tx, …). 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.
onclick (cyclomatic 18) copyparty/web/browser.js:9710— onclick has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: (anonymous)::onclick (cyclomatic 23) 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.
(anonymous) (cyclomatic 18) contrib/plugins/quickmove.js:17— (anonymous) has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 6 function items inside it that branch (our_hotkey_handler, move_selected_files, move_next_file, …). 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.
AuthSrv.setup_pwhash (cyclomatic 17) copyparty/authsrv.py:3646— AuthSrv.setup_pwhash 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.
HttpCli.handle_search (cyclomatic 17) REDACTED:3295— HttpCli.handle_search 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.
HttpCli.tx_svcs (cyclomatic 17) REDACTED:5727— HttpCli.tx_svcs 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.
MCast.setup_socket (cyclomatic 17) copyparty/multicast.py:235— MCast.setup_socket 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.
SFTP_Srv.v2a (cyclomatic 17) copyparty/sftpd.py:315— SFTP_Srv.v2a 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.
QrCode._get_penalty_score (cyclomatic 17) copyparty/stolen/qrcodegen.py:331— QrCode._get_penalty_score 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.
SvcHub._log_disabled (cyclomatic 17) REDACTED:1786— SvcHub._log_disabled 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.
Tftpd._open (cyclomatic 17) REDACTED:352— Tftpd._open 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.
Up2k.get_unfinished_by_user (cyclomatic 17) REDACTED:433— Up2k.get_unfinished_by_user 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.
a_up2k_namefilter::process_id_list (cyclomatic 17) REDACTED:195— a_up2k_namefilter::process_id_list 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.
HttpCli.get_pwd_cookie (cyclomatic 16) REDACTED:3701— HttpCli.get_pwd_cookie 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.
HttpCli.handle_eshare (cyclomatic 16) REDACTED:6635— HttpCli.handle_eshare 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.
MDNS.build_replies (cyclomatic 16) copyparty/mdns.py:196— MDNS.build_replies 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.
SFTP_Srv._list_folder (cyclomatic 16) copyparty/sftpd.py:376— SFTP_Srv._list_folder 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.
SvcHub.run (cyclomatic 16) REDACTED:1559— SvcHub.run 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.
SvcHub.shutdown (cyclomatic 16) REDACTED:1716— SvcHub.shutdown 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.
Tftpd._ls (cyclomatic 16) REDACTED:280— Tftpd._ls 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.
ThumbSrv.run_extractor (cyclomatic 16) REDACTED:682— ThumbSrv.run_extractor 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.
MultipartParser._read_header (cyclomatic 16) copyparty/util.py:1996— MultipartParser._read_header 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.
onmessage (cyclomatic 16) copyparty/web/w.hash.js:41— onmessage has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (hash_calc, hash_calc::hash_done, onerror, …). 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.
XxxComment REDACTED:527— # self.log("XXX self.ram: %s" % (self.ram,), 5) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
AuthSrv._reload (cognitive 1038) copyparty/authsrv.py:1773— AuthSrv._reload has cognitive complexity 1038 (threshold 15). Drivers by points: if/else 272 (627 pts), loops 110 (214 pts), boolean chains 97, ternaries 20 (55 pts), error handling 15 (45 pts) (nesting depth added 524). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
up2k.up2k_init (cognitive 861) copyparty/web/up2k.js:806— up2k.up2k_init has cognitive complexity 861 (threshold 15). Drivers by points: if/else 332 (519 pts), boolean chains 152, loops 51 (85 pts), ternaries 35 (74 pts), error handling 17 (31 pts) (nesting depth added 274). Of this number, 508 points are the body's own statements and 353 belong to 36 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.
HttpCli.tx_browser (cognitive 617) REDACTED:7043— HttpCli.tx_browser has cognitive complexity 617 (threshold 15). Drivers by points: if/else 170 (359 pts), boolean chains 90, error handling 21 (70 pts), loops 23 (59 pts), ternaries 15 (39 pts) (nesting depth added 298). 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.
HttpCli.run (cognitive 397) REDACTED:367— HttpCli.run has cognitive complexity 397 (threshold 15). Drivers by points: if/else 121 (257 pts), boolean chains 63, ternaries 14 (38 pts), error handling 11 (22 pts), loops 7 (17 pts) (nesting depth added 181). 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.
Up2k._handle_json (cognitive 359) REDACTED:3192— Up2k._handle_json has cognitive complexity 359 (threshold 15). Drivers by points: if/else 65 (240 pts), loops 11 (36 pts), boolean chains 31, error handling 7 (27 pts), ternaries 8 (25 pts) (nesting depth added 237). 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.
HttpCli.handle_plain_upload (cognitive 172) REDACTED:3912— HttpCli.handle_plain_upload has cognitive complexity 172 (threshold 15). Drivers by points: if/else 53 (117 pts), boolean chains 19, ternaries 7 (19 pts), error handling 6 (15 pts), loops 2 (nesting depth added 85). 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.
ahotkeys (cognitive 164) copyparty/web/browser.js:6248— ahotkeys has cognitive complexity 164 (threshold 15). Drivers by points: if/else 72 (107 pts), boolean chains 42, ternaries 10 (15 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._build_dir (cognitive 160) REDACTED:1536— Up2k._build_dir has cognitive complexity 160 (threshold 15). Drivers by points: if/else 49 (99 pts), boolean chains 28, error handling 9 (21 pts), loops 5 (6 pts), ternaries 4 (6 pts) (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.dump_to_file (cognitive 158) REDACTED:2650— HttpCli.dump_to_file has cognitive complexity 158 (threshold 15). Drivers by points: if/else 56 (100 pts), boolean chains 32, ternaries 8 (18 pts), error handling 4 (8 pts) (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AuthSrv.cgen (cognitive 140) copyparty/authsrv.py:3834— AuthSrv.cgen has cognitive complexity 140 (threshold 15). Drivers by points: if/else 26 (73 pts), loops 18 (42 pts), error handling 7 (22 pts), boolean chains 3 (nesting depth added 86). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SvcHub.__init__ (cognitive 140) REDACTED:159— SvcHub.__init__ has cognitive complexity 140 (threshold 15). Drivers by points: if/else 76 (92 pts), boolean chains 29, loops 8 (10 pts), error handling 3 (6 pts), ternaries 2 (3 pts) (nesting depth added 22). 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.
TcpSrv.__init__ (cognitive 139) copyparty/tcpsrv.py:53— TcpSrv.__init__ has cognitive complexity 139 (threshold 15). Drivers by points: if/else 35 (76 pts), loops 15 (29 pts), error handling 5 (16 pts), boolean chains 12, ternaries 2 (6 pts) (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MCast.create_servers (cognitive 127) copyparty/multicast.py:96— MCast.create_servers has cognitive complexity 127 (threshold 15). Drivers by points: if/else 34 (75 pts), loops 13 (32 pts), boolean chains 9, error handling 3 (7 pts), ternaries 2 (4 pts) (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
up2k-hook-ytid.a_up2k_namefilter (cognitive 121) REDACTED:40— up2k-hook-ytid.a_up2k_namefilter has cognitive complexity 121 (threshold 15). Drivers by points: if/else 27 (73 pts), loops 13 (31 pts), ternaries 5 (14 pts), boolean chains 3 (nesting depth added 73). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AuthSrv._parse_config_file_2 (cognitive 120) copyparty/authsrv.py:1395— AuthSrv._parse_config_file_2 has cognitive complexity 120 (threshold 15). Drivers by points: if/else 33 (84 pts), error handling 5 (15 pts), loops 4 (11 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.handle_propfind (cognitive 118) REDACTED:1950— HttpCli.handle_propfind has cognitive complexity 118 (threshold 15). Drivers by points: if/else 41 (76 pts), boolean chains 18, error handling 3 (9 pts), loops 5 (8 pts), ternaries 4 (7 pts) (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.
Up2k.register_vpath (cognitive 118) REDACTED:1155— Up2k.register_vpath has cognitive complexity 118 (threshold 15). Drivers by points: if/else 39 (73 pts), loops 8 (18 pts), error handling 8 (12 pts), boolean chains 10, ternaries 4 (5 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MDNS.eat (cognitive 116) copyparty/mdns.py:414— MDNS.eat has cognitive complexity 116 (threshold 15). Drivers by points: if/else 35 (73 pts), loops 7 (14 pts), boolean chains 12, ternaries 4 (9 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.
HttpCli.handle_get (cognitive 110) REDACTED:1420— HttpCli.handle_get has cognitive complexity 110 (threshold 15). Drivers by points: if/else 53 (98 pts), boolean chains 9, error handling 1 (3 pts) (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.
Up2k._redup (cognitive 104) REDACTED:2111— Up2k._redup has cognitive complexity 104 (threshold 15). Drivers by points: if/else 21 (66 pts), loops 7 (18 pts), boolean chains 12, error handling 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThumbSrv.worker (cognitive 103) REDACTED:534— ThumbSrv.worker has cognitive complexity 103 (threshold 15). Drivers by points: if/else 15 (41 pts), error handling 7 (25 pts), boolean chains 19, loops 5 (10 pts), ternaries 2 (8 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k.init_indexes (cognitive 100) REDACTED:895— Up2k.init_indexes has cognitive complexity 100 (threshold 15). Drivers by points: if/else 39 (67 pts), loops 11 (12 pts), boolean chains 10, error handling 5 (10 pts), ternaries 1 (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.
Up2k._handle_rm (cognitive 97) REDACTED:4329— Up2k._handle_rm has cognitive complexity 97 (threshold 15). Drivers by points: if/else 30 (69 pts), boolean chains 12, ternaries 3 (6 pts), error handling 2 (5 pts), loops 3 (5 pts) (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.
SvcHub._process_config (cognitive 96) REDACTED:1196— SvcHub._process_config has cognitive complexity 96 (threshold 15). Drivers by points: if/else 36 (55 pts), loops 17, boolean chains 16, error handling 3 (4 pts), ternaries 4 (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.
HttpCli.tx_rups (cognitive 93) REDACTED:6422— HttpCli.tx_rups has cognitive complexity 93 (threshold 15). Drivers by points: if/else 26 (58 pts), boolean chains 12, ternaries 4 (11 pts), loops 6 (10 pts), error handling 1 (2 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.tx_mounts (cognitive 91) REDACTED:5780— HttpCli.tx_mounts has cognitive complexity 91 (threshold 15). Drivers by points: if/else 25 (41 pts), loops 9 (21 pts), boolean chains 16, ternaries 7 (11 pts), error handling 1 (2 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
__main__.main (cognitive 90) copyparty/__main__.py:2368— __main__.main has cognitive complexity 90 (threshold 15). Drivers by points: if/else 45 (61 pts), error handling 7 (10 pts), loops 9 (10 pts), boolean chains 9 (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.
HttpCli.tx_file (cognitive 89) REDACTED:4854— HttpCli.tx_file has cognitive complexity 89 (threshold 15). Drivers by points: if/else 43 (64 pts), boolean chains 15, error handling 3 (6 pts), ternaries 2 (3 pts), loops 1 (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.
ThumbCli.get (cognitive 88) copyparty/th_cli.py:53— ThumbCli.get has cognitive complexity 88 (threshold 15). Drivers by points: if/else 31 (51 pts), boolean chains 19, ternaries 5 (13 pts), error handling 3 (4 pts), loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.tx_ups (cognitive 83) REDACTED:6255— HttpCli.tx_ups has cognitive complexity 83 (threshold 15). Drivers by points: if/else 32 (59 pts), boolean chains 11, loops 5 (8 pts), ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mtag.parse_ffprobe (cognitive 82) copyparty/mtag.py:277— mtag.parse_ffprobe has cognitive complexity 82 (threshold 15). Drivers by points: if/else 28 (58 pts), error handling 3 (9 pts), loops 7 (9 pts), boolean chains 6 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
U2idx.run_query (cognitive 80) copyparty/u2idx.py:379— U2idx.run_query has cognitive complexity 80 (threshold 15). Drivers by points: if/else 22 (50 pts), loops 5 (10 pts), boolean chains 8, ternaries 3 (8 pts), error handling 1 (4 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.
U2idx.search (cognitive 78) copyparty/u2idx.py:204— U2idx.search has cognitive complexity 78 (threshold 15). Drivers by points: if/else 25 (58 pts), loops 4 (9 pts), error handling 3 (8 pts), boolean chains 3 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpSrv.thr_listen (cognitive 77) REDACTED:327— HttpSrv.thr_listen has cognitive complexity 77 (threshold 15). Drivers by points: if/else 17 (45 pts), error handling 5 (16 pts), loops 4 (9 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._mv_file (cognitive 75) REDACTED:4846— Up2k._mv_file has cognitive complexity 75 (threshold 15). Drivers by points: if/else 25 (45 pts), error handling 6 (14 pts), boolean chains 12, loops 1 (4 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.handle_post_binary (cognitive 73) REDACTED:3359— HttpCli.handle_post_binary has cognitive complexity 73 (threshold 15). Drivers by points: if/else 29 (42 pts), error handling 6 (10 pts), loops 4 (10 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.tx_pipe (cognitive 71) REDACTED:5254— HttpCli.tx_pipe has cognitive complexity 71 (threshold 15). Drivers by points: if/else 20 (46 pts), loops 4 (10 pts), error handling 3 (9 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.tx_zip (cognitive 70) REDACTED:5407— HttpCli.tx_zip has cognitive complexity 70 (threshold 15). Drivers by points: if/else 20 (38 pts), boolean chains 15, loops 5 (13 pts), error handling 1 (2 pts), ternaries 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
help2html.cnv (cognitive 70) scripts/help2html.py:36— help2html.cnv has cognitive complexity 70 (threshold 15). Drivers by points: if/else 27 (64 pts), boolean chains 4, loops 2 (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.
HttpCli.handle_text_upload (cognitive 69) REDACTED:4323— HttpCli.handle_text_upload has cognitive complexity 69 (threshold 15). Drivers by points: if/else 26 (49 pts), boolean chains 7, error handling 4 (7 pts), loops 1 (4 pts), ternaries 1 (2 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Metrics.tx (cognitive 68) copyparty/metrics.py:19— Metrics.tx has cognitive complexity 68 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 6 (13 pts), boolean chains 10, error handling 3 (6 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
browser.fmt_ren (cognitive 65) copyparty/web/browser.js:3826— browser.fmt_ren has cognitive complexity 65 (threshold 15). Drivers by points: if/else 21 (51 pts), loops 3 (9 pts), boolean chains 4, error handling 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._symlink (cognitive 64) REDACTED:3748— Up2k._symlink has cognitive complexity 64 (threshold 15). Drivers by points: if/else 27 (44 pts), boolean chains 8, error handling 4 (8 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fmt_ren::dive (cognitive 64) copyparty/web/browser.js:3828— fmt_ren::dive has cognitive complexity 64 (threshold 15). Drivers by points: if/else 21 (51 pts), loops 3 (9 pts), boolean chains 4 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util._runhook (cognitive 63) copyparty/util.py:4196— util._runhook has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (43 pts), error handling 3 (8 pts), ternaries 3 (6 pts), boolean chains 4, loops 1 (2 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.
fusefuzz.main (cognitive 60) scripts/fusefuzz.py:34— fusefuzz.main has cognitive complexity 60 (threshold 15). Drivers by points: loops 10 (34 pts), if/else 4 (23 pts), boolean chains 3 (nesting depth added 43). 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.
AuthSrv.dbg_ls (cognitive 58) copyparty/authsrv.py:3711— AuthSrv.dbg_ls has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 6 (9 pts), ternaries 2 (6 pts), error handling 3 (5 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._sched_rescan (cognitive 57) REDACTED:557— Up2k._sched_rescan has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 4 (10 pts), error handling 2 (5 pts), boolean chains 3 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
md.convert_markdown (cognitive 57) copyparty/web/md.js:196— md.convert_markdown has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 8 (11 pts), error handling 5 (8 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 21). Of this number, 55 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.
dbtool.compare (cognitive 56) bin/dbtool.py:50— dbtool.compare has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (46 pts), error handling 2 (7 pts), loops 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.ren_open (cognitive 56) copyparty/util.py:1864— util.ren_open has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (36 pts), loops 4 (8 pts), boolean chains 6, error handling 2 (6 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.handle_post (cognitive 55) REDACTED:2472— HttpCli.handle_post has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (42 pts), error handling 2 (6 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.gen_tree (cognitive 54) REDACTED:6125— HttpCli.gen_tree has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 7, loops 3 (6 pts), error handling 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._verify_integrity (cognitive 54) REDACTED:1972— Up2k._verify_integrity has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 11, error handling 3 (7 pts), loops 4, ternaries 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
md2.keydown (cognitive 54) REDACTED:982— md2.keydown has cognitive complexity 54 (threshold 15). Drivers by points: if/else 27 (46 pts), boolean chains 8 (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.
sortfiles (cognitive 54) copyparty/web/browser.js:3734— sortfiles has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 7 (14 pts), ternaries 4 (8 pts), boolean chains 2, error handling 1 (nesting depth added 25). Of this number, 41 points are the body's own statements and 13 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.
CPPF.get_cached_file (cognitive 53) bin/partyfuse-streaming.py:613— CPPF.get_cached_file has cognitive complexity 53 (threshold 15). Drivers by points: if/else 23 (43 pts), boolean chains 9, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AuthSrv._map_volume_idp (cognitive 53) copyparty/authsrv.py:1182— AuthSrv._map_volume_idp has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 13, loops 4 (7 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.
authsrv.upgrade_cfg_fmt (cognitive 53) copyparty/authsrv.py:4171— authsrv.upgrade_cfg_fmt has cognitive complexity 53 (threshold 15). Drivers by points: if/else 23 (43 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._run_one_mtp (cognitive 53) REDACTED:2507— Up2k._run_one_mtp has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 8 (13 pts), error handling 2 (4 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._relink (cognitive 52) REDACTED:5181— Up2k._relink has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (25 pts), error handling 5 (10 pts), boolean chains 8, loops 5 (7 pts), ternaries 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fmt_table2 (cognitive 52) REDACTED:748— fmt_table2 has cognitive complexity 52 (threshold 15). Drivers by points: if/else 18 (33 pts), loops 9 (13 pts), ternaries 4 (5 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TcpSrv._listen (cognitive 51) copyparty/tcpsrv.py:253— TcpSrv._listen has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (39 pts), error handling 4 (7 pts), boolean chains 4, ternaries 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.
Up2k._cp_file (cognitive 51) REDACTED:4586— Up2k._cp_file has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (28 pts), error handling 6 (14 pts), boolean chains 9 (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.
SvcHub.check_ver (cognitive 50) REDACTED:2063— SvcHub.check_ver has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (31 pts), error handling 5 (13 pts), loops 3 (6 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.handle_share (cognitive 49) REDACTED:6686— HttpCli.handle_share has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 8, loops 4 (6 pts), ternaries 4 (5 pts), error handling 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.
HttpCli.handle_post_json (cognitive 48) REDACTED:3174— HttpCli.handle_post_json has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (32 pts), error handling 7 (10 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli._add_logues (cognitive 48) REDACTED:4624— HttpCli._add_logues has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (34 pts), loops 4 (6 pts), ternaries 4 (6 pts), boolean chains 2 (nesting depth added 27). 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.
MPlayer (cognitive 48) copyparty/web/browser.js:1721— MPlayer has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (28 pts), ternaries 7 (9 pts), boolean chains 8, loops 3 (nesting depth added 9). Most of this is not in the body itself: 10 of the 48 points are its own statements and the rest belongs to 17 function items inside it that branch (fader, read_order, preload::(anonymous)::drop, …). 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.
CPPF.get_cached_file (cognitive 47) bin/partyfuse2.py:378— CPPF.get_cached_file has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (40 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VFS.chk_ap (cognitive 47) copyparty/authsrv.py:954— VFS.chk_ap has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (29 pts), ternaries 2 (7 pts), loops 2 (5 pts), error handling 1 (4 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.
Donut (cognitive 47) copyparty/web/up2k.js:630— Donut has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 9 (14 pts), boolean chains 8, loops 1 (nesting depth added 15). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 6 function items inside it that branch ((anonymous), svg, on, …). 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.
authsrv.expand_config_file (cognitive 46) copyparty/authsrv.py:4079— authsrv.expand_config_file has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (33 pts), loops 4 (9 pts), boolean chains 4 (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.
HttpSrv._pregen_thumbs (cognitive 46) REDACTED:668— HttpSrv._pregen_thumbs has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 4 (8 pts), error handling 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._new_upload (cognitive 46) REDACTED:5382— Up2k._new_upload has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (32 pts), error handling 3 (7 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.tx_rss (cognitive 45) REDACTED:1734— HttpCli.tx_rss has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (22 pts), loops 5 (9 pts), boolean chains 8, ternaries 3 (5 pts), error handling 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.
Up2k.db_add (cognitive 45) REDACTED:4188— Up2k.db_add has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 4 (9 pts), boolean chains 6, error handling 3 (6 pts), loops 3 (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.
a_up2k_namefilter::process_id_list (cognitive 44) REDACTED:195— a_up2k_namefilter::process_id_list has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 6 (12 pts), ternaries 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThumbSrv._clean (cognitive 43) REDACTED:1563— ThumbSrv._clean has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (28 pts), boolean chains 6, loops 2 (5 pts), error handling 2 (3 pts), ternaries 1 (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.
Up2k.handle_mv (cognitive 43) REDACTED:4754— Up2k.handle_mv has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 8 (12 pts), boolean chains 4, error handling 1 (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.
Up2k._get_parsers (cognitive 42) REDACTED:2655— Up2k._get_parsers has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (34 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
browser.play (cognitive 42) copyparty/web/browser.js:3244— browser.play has cognitive complexity 42 (threshold 15). Drivers by points: if/else 28 (35 pts), boolean chains 5, error handling 1, 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.
VFS._ls (cognitive 41) copyparty/authsrv.py:768— VFS._ls has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (9 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AuthSrv._read_vol_str_idp (cognitive 41) copyparty/authsrv.py:1589— AuthSrv._read_vol_str_idp has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 5 (9 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.tx_md (cognitive 41) REDACTED:5613— HttpCli.tx_md has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (20 pts), ternaries 5 (8 pts), boolean chains 7, loops 3 (5 pts), 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.
browser.eval_hash (cognitive 41) copyparty/web/browser.js:3552— browser.eval_hash has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (29 pts), ternaries 3 (9 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 21). Of this number, 32 points are the body's own statements and 9 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.
HttpConn.run (cognitive 40) copyparty/httpconn.py:140— HttpConn.run has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (28 pts), error handling 2 (5 pts), loops 2 (4 pts), boolean chains 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.
SFTP_Srv._open (cognitive 40) copyparty/sftpd.py:476— SFTP_Srv._open has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 5, error handling 4 (5 pts), ternaries 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.
apply_perms (cognitive 40) copyparty/web/browser.js:8064— apply_perms has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 11, loops 5 (6 pts), ternaries 4 (6 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Ftpd.__init__ (cognitive 39) copyparty/ftpd.py:632— Ftpd.__init__ has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (27 pts), error handling 2 (5 pts), loops 3 (4 pts), boolean chains 2, ternaries 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.
HttpCli.tx_res (cognitive 39) REDACTED:4718— HttpCli.tx_res has cognitive complexity 39 (threshold 15). Drivers by points: if/else 26 (34 pts), boolean chains 5 (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.
MDNS.build_replies (cognitive 39) copyparty/mdns.py:196— MDNS.build_replies has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 5 (10 pts), ternaries 1 (3 pts), boolean chains 2 (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.
Up2k._snap_reg (cognitive 39) REDACTED:5553— Up2k._snap_reg has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 7, error handling 2 (6 pts), loops 1 (2 pts), ternaries 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.
util._zmq_hook (cognitive 39) copyparty/util.py:4095— util._zmq_hook has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (26 pts), error handling 5 (8 pts), boolean chains 5 (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.
md.init_toc (cognitive 39) copyparty/web/md.js:359— md.init_toc has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 10 (19 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TcpSrv._qr (cognitive 38) copyparty/tcpsrv.py:575— TcpSrv._qr has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (19 pts), ternaries 6 (8 pts), boolean chains 7, error handling 1 (2 pts), loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
HttpCli.tx_tail (cognitive 37) REDACTED:5131— HttpCli.tx_tail has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (28 pts), error handling 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 19). 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.
QrCode._get_penalty_score (cognitive 37) copyparty/stolen/qrcodegen.py:331— QrCode._get_penalty_score has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 6 (9 pts), ternaries 1 (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.
Up2k._drop_lost (cognitive 37) REDACTED:1884— Up2k._drop_lost has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 7 (11 pts), error handling 3 (9 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.
util._fs_mvrm (cognitive 37) copyparty/util.py:2985— util._fs_mvrm has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 5, error handling 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.
util.statdir (cognitive 37) copyparty/util.py:3539— util.statdir has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 3 (7 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.runhook (cognitive 37) copyparty/util.py:4307— util.runhook has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 8, ternaries 1 (4 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MDNS.run2 (cognitive 36) copyparty/mdns.py:337— MDNS.run2 has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 3 (6 pts), error handling 2 (4 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k.handle_chunks (cognitive 36) REDACTED:3864— Up2k.handle_chunks has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 6 (8 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tftpd.__init__ (cognitive 35) REDACTED:87— Tftpd.__init__ has cognitive complexity 35 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 8 (10 pts), error handling 3 (7 pts), ternaries 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.
util.runcmd (cognitive 35) copyparty/util.py:3807— util.runcmd has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (22 pts), error handling 3 (7 pts), ternaries 4, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.sortTable (cognitive 35) REDACTED:700— util.sortTable has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 5 (7 pts), ternaries 3 (5 pts), boolean chains 4, error handling 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.
vis_exh (cognitive 35) REDACTED:178— vis_exh has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (20 pts), loops 5 (7 pts), boolean chains 3, error handling 3, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
(anonymous) (cognitive 34) copyparty/web/browser.js:8425— (anonymous) has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 6 (11 pts), boolean chains 4, error handling 1 (nesting depth added 14). Most of this is not in the body itself: 7 of the 34 points are its own statements and the rest belongs to 4 function items inside it that branch (render, load_notation, try_render, …). 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.
SSH_Srv._check_auth_password (cognitive 33) copyparty/sftpd.py:138— SSH_Srv._check_auth_password has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 5, error handling 1 (4 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.
SvcHub.setup_db (cognitive 33) REDACTED:587— SvcHub.setup_db has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 6 (14 pts), boolean chains 1, loops 1, ternaries 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.
ThumbSrv.__init__ (cognitive 33) REDACTED:269— ThumbSrv.__init__ has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 5 (9 pts), boolean chains 7, error handling 1 (2 pts), ternaries 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
__main__.showlic (cognitive 32) copyparty/__main__.py:608— __main__.showlic has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (21 pts), error handling 3 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FtpAuth.validate_authentication (cognitive 32) copyparty/ftpd.py:62— FtpAuth.validate_authentication has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 4, error handling 1 (4 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.send_headers (cognitive 32) REDACTED:1132— HttpCli.send_headers has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 4 (8 pts), boolean chains 1, error handling 1, ternaries 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.
mtag.au_unpk (cognitive 32) copyparty/mtag.py:152— mtag.au_unpk has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1, 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.
SvcHub._check_env (cognitive 32) REDACTED:1132— SvcHub._check_env has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._e2ts_q (cognitive 32) REDACTED:2348— Up2k._e2ts_q has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 4, error handling 1 (2 pts), loops 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.
evau_error (cognitive 32) copyparty/web/browser.js:3414— evau_error has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 4 (8 pts), boolean chains 5, error handling 1 (3 pts), match/switch 1 (nesting depth added 11). Of this number, 22 points are the body's own statements and 10 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.
MTag.get_mutagen (cognitive 31) copyparty/mtag.py:752— MTag.get_mutagen has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 4 (7 pts), loops 2 (3 pts), boolean chains 2, ternaries 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.
MTag.get_bin (cognitive 31) copyparty/mtag.py:827— MTag.get_bin has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 2 (4 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MCast.setup_socket (cognitive 31) copyparty/multicast.py:235— MCast.setup_socket has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (15 pts), 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.
VFS.walk (cognitive 30) copyparty/authsrv.py:816— VFS.walk has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 5 (8 pts), boolean chains 7 (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.
fsutil.ramdisk_chk (cognitive 30) copyparty/fsutil.py:221— fsutil.ramdisk_chk has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7, loops 3 (5 pts), ternaries 3 (4 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.
MultipartParser._read_header (cognitive 30) copyparty/util.py:1996— MultipartParser._read_header has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 3 (6 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FtpFs.open (cognitive 29) copyparty/ftpd.py:241— FtpFs.open has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, error handling 2 (5 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.
SvcHub._log_enabled (cognitive 29) REDACTED:1845— SvcHub._log_enabled has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (22 pts), error handling 3 (4 pts), ternaries 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.
TcpSrv.run (cognitive 28) copyparty/tcpsrv.py:363— TcpSrv.run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2 (4 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._check_lifetimes (cognitive 28) REDACTED:695— Up2k._check_lifetimes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (6 pts), boolean chains 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.
MultipartParser._read_data (cognitive 28) copyparty/util.py:2074— MultipartParser._read_data has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), error handling 2 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
md.copydom (cognitive 28) copyparty/web/md.js:71— md.copydom has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 4 (5 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sutil.gfilter2 (cognitive 27) copyparty/sutil.py:101— sutil.gfilter2 has cognitive complexity 27 (threshold 15). Drivers by points: error handling 3 (11 pts), loops 4 (7 pts), if/else 2 (6 pts), ternaries 1 (2 pts), boolean chains 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.
TcpSrv.detect_interfaces (cognitive 27) copyparty/tcpsrv.py:464— TcpSrv.detect_interfaces has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (3 pts), 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.
sfx.encode (cognitive 27) scripts/sfx.py:158— sfx.encode has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 6 (9 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.tx_wopi (cognitive 26) REDACTED:1639— HttpCli.tx_wopi has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 2 (4 pts), boolean chains 3, loops 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.
SvcHub.cb_httpsrv_up (cognitive 26) REDACTED:1019— SvcHub.cb_httpsrv_up has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, ternaries 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.
Up2k._build_file_index (cognitive 26) REDACTED:1405— Up2k._build_file_index has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 10, error handling 1, 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.
Up2k.handle_cp (cognitive 26) REDACTED:4522— Up2k.handle_cp has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 5 (8 pts), boolean chains 4, 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.
uncomment.uncomment (cognitive 26) scripts/uncomment.py:17— uncomment.uncomment has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 8, 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.
dbtool.main (cognitive 25) bin/dbtool.py:209— dbtool.main has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 3, boolean chains 2, 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.
yt-ipr.freg_conv (cognitive 25) bin/mtag/yt-ipr.py:99— yt-ipr.freg_conv has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 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.
cert._gen_srv (cognitive 25) copyparty/cert.py:151— cert._gen_srv has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (15 pts), loops 3 (5 pts), boolean chains 2, error handling 2, 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.
HttpCli._cors (cognitive 25) REDACTED:1356— HttpCli._cors has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4, ternaries 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MTag.__init__ (cognitive 25) copyparty/mtag.py:512— MTag.__init__ has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (5 pts), boolean chains 4, ternaries 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.
SFTP_Srv._list_folder (cognitive 25) copyparty/sftpd.py:376— SFTP_Srv._list_folder has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, error handling 2 (3 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SMB.__init__ (cognitive 25) copyparty/smbd.py:29— SMB.__init__ has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (7 pts), error handling 4 (6 pts), if/else 5 (6 pts), loops 5 (6 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SvcHub.setup_share_db (cognitive 25) REDACTED:759— SvcHub.setup_share_db has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), loops 4 (8 pts), error handling 3, boolean chains 1, ternaries 1 (nesting depth added 5). 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.
dbtool.copy_mtp (cognitive 24) bin/dbtool.py:145— dbtool.copy_mtp has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 1, 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.
cksum.main (cognitive 24) bin/mtag/cksum.py:28— cksum.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (4 pts), error handling 1 (3 pts), ternaries 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.
HttpCli.tx_ls (cognitive 24) REDACTED:6971— HttpCli.tx_ls has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (9 pts), error handling 1 (2 pts), ternaries 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.
Tftpd._open (cognitive 24) REDACTED:352— Tftpd._open has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k.get_unfinished_by_user (cognitive 24) REDACTED:433— Up2k.get_unfinished_by_user has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 7, ternaries 2 (4 pts), 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.
Up2k._forget_file (cognitive 24) REDACTED:5121— Up2k._forget_file has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, ternaries 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.
util.read_socket_chunked (cognitive 24) copyparty/util.py:3196— util.read_socket_chunked has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (5 pts), loops 3 (5 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.
jcp2 (cognitive 24) REDACTED:1227— jcp2 has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (18 pts), loops 2 (4 pts), if/else 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 24) copyparty/web/browser.js:9126— (anonymous) has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (9 pts), ternaries 2 (8 pts), if/else 3 (5 pts), error handling 1 (2 pts) (nesting depth added 14). Most of this is not in the body itself: 0 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 9128). 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.
show_md (cognitive 24) copyparty/web/browser.js:9197— show_md has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 3 (4 pts), ternaries 2 (4 pts), boolean chains 2, loops 2 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bos.utime_c (cognitive 23) copyparty/bos/bos.py:106— bos.utime_c has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (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.
HttpCli.handle_search (cognitive 23) REDACTED:3295— HttpCli.handle_search has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.get_pwd_cookie (cognitive 23) REDACTED:3701— HttpCli.get_pwd_cookie has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (4 pts), boolean chains 3, 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.
Ico.get (cognitive 23) REDACTED:18— Ico.get has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 2 (6 pts), ternaries 3 (5 pts), loops 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SMB._open (cognitive 23) copyparty/smbd.py:232— SMB._open has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3 (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.
SSDPd.run2 (cognitive 23) copyparty/ssdp.py:142— SSDPd.run2 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (4 pts), loops 3 (4 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.
SvcHub._feature_test (cognitive 23) REDACTED:1070— SvcHub._feature_test has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (8 pts), error handling 1 (2 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.
SvcHub._setup_logfile (cognitive 23) REDACTED:1495— SvcHub._setup_logfile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 3 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._tag_thr (cognitive 23) REDACTED:2725— Up2k._tag_thr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 1 (3 pts), error handling 1 (2 pts), boolean chains 1, 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.
up2k.U2pvis (cognitive 23) copyparty/web/up2k.js:157— up2k.U2pvis has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (7 pts), loops 4 (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.
util.xhrchk (cognitive 23) REDACTED:2387— util.xhrchk has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (11 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.
__main__.run_argparse (cognitive 22) copyparty/__main__.py:2269— __main__.run_argparse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (6 pts), loops 3 (4 pts), boolean chains 1, ternaries 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.
VFS.zipgen (cognitive 22) copyparty/authsrv.py:907— VFS.zipgen has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 pts), ternaries 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AuthSrv.setup_chpw (cognitive 22) copyparty/authsrv.py:3588— AuthSrv.setup_chpw has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 3, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.reply (cognitive 22) REDACTED:1203— HttpCli.reply has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, 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.
HttpCli.handle_new_md (cognitive 22) REDACTED:3813— HttpCli.handle_new_md has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, 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.
MParser.__init__ (cognitive 22) copyparty/mtag.py:94— MParser.__init__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 1 (2 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.
qrkode.qr2txt (cognitive 22) copyparty/qrkode.py:43— qrkode.qr2txt has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (10 pts), ternaries 2 (8 pts), if/else 3, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SvcHub.run (cognitive 22) REDACTED:1559— SvcHub.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 4 (6 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SvcHub.shutdown (cognitive 22) REDACTED:1716— SvcHub.shutdown has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 2 (3 pts), 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.
StreamZip.gen (cognitive 22) copyparty/szip.py:278— StreamZip.gen has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (6 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TcpSrv._set_wintitle (cognitive 22) copyparty/tcpsrv.py:540— TcpSrv._set_wintitle has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (7 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.
Up2k._confirm_chunks (cognitive 22) REDACTED:3974— Up2k._confirm_chunks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (7 pts), error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
browser.langtest2 (cognitive 22) copyparty/web/browser.js:776— browser.langtest2 has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
up2k_flagbus (cognitive 22) copyparty/web/up2k.js:60— up2k_flagbus has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 5 (nesting depth added 2). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to 7 function items inside it that branch (onmessage, take, tx, …). 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.
goto (cognitive 22) copyparty/web/browser.js:1172— goto has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MDNS.build_svcs (cognitive 21) copyparty/mdns.py:137— MDNS.build_svcs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 5, loops 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Sftpd.__init__ (cognitive 21) copyparty/sftpd.py:755— Sftpd.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (5 pts), loops 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SvcHub._log_disabled (cognitive 21) REDACTED:1786— SvcHub._log_disabled has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (20 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.
SvcHub._log_en_f2 (cognitive 21) REDACTED:1910— SvcHub._log_en_f2 has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 3 (4 pts), ternaries 3 (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.
Tftpd._ls (cognitive 21) REDACTED:280— Tftpd._ls has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2, 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.
util.visual_length (cognitive 21) copyparty/util.py:4451— util.visual_length has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, 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.
rave.raver (cognitive 21) contrib/plugins/rave.js:109— rave.raver has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 5 (6 pts), boolean chains 3, 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.
Gateway.parse_html (cognitive 20) bin/partyfuse-streaming.py:462— Gateway.parse_html has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
__main__.args_from_cfg (cognitive 20) copyparty/__main__.py:448— __main__.args_from_cfg has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), ternaries 1 (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.
AuthSrv._read_vol_str (cognitive 20) copyparty/authsrv.py:1668— AuthSrv._read_vol_str has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (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.
FtpFs.v2a (cognitive 20) copyparty/ftpd.py:163— FtpFs.v2a has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9, 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.
FtpFs.listdir (cognitive 20) copyparty/ftpd.py:342— FtpFs.listdir has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (4 pts), boolean chains 2, loops 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.
HttpCli.tx_svcs (cognitive 20) REDACTED:5727— HttpCli.tx_svcs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 4, 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.
MDNS.send_probes (cognitive 20) copyparty/mdns.py:283— MDNS.send_probes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts), error handling 1 (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.
Tftpd._start (cognitive 20) REDACTED:202— Tftpd._start has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 3 (8 pts), boolean chains 1, loops 1, ternaries 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.
ThumbSrv.run_extractor (cognitive 20) REDACTED:682— ThumbSrv.run_extractor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, error handling 2, 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.
ThumbSrv.conv_spec (cognitive 20) REDACTED:1134— ThumbSrv.conv_spec has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 3, boolean chains 2, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Up2k._build_tags_index_2 (cognitive 20) REDACTED:2283— Up2k._build_tags_index_2 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.killtree (cognitive 20) copyparty/util.py:3734— util.killtree has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 4 (7 pts), error handling 2 (3 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.
util.runihook (cognitive 20) copyparty/util.py:4027— util.runihook has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, error handling 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.
sfx.unpack (cognitive 20) scripts/sfx.py:264— sfx.unpack has cognitive complexity 20 (threshold 15). Drivers by points: error handling 7 (8 pts), if/else 7 (8 pts), boolean chains 2, loops 2 (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.
Gateway.getconn_winfsp (cognitive 19) bin/partyfuse-streaming.py:294— Gateway.getconn_winfsp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (6 pts), loops 2 (4 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.
partyjournal.main (cognitive 19) bin/partyjournal.py:71— partyjournal.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (3 pts), loops 2, ternaries 1 (2 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.
AuthSrv.setup_pwhash (cognitive 19) copyparty/authsrv.py:3646— AuthSrv.setup_pwhash has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.handle_eshare (cognitive 19) REDACTED:6635— HttpCli.handle_eshare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, 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, 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.
MCast.map_client (cognitive 19) copyparty/multicast.py:356— MCast.map_client has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, ternaries 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.
SFTP_Srv.v2a (cognitive 19) copyparty/sftpd.py:315— SFTP_Srv.v2a has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
surrogateescape.encodefilename (cognitive 19) copyparty/stolen/surrogateescape.py:113— surrogateescape.encodefilename has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 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.
NetMap.__init__ (cognitive 19) copyparty/util.py:974— NetMap.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 3 (5 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.
browser.render_m3u (cognitive 19) copyparty/web/browser.js:6864— browser.render_m3u has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.linksplit (cognitive 19) REDACTED:793— util.linksplit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 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.
util.humansize_fuzzy (cognitive 19) REDACTED:1107— util.humansize_fuzzy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19. 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.
showsort (cognitive 19) REDACTED:638— showsort has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 5 (7 pts), loops 3, 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.
unforget.main (cognitive 18) bin/unforget.py:48— unforget.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VFS.check_landmarks (cognitive 18) copyparty/authsrv.py:1003— VFS.check_landmarks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 1 (2 pts), loops 2, 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.
Up2k.get_state (cognitive 18) REDACTED:349— Up2k.get_state has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 1 (3 pts), ternaries 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Up2k._finish_upload (cognitive 18) REDACTED:4017— Up2k._finish_upload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 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.
util.alltrace (cognitive 18) copyparty/util.py:1713— util.alltrace has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), 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.
util.sendfile_kern (cognitive 18) copyparty/util.py:3484— util.sendfile_kern has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (4 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.
a.uh2 (cognitive 18) scripts/strip_hints/a.py:57— a.uh2 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 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.
(anonymous) (cognitive 18) REDACTED:1759— (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7 (nesting depth added 1). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to 9 function items inside it that branch (show, scrollchk, hide, …). 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.
VFS._canonical_shr (cognitive 17) copyparty/authsrv.py:706— VFS._canonical_shr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, 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.
HttpSrv.__init__ (cognitive 17) REDACTED:115— HttpSrv.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, ternaries 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.
MTag._get_xattr (cognitive 17) copyparty/mtag.py:709— MTag._get_xattr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 2 (5 pts), loops 2 (4 pts), 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.
dns._format_ipv6 (cognitive 17) copyparty/stolen/dnslib/dns.py:582— dns._format_ipv6 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 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.
QrCode._draw_codewords (cognitive 17) copyparty/stolen/qrcodegen.py:303— QrCode._draw_codewords has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SvcHub._sticky_qr (cognitive 17) REDACTED:949— SvcHub._sticky_qr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 1 (2 pts), boolean chains 1, 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, 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.
Up2k._untaken (cognitive 17) REDACTED:3688— Up2k._untaken has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, error handling 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, 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.
util.stackmon (cognitive 17) copyparty/util.py:1752— util.stackmon has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), error handling 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.build_netmap (cognitive 17) copyparty/util.py:3278— util.build_netmap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
md2.genmapq (cognitive 17) REDACTED:35— md2.genmapq has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 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.
onclick (cognitive 17) copyparty/web/browser.js:9710— onclick has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6 (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.
partyfuse-streaming.main (cognitive 16) bin/partyfuse-streaming.py:1014— partyfuse-streaming.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, loops 3 (6 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (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.
__main__.sfx_tpoke (cognitive 16) copyparty/__main__.py:578— __main__.sfx_tpoke has cognitive complexity 16 (threshold 15). Drivers by points: error handling 2 (6 pts), loops 3 (5 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lim.dive (cognitive 16) copyparty/authsrv.py:319— Lim.dive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, ternaries 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, 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.
AuthSrv.chpw (cognitive 16) copyparty/authsrv.py:3539— AuthSrv.chpw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, ternaries 2 (3 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HttpCli._mkdir (cognitive 16) REDACTED:3774— HttpCli._mkdir has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpCli.tx_shares (cognitive 16) REDACTED:6587— HttpCli.tx_shares has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MDNS.process (cognitive 16) copyparty/mdns.py:577— MDNS.process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 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.
MTag.compare (cognitive 16) copyparty/mtag.py:671— MTag.compare has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), 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.
_posix.get_adapters (cognitive 16) copyparty/stolen/ifaddr/_posix.py:33— _posix.get_adapters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 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.
sutil.gfilter (cognitive 16) copyparty/sutil.py:59— sutil.gfilter has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (9 pts), loops 3 (4 pts), if/else 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.
ThumbSrv.get (cognitive 16) REDACTED:399— ThumbSrv.get has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2, ternaries 1 (2 pts), 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.
util.read_header (cognitive 16) copyparty/util.py:2212— util.read_header has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 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.
util.pathmod (cognitive 16) copyparty/util.py:2760— util.pathmod has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.list_nics (cognitive 16) copyparty/util.py:3253— util.list_nics has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 4, if/else 2 (4 pts), loops 2 (3 pts), ternaries 1 (3 pts), error handling 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.
util.unescape_cookie (cognitive 16) copyparty/util.py:3644— util.unescape_cookie has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), 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.
util.retchk (cognitive 16) copyparty/util.py:3901— util.retchk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), error handling 2 (3 pts), boolean chains 2 (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.
util.load_resource (cognitive 16) copyparty/util.py:4758— util.load_resource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, 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.
sfx.testchk (cognitive 16) scripts/sfx.py:104— sfx.testchk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 2 (6 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
browser.sel_move (cognitive 16) copyparty/web/browser.js:10140— browser.sel_move has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (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.
md2.md_p_jump (cognitive 16) REDACTED:668— md2.md_p_jump has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (8 pts), boolean chains 4, if/else 3 (4 pts) (nesting depth added 5). 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.
Near-duplicate member pair (94 shared lines) REDACTED:4589— REDACTED:4589-4752 | REDACTED:4849-5078 — These two members are variants of one another: 94 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (44 shared lines) REDACTED:6256— REDACTED:6256-6420 | REDACTED:6423-6559 — These two members are variants of one another: 44 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Duplicated block (34 lines × 2) REDACTED:4698— REDACTED:4698-4731 | REDACTED:5022-5055 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:5057` calls `wunlink` and `REDACTED:4733` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (23 lines × 2) REDACTED:2743— REDACTED:2743-2765 | REDACTED:2918-2940 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:2941` calls `wunlink` and `REDACTED:2766` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19 lines × 4) copyparty/ftpd.py:262— copyparty/ftpd.py:262-280 | copyparty/sftpd.py:520-538 | copyparty/smbd.py:255-273 | REDACTED:373-391 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `copyparty/ftpd.py:262` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) REDACTED:6866— REDACTED:6866-6879 | REDACTED:6898-6911 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12–13 lines × 3) REDACTED:2752— REDACTED:2752-2763 | REDACTED:2927-2938 | REDACTED:4508-4520 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2752` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:2941` calls `wunlink` and `REDACTED:2766` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–13 lines × 2) REDACTED:3844— REDACTED:3844-3855 | REDACTED:4460-4472 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3844` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) REDACTED:4450— REDACTED:4450-4462 | REDACTED:4498-4510 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4450` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) REDACTED:1046— REDACTED:1046-1057 | REDACTED:2547-2558 | REDACTED:2597-2608 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1046` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) REDACTED:1892— REDACTED:1892-1903 | REDACTED:1957-1967 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1892` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) REDACTED:2261— REDACTED:2261-2271 | REDACTED:2330-2339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–10 lines × 2) REDACTED:352— REDACTED:352-359 | REDACTED:5684-5693 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–10 lines × 2) copyparty/sftpd.py:449— copyparty/sftpd.py:449-457 | copyparty/sftpd.py:616-625 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8–9 lines × 3) copyparty/web/a/partyfuse.py:493— copyparty/web/a/partyfuse.py:493-501 | copyparty/web/a/partyfuse.py:543-550 | copyparty/web/a/partyfuse.py:594-601 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 4) REDACTED:2201— REDACTED:2201-2207 | REDACTED:2260-2266 | REDACTED:2329-2335 | REDACTED:2348-2354 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6–7 lines × 2) REDACTED:3539— REDACTED:3539-3544 | REDACTED:5428-5434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (49 lines × 2 locations) REDACTED:351— REDACTED:351 · copyparty/web/mde.js:112 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (21 lines × 2 locations) copyparty/web/browser.js:4654— copyparty/web/browser.js:4654 · copyparty/web/browser.js:4705 — 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 with local edits (19 matched lines × 2 locations) · ×1
Duplicated block with local edits (19 matched lines × 2 locations) REDACTED:423— REDACTED:423 · copyparty/web/mde.js:178 — the two spans are one implementation copied and then locally edited — 143 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.
Duplicated block (13 lines × 2 locations) REDACTED:610— REDACTED:610 · REDACTED:623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 3 locations) REDACTED:1081— REDACTED:1081 · REDACTED:1089 · REDACTED:1097 — all 3 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 (7 lines × 5 locations) copyparty/web/baguettebox.js:660— copyparty/web/baguettebox.js:660 · copyparty/web/baguettebox.js:667 · copyparty/web/baguettebox.js:685 · copyparty/web/baguettebox.js:692 · +1 more site(s) not listed — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (5 lines × 2 locations) copyparty/web/browser.js:9934— copyparty/web/browser.js:9934 · copyparty/web/browser.js:9939 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 3 locations) REDACTED:263— REDACTED:263 · REDACTED:415 · copyparty/web/mde.js:170 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Complex function ahotkeys (cyclomatic 136, cognitive 164) copyparty/web/browser.js:6248— ahotkeys has cyclomatic complexity 136 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 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.
Complex function taskerd (cyclomatic 74, cognitive 132) copyparty/web/up2k.js:1836— taskerd has cyclomatic complexity 74 and cognitive complexity 132; 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.
Complex function orz (cyclomatic 68, cognitive 150) copyparty/web/up2k.js:2589— orz has cyclomatic complexity 68 and cognitive complexity 150; 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.
Complex function recvls (cyclomatic 51, cognitive 60) copyparty/web/browser.js:7501— recvls has cyclomatic complexity 51 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 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.
Complex function keyDownHandler (cyclomatic 50, cognitive 46) copyparty/web/baguettebox.js:401— keyDownHandler has cyclomatic complexity 50 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function gentab (cyclomatic 44, cognitive 83) copyparty/web/browser.js:7654— gentab has cyclomatic complexity 44 and cognitive complexity 83; 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.
Complex function drawbuf (cyclomatic 41, cognitive 41) copyparty/web/browser.js:2182— drawbuf has cyclomatic complexity 41 and cognitive complexity 41; 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.
Complex function loadgrid (cyclomatic 40, cognitive 75) copyparty/web/browser.js:5840— loadgrid has cyclomatic complexity 40 and cognitive complexity 75; 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.
Complex function convert_markdown (cyclomatic 37, cognitive 53) copyparty/web/md.js:196— convert_markdown has cyclomatic complexity 37 and cognitive complexity 53; 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.
Complex function etafun (cyclomatic 37, cognitive 45) copyparty/web/up2k.js:1647— etafun has cyclomatic complexity 37 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 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.
Complex function updater_impl (cyclomatic 35, cognitive 54) copyparty/web/browser.js:2651— updater_impl has cyclomatic complexity 35 and cognitive complexity 54; 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.
Complex function apply_perms (cyclomatic 35, cognitive 40) copyparty/web/browser.js:8064— apply_perms has cyclomatic complexity 35 and cognitive complexity 40; 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.
Complex function keydown (cyclomatic 34, cognitive 54) REDACTED:982— keydown has cyclomatic complexity 34 and cognitive complexity 54; 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 play (cyclomatic 32, cognitive 42) · ×1
Complex function play (cyclomatic 32, cognitive 42) copyparty/web/browser.js:3244— play has cyclomatic complexity 32 and cognitive complexity 42; 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.
Complex function up_them (cyclomatic 30, cognitive 49) copyparty/web/up2k.js:1486— up_them has cyclomatic complexity 30 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 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.
Complex function vis_exh (cyclomatic 30, cognitive 35) REDACTED:178— vis_exh has cyclomatic complexity 30 and cognitive complexity 35; 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.
Complex function fmt_table2 (cyclomatic 28, cognitive 52) REDACTED:748— fmt_table2 has cyclomatic complexity 28 and cognitive complexity 52; 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.
Complex function apply (cyclomatic 28, cognitive 30) copyparty/web/browser.js:2915— apply has cyclomatic complexity 28 and cognitive complexity 30; 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.
Complex function a_up2k_namefilter (cyclomatic 26, cognitive 74) REDACTED:40— a_up2k_namefilter has cyclomatic complexity 26 and cognitive complexity 74; 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.
Complex function dive (cyclomatic 26, cognitive 64) copyparty/web/browser.js:3828— dive has cyclomatic complexity 26 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 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.
Test Coverage — 0% of 44 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
Dead file (~2434 LoC) REDACTED— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~1412 LoC) copyparty/web/baguettebox.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~1238 LoC) REDACTED— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~756 LoC) copyparty/web/tl/vie.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~734 LoC) copyparty/web/tl/cze.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~733 LoC) copyparty/web/tl/pol.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~729 LoC) copyparty/web/tl/spa.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~727 LoC) copyparty/web/tl/nno.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~725 LoC) copyparty/web/tl/tur.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~529 LoC) copyparty/web/md.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~506 LoC) contrib/plugins/meadup.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~297 LoC) REDACTED— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~208 LoC) contrib/plugins/rave.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~204 LoC) copyparty/web/mde.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~140 LoC) contrib/plugins/quickmove.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~117 LoC) contrib/plugins/graft-thumbs.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~112 LoC) copyparty/web/svcs.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~99 LoC) copyparty/web/shares.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~93 LoC) contrib/plugins/banner.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~79 LoC) contrib/plugins/minimal-up2k.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~75 LoC) copyparty/web/rups.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~60 LoC) copyparty/web/dbg-audio.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~45 LoC) contrib/plugins/up2k-hooks.js— no import path from any entry point (6 application, 0 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
No SAST — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No security response headers detected contrib/nginx/copyparty.conf:65— No Content-Security-Policy / X-Frame-Options / X-Content-Type-Options configuration found — defense in depth, even when a reverse proxy could set them. This is reported because `copyparty.conf` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
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.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry) — not scanned yet).
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.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
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.
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.
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.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry) — not scanned yet).
0
—
Run 01a0de7a-e8c1-732c-93aa-83f1fb8470b9 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 65 · Warnings: 954 · Recommendations: 17 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 26-09-2026 @ 16:09 UTC.
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.