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

lutzroeder/netron

Measured 13 November 2026, 19:32 UTC, at code version 37db770

First survey, so nothing to compare with yet
CAI score 32out of 100 Weak
CriticalWeakAdequateStrongExemplary

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

A large codebase: 209,236 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 1.2 person-years · Weakest lens: Code Health, 17

Findings by how serious they are

33 critical 1410 serious 74 minor

12 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 19:32 UTC

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

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

65of 65 dimensions measured by tools.
1505of 1517 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
65dimensions across 7 lenses, read from 209,236 lines of product code in 2 projects.
Chapters

Executive summary

lutzroeder/netron falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 32 out of 100 and is rated Weak, and 19 of its 33 critical findings are security problems.

Code Health, at 17, is the weakest lens and counts most in the score. The best first step for the work it takes is recording design decisions, worth about 2 points. Adding type checking would lift Code Health itself, worth about 3 points. Raising Code Health to 70 would lift the score to about 45.

Ten pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Three known security holes in the packages the code depends on can be used by attackers, and six images have no description for people who can't see them. Pinning each tool to an exact version, updating the vulnerable packages and describing the images would close these risks. Limiting each secret to its own step would fix the two secrets exposed to more of the pipeline than needed, and the two places where the code runs text as code or as a command need a direct call instead. The three buttons or links with no name need a name, even when they only show an icon.

The product code is 209,236 lines, about €180,000 to rebuild.

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

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

If Code Health rose from 17 to 70, the lowest score rated Strong, the score would rise from 32 to about 45.

Code composition: what the lines of code are
Product code 99%Tests 1%
Rebuild cost: about €180,000 · Estimate
Cost to rebuild€60,000 to €300,000, for 993 to 3,151 hours of work, about 1.2 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 32. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 209,236 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json.
Raises the score by about 2 points · Low effort · ADR Quality
2
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 3 points · Medium effort · Text alternatives
3
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.
Raises the score by about 3 points · Medium effort · Type Safety

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €180,000 to build again, about 1.2 person-years of work. Its weakest lens is Code Health, at 17 (Critical). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 2 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 10,805 lines over the last 90 days, which is about 43,820 lines a year. At that pace, the extra work comes to an estimated 5.5 to 33.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

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

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 (global)2 source3 source.acuity4 source.app5 source.armnn6 source.armnn-schema7 source.barracuda8 source.base9 source.bigdl10 source.bigdl-proto11 source.browser12 source.caffe13 source.caffe-proto14 source.caffe215 source.caffe2-proto16 source.catboost17 source.catboost-schema18 source.circle19 source.circle-schema20 source.cntk21 source.cntk-proto22 source.coreml23 source.coreml-proto24 source.dagre25 source.darknet26 source.desktop27 source.dl4j28 source.dlc29 source.dlc-schema30 source.dnn31 source.dnn-proto32 source.dot33 source.espdl34 source.espdl-schema35 source.espresso36 source.executorch37 source.executorch-schema38 source.onnx-proto39 source.python40 source.rknn
1 (global)
2 source
3 source.acuity
4 source.app
5 source.armnn
6 source.armnn-schema
7 source.barracuda
8 source.base
9 source.bigdl
10 source.bigdl-proto
11 source.browser
12 source.caffe
13 source.caffe-proto
14 source.caffe2
15 source.caffe2-proto
16 source.catboost
17 source.catboost-schema
18 source.circle
19 source.circle-schema
20 source.cntk
21 source.cntk-proto
22 source.coreml
23 source.coreml-proto
24 source.dagre
25 source.darknet
26 source.desktop
27 source.dl4j
28 source.dlc
29 source.dlc-schema
30 source.dnn
31 source.dnn-proto
32 source.dot
33 source.espdl
34 source.espdl-schema
35 source.espresso
36 source.executorch
37 source.executorch-schema
38 source.onnx-proto
39 source.python1
40 source.rknn1
Uses a module listed above itPart of a loopThe module itself
1 (global)2 source3 source.acuity4 source.app5 source.armnn6 source.armnn-schema7 source.barracuda8 source.base9 source.bigdl10 source.bigdl-proto11 source.browser12 source.caffe13 source.caffe-proto14 source.caffe215 source.caffe2-proto16 source.catboost17 source.catboost-schema18 source.circle19 source.circle-schema20 source.cntk21 source.cntk-proto22 source.coreml23 source.coreml-proto24 source.dagre25 source.darknet26 source.desktop27 source.dl4j28 source.dlc29 source.dlc-schema30 source.dnn31 source.dnn-proto32 source.dot33 source.espdl34 source.espdl-schema35 source.espresso36 source.executorch37 source.executorch-schema38 source.onnx-proto39 source.python40 source.rknn(global)1source2source.acuity3source.app4source.armnn5source.armnn-schema6source.barracuda7source.base8source.bigdl9source.bigdl-proto10source.browser11source.caffe12source.caffe-proto13source.caffe214source.caffe2-proto15source.catboost16source.catboost-schema17source.circle18source.circle-schema19source.cntk20source.cntk-proto21source.coreml22source.coreml-proto23source.dagre24source.darknet25source.desktop26source.dl4j27source.dlc28source.dlc-schema29source.dnn30source.dnn-proto31source.dot32source.espdl33source.espdl-schema34source.espresso35source.executorch36source.executorch-schema37source.onnx-proto38source.python39source.rknn4011+93 more modules (most-connected shown)

At a glance — Code Health · 17% · Critical · gated by D1, D2, R1, R2, R3, R7 ·

At a glance — Architecture · 99% · Exemplary ·

At a glance — Maturity · 46% · Weak · gated by D15, M2 ·

At a glance — Readiness · 51% · Adequate · gated by R4 ·

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

At a glance — Accessibility · 36% · Weak · gated by AC1, AC3 ·

At a glance — Performance · 85% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection21High / Critical
A03:2025 — Software Supply Chain Failures13High / Critical

Roadmap

Top priorities: Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video; 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; Resolve the 40 finding(s) in Cyclomatic Complexity.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json.+1.7 ptsLowADR Quality
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.+3.2 ptsMediumText alternatives
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.+3.2 ptsMediumType Safety
Resolve the 40 finding(s) in Cyclomatic Complexity.+3.2 ptsMediumCyclomatic Complexity
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+3.2 ptsMediumLarge Files
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.+3.2 ptsMediumDead Code
Resolve the 8 redundant comment finding(s) in Comment Value — start with tablegen.js (4), dagre.js, mlir.js.+0.8 ptsLowComment Value
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+3.0 ptsMediumPage structure

File quality

Per-file score 0–10 — a quality signature. Of 111 files carrying findings, judged against the Production bar: 4% slop · 82% mixed · 14% near-clean.

FileScoreBandWorst signal
REDACTED1.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.9SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
source/mlir.js5.0MixedCyclomatic Complexity: Dialect.parseDirective (cyclomatic 313)
source/hdf5.js5.5MixedCyclomatic Complexity: Datatype.type (cyclomatic 33)
source/pytorch.py5.7MixedCyclomatic Complexity: _Graph.to_json (cyclomatic 20)
source/dagre.js6.5MixedCyclomatic Complexity: dagre.dagre.layout::order (cyclomatic 66)
source/mlnet.js6.5MixedCyclomatic Complexity: Node.constructor (cyclomatic 28)
source/mslite-schema.js6.9MixedGod Classes: FileTooLong: source/mslite-schema.js
source/python.js7.0MixedCyclomatic Complexity: Execution.constructor (cyclomatic 2972)
source/pytorch.js7.0MixedCyclomatic Complexity: Node.constructor (cyclomatic 309)
source/ncnn.js7.0MixedCyclomatic Complexity: Node.constructor (cyclomatic 276)
source/gguf.js7.0MixedCyclomatic Complexity: Graph.constructor (cyclomatic 164)
source/keras.js7.0MixedCyclomatic Complexity: ModelFactory.open (cyclomatic 148)
source/protobuf.js7.0MixedCyclomatic Complexity: next (cyclomatic 124)
source/openvino.js7.0MixedCyclomatic Complexity: Node.constructor (cyclomatic 118)
source/xml.js7.0MixedCyclomatic Complexity: TextReader.read (cyclomatic 99)

How the grades work

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

Critical — 33

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

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

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

Could not be resolved — 12

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 65 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 65 dimensions across the health lenses
D1D2D3D4D5D6D12D13D14D15D17D19D20D21D24D28D29D30D34D35D36D43D44AC1AC2AC3AC5AC6AX10AX3AX4GD1IC1M1M2M3P1P10P2P3P6PF3R1R10R2R3R4R5R6R7R8R9X1X12X16X18X19X21X23X24X28X29X3X30X4

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1505 of 1517 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1d665-72a4-7b0f-bdb3-99095500f3e2.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the JavaScript/TypeScript suite(s) run through a browser-driven runner the coverage collector does not drive — the repository root (@playwright/test) — a gap in the analyzer, not something this repository is missing. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.py, .js) and the reliability runner does support this ecosystem — it drives jest, vitest, mocha and egg-bin — but the test script invokes plain node, with no runner protocol the re-runner can drive, so per-test reliability could not be read. Read from the manifests: the root package has a `scripts.test` of `node REDACTED test`. Not scored — this is a gap in the analyzer's runner coverage, not a missing .py/.js runner and not a finding about this repository.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its npm package dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • 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-contributor repository — bus factor is not applicable (1 contributor(s) across 10367 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `source/coreml-proto.js`, `source/nnabla-proto.js`, `source/tf-proto.js`, `REDACTED` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in source/onnx.js, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The dev server could not reach the network from our sandbox (a registry or API request was refused). This is a limit of our sandbox, not of your repository. (rule: network). The renderer reported: the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): the dev server could not reach the network from our sandbox (a registry or API request was refused). This is a limit of our sandbox, not of your repository. Last output: "TypeError: fetch failed / at node:internal/deps/undici/undici:13484:13 / at process.processTicksAndRejections (node:internal/process/task_queues:105:5) / at async FetchDownloader.download (file://<repo>/node_modules/@electron/get/dist/FetchDownloader.js:46:30) / at async file://<repo>/node_modules/@electron/get/dist/index.js:152:9 / at async useAndRemoveDirectory (file://<repo>/node_modules/@electron/get/dist/utils.js:9:18) / at async downloadArtifact (file://<repo>/node_modules/@electron/get/dist/index.js:148:12) / Command failed: npx install-electron" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): the dev server could not reach the network from our sandbox (a registry or API request was refused). This is a limit of our sandbox, not of your repository. Last output: "TypeError: fetch failed / at node:internal/deps/undici/undici:13484:13 / at process.processTicksAndRejections (node:internal/process/task_queues:105:5) / at async FetchDownloader.download (file://<repo>/node_modules/@electron/get/dist/FetchDownloader.js:46:30) / at async file://<repo>/node_modules/@electron/get/dist/index.js:152:9 / at async useAndRemoveDirectory (file://<repo>/node_modules/@electron/get/dist/utils.js:9:18) / at async downloadArtifact (file://<repo>/node_modules/@electron/get/dist/index.js:148:12) / Command failed: npx install-electron" No runtime evidence was gathered.
  • P1 CI/CD gates — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and none applies: this repository publishes a library and deploys nothing (no container, IaC or deployment manifest), so it holds no runtime state of its own. Any data-access dependency it declares is the store it is a CLIENT for, not one it operates. The DR control belongs to whoever runs that data.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1096 further occurrence(s) are not listed individually; the score already reflects all 1136.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 703 further occurrence(s) are not listed individually; the score already reflects all 743.
  • R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 32 further occurrence(s) are not listed individually; the score already reflects all 72.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 70 further occurrence(s) are not listed individually; the score already reflects all 110.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 7 further occurrence(s) are not listed individually; the score already reflects all 47.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 127 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled certificate validation, obsolete TLS versions, plaintext password storage and session cookies set without HttpOnly, Secure or SameSite, and none was found. The server controls this dimension also scores were not assessed, so no score is given.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 36 further occurrence(s) are not listed individually; the score already reflects all 76.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 32 further occurrence(s) are not listed individually; the score already reflects all 72.
  • X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

659 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Execution.constructor at 2972. A further 275 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 PrimitiveType.decode at 222 — they are counted neither in the figure above nor in this dimension's score. 52 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: source/mslite-schema.js (decode at 222), source/mslite-schema.js (PrimitiveType.decode at 222), source/coreml-proto.js (decode at 167), source/nnabla-proto.js (decode at 167), source/coreml-proto.js (NeuralNetworkLayer.decode at 167), and 47 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

constructor::map (cyclomatic 20) · ×5source/circle.js:187
dagre.dagre.layout::order (cyclomatic 66) · ×4source/dagre.js:895
Node.constructor (cyclomatic 53) · ×4source/caffe.js:341
ModelFactory.open::requestManifest::parse (cyclomatic 38) · ×4source/mxnet.js:57
Graph.constructor::constant (cyclomatic 42) · ×3source/openvino.js:279

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

What to do

  1. Bring the 4 bodies over 240 down to 240 or less in Cyclomatic Complexity — start with Execution.constructor (cyclomatic 2972), Dialect.parseDirective (cyclomatic 313), Node.constructor (cyclomatic 309). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cyclomatic Complexity from 2.0 to about 3.5/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.

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

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

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

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

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

920 method(s) exceeded the cognitive complexity threshold of 15; the worst was Execution.constructor at 3595.

dagre.dagre.layout::position (cognitive 51) · ×12source/dagre.js:1637
constructor::loadGraph (cognitive 66) · ×8source/megengine.js:100
ModelFactory.open::openJson::openShards (cognitive 42) · ×7source/tf.js:424
constructor (cognitive 28) · ×5source/dl4j.js:65
layout::order (cognitive 194) · ×4source/dagre.js:895

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

What to do

  1. Bring the 34 bodies over 120 down to 120 or less in Cognitive Complexity — start with Execution.constructor (cognitive 3595), Dialect.parseDirective (cognitive 788), constructor (cognitive 598). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 34 together lifts Cognitive Complexity from 2.0 to about 3.4/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

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

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

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

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

145 god class(es) detected.

MethodTooLong: Reader.read · ×79source/kmodel.js:254
FileTooLong: source/mlir.js · ×54source/mlir.js
TooManyMethods: Parser · ×11source/mlir.js:2942
FunctionTooLong: package.publishREDACTED:309

What to do

  1. Resolve the 79 MethodTooLong finding(s) in God Classes — start with caffe-proto.js (8), coreml-proto.js (4), nnabla-proto.js (4). — One of this dimension's main actionable groups (79 warning-level).
  2. Resolve the 54 FileTooLong finding(s) in God Classes — start with mlir.js, python.js, coreml-proto.js. — One of this dimension's main actionable groups (54 warning-level).
  3. Resolve the 11 TooManyMethods finding(s) in God Classes — start with mlir.js (5), REDACTED (2), xml.js. — One of this dimension's main actionable groups (11 warning-level).

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

D4 · Code Duplication10.0 / 10Stronggated by 6 serious findings✓ Tool-verified

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

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

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

3 duplicated block group(s) detected. A further 3 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 6 of the 6 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .js (99% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Edited copy of a member (31 corresponding lines)tools/onnx_script.py:141
Edited copy of a member (16 corresponding lines)tools/onnx_script.py:71
Edited copy of a member (5 corresponding lines)tools/onnx_script.py:48
Duplicated block (21 lines × 2)tools/onnx_script.py:148
Duplicated block (14 lines × 2)tools/onnx_script.py:216

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

What to do

  1. Resolve the 1 Edited copy of a member (31 corresponding lines) finding(s) in Code Duplication — start with onnx_script.py. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Edited copy of a member (16 corresponding lines) finding(s) in Code Duplication — start with onnx_script.py. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Edited copy of a member (5 corresponding lines) finding(s) in Code Duplication — start with onnx_script.py. — One of this dimension's main actionable groups (1 warning-level).

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

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

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

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

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

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

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

4 of 698 classes have LCOM4 above 3.

Low cohesion: Dialect (LCOM4 20) · ×4source/mlir.js:8988

What to do

  1. Resolve the 4 Low cohesion finding(s) in Cohesion (LCOM4) — start with mock.js (2), mlir.js, hdf5.js. — One of this dimension's main actionable groups (4 warning-level).

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

D12 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

Deprecated: boolean · ×5REDACTED:1244

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 16 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 16 package(s) this repository's committed lockfile installs for a consumer — its 1 production, optional and peer dependency(ies), across 1 product package.json manifest(s), and everything those install in turn. Its 5 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. This repository publishes itself under MIT, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's npm package dependencies and nothing else. The repository also declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots2.4 / 10Critical✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

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

Top hotspots: source/mlir.js (20×356=7120); tools/mlir-script.js (8×302=2416); source/gguf.js (11×164=1804)

Hotspot: source/mlir.js · ×5source/mlir.js:9649

What to do

  1. Resolve the 5 Hotspot finding(s) in Churn × Complexity Hotspots — start with mlir.js, mlir-script.js, gguf.js. — One of this dimension's main actionable groups (5 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

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

No architecture decision records were found.

No ADRs foundpackage.json:17

What to do

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

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

D21 · Naming Consistency9.3 / 10Exemplary✓ Tool-verified

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

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

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

1 naming inconsistencies among 135 declarations measured against a convention their peers follow.

`GenOP` spells `OP` where 134 names in the project spell it `Op`source/mslite-schema.js:3830

✓ On the Gold path — maintain.

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

D24 · Comment Value7.2 6.4 / 10Adequate✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 6.4 / 10 · rule-coverage 88% · ceiling Documented

26 of 930 judged comments only repeat the code they sit on (2.8 %). 219 comment(s) in another language or script were not judged.

redundant comment · ×8source/dagre.js:33

What to do

  1. Resolve the 8 redundant comment finding(s) in Comment Value — start with tablegen.js (4), dagre.js, mlir.js. — One of this dimension's main actionable groups (8 recommendation-level).

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

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)2.7 / 10Weak✓ Tool-verified

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

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

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

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

21 finding(s): 0 critical, 16 high, 5 medium, 0 low. 10 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 25 file(s) — `source/armnn-schema.js`, `source/caffe-proto.js`, `source/circle-schema.js`, `source/coreml-proto.js`, `source/coreml.js`, … (+20 more) — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. 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).
  2. 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).
  3. No action in Static Analysis (SAST) — all 10 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (10 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities7.8 / 10Adequategated by 3 critical findings✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.4 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: caffe2-proto.js↔uff-proto.js 64%; uff-proto.js↔REDACTED 64%; caffe-proto.js↔uff-proto.js 55%

Change-coupling hub: uff-proto.js → caffe-proto.js, caffe2-proto.js, onnx-proto.js, paddle-proto.js, REDACTEDsource/uff-proto.js
Change coupling: pytorch.py ↔ pytorch_script.pysource/pytorch.py:1

What to do

  1. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with uff-proto.js. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Change coupling finding(s) in Change Coupling — start with pytorch.py. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives1.7 / 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.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×6) — publish/icon.html:6, publish/icon.html:9, publish/icon.html:12, …

What to do

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

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

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

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

  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×2) — source/index.html:393, source/index.html:557
  • 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) — source/index.html:412, source/index.html:483, source/index.html:529

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure2.2 / 10Critical✓ 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.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — publish/icon.html:2
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. — publish/icon.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — publish/icon.html:2, source/index.html:2
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — source/index.html:6
  • An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — source/index.html:315

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.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC6 · Visual & motion safety4.4 / 10Weak✓ Tool-verified

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

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

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

  • `.welcome.spinner .logo-spinner` moves (`animation: orbit 0.5s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — source/index.html:83
  • `.target` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — source/index.html:24
  • `.toolbar button:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — source/index.html:32
  • `.toolbar-select select:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — source/index.html:41
  • `.logo-button:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — source/index.html:68
  • `.sidebar-item-name input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — source/index.html:215
  • `.sidebar-item-selector` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — source/index.html:240
  • `.sidebar-find-query` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — source/index.html:250
  • `.sidebar-find-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — source/index.html:256
  • `.toolbar-select select` sets color: #fff on background-color: #777 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — source/index.html:37
  • `.toolbar-path-back-button` sets color: #ffffff on background-color: #777 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — source/index.html:42
  • `.toolbar-path-name-button` sets color: #ffffff on background-color: #777 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — source/index.html:44
  • `.toolbar-path-name-button` sets color: #404040 on background-color: #aaaaaa — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — source/index.html:171
  • `.toolbar-select select` sets color: #404040 on background-color: #aaaaaa — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — source/index.html:173

What to do

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

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

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

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

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

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

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

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

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

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

GD1 · Unfinished & placeholder code9.9 / 10Exemplary✓ Tool-verified

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

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

  • A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface. — source/tf-proto.js:13316

What to do

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

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

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

  • `export` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:240
  • `execute` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:253
  • The `if` and its `else` contain the same statements, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body. — source/flax.js:125
  • `match` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — source/imgdnn.js:6
  • The guard above `return attr;` also returns `attr`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — source/mlir.js:3223
  • `open` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×2) — source/nnef.js:37, source/weka.js:28
  • `read` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×3) — source/onnx.js:1962, source/safetensors.js:208, source/tensorrt.js:157
  • `decodeJson` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — source/tf-proto.js:13316
  • The guard above `return value;` also returns `value`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — REDACTED:5580
  • `_openSignature` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:7855
  • `layout` has an empty body — confirm it's an intentional no-op and not an unfinished method. (×2) — source/grapher.js:598, REDACTED:3075
  • `emitWarning` has an empty body — confirm it's an intentional no-op and not an unfinished method. — source/mlir.js:4397
  • A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead. (×2) — source/xml.js:39, source/xml.js:978

What to do

  • Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
  • Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

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

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

What to do

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

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

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

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

What to do

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

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

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

P1 · CI/CD gates8.5 / 10Strong✓ 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.

What to do

  • Run the test suite in CI via an explicit runner step (`npm test` for the toolchain this pipeline already uses) and gate merges on it.
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

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

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

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

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF3 · Async & latency hygiene8.5 / 10Strong✓ Tool-verified

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

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

  • `fs.writeFileSync` in `layout` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — source/grapher.js:275

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type 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 · 144 plain JS — the untyped files are REDACTED, source/acuity.js, source/app.js, source/armnn-schema.js, source/armnn.js, source/barracuda.js (+138 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.
R10 · Code Duplication7.5 / 10Strong✓ Tool-verified

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.

  • source/circle.js:2 · source/tflite.js:2 — these 2 files are line-for-line copies of one another — 328 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — source/circle.js:2
  • source/coreml.js:231 · source/espresso.js:83 — the two spans are one implementation copied and then locally edited — 1176 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. — source/coreml.js:231
  • source/mindir.js:51 · source/mslite.js:60 — the two spans are one implementation copied and then locally edited — 792 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. — source/mindir.js:51
  • source/uff-proto.js:64 · source/uff-proto.js:266 — the two spans are one implementation copied and then locally edited — 599 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — source/uff-proto.js:64
  • source/caffe.js:88 · source/caffe2.js:167 — the two spans are one implementation copied and then locally edited — 525 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. — source/caffe.js:88
  • source/caffe2-proto.js:942 · source/mindir-proto.js:409 — the two spans are one implementation copied and then locally edited — 423 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — source/caffe2-proto.js:942
  • source/uff-proto.js:10 · source/xmodel-proto.js:9 — the two spans are one implementation copied and then locally edited — 325 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. — source/uff-proto.js:10
  • source/catboost.js:5 · source/jax.js:5 — the two spans are one implementation copied and then locally edited — 318 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. — source/catboost.js:5
  • source/lightgbm.js:44 · source/xgboost.js:60 — the two spans are one implementation copied and then locally edited — 401 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. — source/lightgbm.js:44
  • tools/circle-script.js:2 · tools/tflite-script.js:2 — these 2 files are line-for-line copies of one another — 58 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — tools/circle-script.js:2
  • source/python.js:264 · source/python.js:404 — the two spans are one implementation copied and then locally edited — 293 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — source/python.js:264
  • source/dlc.js:149 · source/kann.js:62 — the two spans are one implementation copied and then locally edited — 388 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. — source/dlc.js:149
  • source/mlir.js:17838 · source/mlir.js:18775 — 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. — source/mlir.js:17838
  • source/mlnet.js:1608 · source/mlnet.js:2190 — the two spans are one implementation copied and then locally edited — 328 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — source/mlnet.js:1608
  • source/mxnet.js:493 · source/openvino.js:563 — the two spans are one implementation copied and then locally edited — 304 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. — source/mxnet.js:493
  • source/tf-proto.js:1086 · source/uff-proto.js:10 — the two spans are one implementation copied and then locally edited — 225 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. — source/tf-proto.js:1086
  • source/coreml-proto.js:11754 · source/om-proto.js:985 — the two spans are one implementation copied and then locally edited — 272 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. — source/coreml-proto.js:11754
  • source/executorch.js:499 · source/executorch.js:745 — 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. — source/executorch.js:499
  • source/tar.js:89 · source/zip.js:711 — the two spans are one implementation copied and then locally edited — 290 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. — source/tar.js:89
  • source/python.js:4794 · source/python.js:4837 — 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. — source/python.js:4794
  • source/coreml-proto.js:10408 · source/mindir-proto.js:900 — the two spans are one implementation copied and then locally edited — 275 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. — source/coreml-proto.js:10408
  • source/mlir.js:9932 · source/mlir.js:9977 — 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. — source/mlir.js:9932
  • source/espdl.js:286 · source/onnx.js:1339 — 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. — source/espdl.js:286
  • source/mlir.js:13052 · source/mlir.js:13107 — 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. — source/mlir.js:13052
  • source/caffe2.js:254 · source/paddle.js:322 — the two spans are one implementation copied and then locally edited — 296 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. — source/caffe2.js:254
  • source/mlir.js:20227 · source/mlir.js:20330 — the two spans are one implementation copied and then locally edited — 207 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — source/mlir.js:20227
  • source/tengine.js:103 · source/tnn.js:174 — the two spans are one implementation copied and then locally edited — 392 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. — source/tengine.js:103
  • tools/circle-script.js:48 · tools/mslite-script.js:34 — the two spans are one implementation copied and then locally edited — 319 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. — tools/circle-script.js:48
  • tools/mslite-script.js:34 · tools/tflite-script.js:48 — the two spans are one implementation copied and then locally edited — 319 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. — tools/mslite-script.js:34
  • source/zip.js:595 · source/zip.js:872 — the two spans are one implementation copied and then locally edited — 188 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — source/zip.js:595
  • source/mlir.js:16355 · source/mlir.js:16419 — 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. — source/mlir.js:16355
  • source/armnn.js:24 · source/mnn.js:18 — 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. — source/armnn.js:24
  • source/pytorch-proto.js:330 · source/pytorch-proto.js:388 — the two spans are one implementation copied and then locally edited — 136 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — source/pytorch-proto.js:330
  • source/executorch-schema.js:114 · source/executorch-schema.js:1390 — 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. — source/executorch-schema.js:114
  • source/tosa.js:363 · REDACTED:7962 — the two spans are one implementation copied and then locally edited — 189 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. — source/tosa.js:363
  • source/darknet.js:361 · source/darknet.js:584 — the two spans are one implementation copied and then locally edited — 271 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — source/darknet.js:361
  • source/kmodel.js:614 · source/kmodel.js:820 — 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. — source/kmodel.js:614
  • source/lightgbm.js:70 · source/sklearn.js:108 — the two spans are one implementation copied and then locally edited — 189 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. — source/lightgbm.js:70
  • source/dl4j.js:387 · source/gguf.js:842 — the two spans are one implementation copied and then locally edited — 130 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. — source/dl4j.js:387
  • source/gguf.js:845 · source/tf.js:1493 — the two spans are one implementation copied and then locally edited — 136 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. — source/gguf.js:845

What to do

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

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

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

  • parseDirective has cyclomatic complexity 315 and cognitive complexity 744; 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. — source/mlir.js:9649
  • constructor has cyclomatic complexity 265 and cognitive complexity 348; 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. — source/ncnn.js:285
  • constructor has cyclomatic complexity 248 and cognitive complexity 454; 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. — source/pytorch.js:324
  • parseOperation has cyclomatic complexity 206 and cognitive complexity 448; 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. — source/mlir.js:17902
  • evaluateValue has cyclomatic complexity 200 and cognitive complexity 435; 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. — tools/tablegen.js:979
  • constructor has cyclomatic complexity 136 and cognitive complexity 256; 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. — source/gguf.js:95
  • _parseExpression has cyclomatic complexity 130 and cognitive complexity 244; 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. — source/python.js:1078
  • next has cyclomatic complexity 124 and cognitive complexity 167; 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. — source/protobuf.js:1124
  • parseOperation has cyclomatic complexity 123 and cognitive complexity 81; 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. — source/mlir.js:15989
  • constructor has cyclomatic complexity 121 and cognitive complexity 242; 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. — source/darknet.js:81
  • constructor has cyclomatic complexity 119 and cognitive complexity 243; 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. — source/mlir.js:181
  • parseOperation has cyclomatic complexity 116 and cognitive complexity 238; 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. — source/mlir.js:24920
  • constructor has cyclomatic complexity 113 and cognitive complexity 141; 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. — source/openvino.js:503
  • parseOperation has cyclomatic complexity 112 and cognitive complexity 266; 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. — source/mlir.js:13672
  • inferResultTypes has cyclomatic complexity 111 and cognitive complexity 385; 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. — source/mlir.js:9360
  • schema has cyclomatic complexity 111 and cognitive complexity 270; 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. — tools/mlir-script.js:50
  • getEnumCases has cyclomatic complexity 109 and cognitive complexity 318; 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. — tools/tablegen.js:731
  • constructor has cyclomatic complexity 106 and cognitive complexity 174; 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. — source/keras.js:908
  • load has cyclomatic complexity 104 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — source/python.js:3902
  • read has cyclomatic complexity 99 and cognitive complexity 281; 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. — source/xml.js:33
  • _add has cyclomatic complexity 99 and cognitive complexity 100; 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:2825
  • _parseStatement has cyclomatic complexity 94 and cognitive complexity 133; 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. — source/python.js:753
  • open has cyclomatic complexity 88 and cognitive complexity 208; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — source/keras.js:79
  • _decodeData has cyclomatic complexity 81 and cognitive complexity 111; 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. — source/base.js:1006
  • extractTraitsFromList has cyclomatic complexity 80 and cognitive complexity 188; 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. — tools/mlir-script.js:764
  • match has cyclomatic complexity 80 and cognitive complexity 147; 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. — source/tf.js:12
  • updateTorchScript has cyclomatic complexity 80 and cognitive complexity 100; 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. — source/tf.js:1907
  • constructor has cyclomatic complexity 78 and cognitive complexity 166; 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. — source/pytorch.js:74
  • constructor has cyclomatic complexity 75 and cognitive complexity 205; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — source/keras.js:524
  • constructor has cyclomatic complexity 73 and cognitive complexity 146; 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. — source/mlir.js:490
  • constructor has cyclomatic complexity 72 and cognitive complexity 100; 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. — source/tnn.js:134
  • peek has cyclomatic complexity 71 and cognitive complexity 224; 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:6783
  • _tokenizeInline has cyclomatic complexity 70 and cognitive complexity 158; 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:5955
  • _format has cyclomatic complexity 69 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:5526
  • order has cyclomatic complexity 66 and cognitive complexity 194; 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. — source/dagre.js:895
  • constructor has cyclomatic complexity 63 and cognitive complexity 155; 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. — source/mxnet.js:459
  • constructor has cyclomatic complexity 63 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — source/onnx.js:440
  • read has cyclomatic complexity 62 and cognitive complexity 143; 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. — source/kmodel.js:254
  • weights has cyclomatic complexity 62 and cognitive complexity 115; 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. — source/pickle.js:317
  • constructor has cyclomatic complexity 61 and cognitive complexity 147; 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. — source/mxnet.js:268
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.

  • source/coreml-proto.js has 17014 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/coreml-proto.js:1
  • source/tf-proto.js has 12514 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/tf-proto.js:1
  • source/nnabla-proto.js has 11537 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/nnabla-proto.js:1
  • REDACTED has 7634 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • source/caffe-proto.js has 4927 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/caffe-proto.js:1
  • source/mslite-schema.js has 3884 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/mslite-schema.js:1
  • source/tflite-schema.js has 3422 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/tflite-schema.js:1
  • tools/tablegen.js has 3374 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tools/tablegen.js:1
  • source/circle-schema.js has 3112 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/circle-schema.js:1
  • source/mnn-schema.js has 3016 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/mnn-schema.js:1
  • source/onnx.js has 2711 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/onnx.js:1
  • source/pytorch.js has 2683 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/pytorch.js:1
  • source/armnn-schema.js has 2643 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/armnn-schema.js:1
  • source/onnx-proto.js has 2540 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/onnx-proto.js:1
  • source/dagre.js has 2396 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/dagre.js:1
  • source/tf.js has 2147 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/tf.js:1
  • source/kmodel.js has 2136 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/kmodel.js:1
  • source/megengine-schema.js has 2074 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/megengine-schema.js:1
  • source/mlnet.js has 2039 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/mlnet.js:1
  • source/tosa-schema.js has 1923 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/tosa-schema.js:1
  • source/hdf5.js has 1691 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/hdf5.js:1
  • source/caffe2-proto.js has 1644 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/caffe2-proto.js:1
  • source/xml.js has 1583 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/xml.js:1
  • source/paddle-proto.js has 1548 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/paddle-proto.js:1
  • source/xmodel-proto.js has 1503 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/xmodel-proto.js:1
  • source/coreml.js has 1496 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/coreml.js:1
  • REDACTED has 1481 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • source/keras.js has 1445 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/keras.js:1
  • source/base.js has 1406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/base.js:1
  • source/gguf.js has 1393 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/gguf.js:1
  • source/mindir-proto.js has 1384 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/mindir-proto.js:1
  • source/paddle.js has 1349 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/paddle.js:1
  • source/protobuf.js has 1300 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/protobuf.js:1
  • tools/flatc.js has 1293 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tools/flatc.js:1
  • tools/mlir-script.js has 1263 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tools/mlir-script.js:1
  • source/executorch-schema.js has 1262 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/executorch-schema.js:1
  • source/executorch.js has 1202 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/executorch.js:1
  • source/ncnn.js has 1171 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/ncnn.js:1
  • source/cntk.js has 1067 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/cntk.js:1
  • source/app.js has 1021 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — source/app.js:1

What to do

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

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

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — source/mlir.js:1, source/coreml-proto.js:1, source/tf-proto.js:1, …

What to do

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

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

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

R6 · Tooling6.7 / 10Adequate✓ Tool-verified

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

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

  • test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
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 79 application, 2 tooling and 8 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (79 application, 2 tooling, 8 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 (×37) — source/coreml-proto.js, source/nnabla-proto.js, source/caffe-proto.js, …
  • no import path from any entry point (79 application, 2 tooling, 8 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (tools/tf-script.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — source/tf-proto.js
  • no import path from any entry point (79 application, 2 tooling, 8 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (tools/mlir-script.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — tools/tablegen.js

What to do

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

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

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

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

What to do

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

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

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

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

X19 · Unrestored process-global state3.5 / 10Weak✓ Tool-verified

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

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

  • this arrow function changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process working directory (changed at line 46, put back at line 48) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, child-process launch or config read in ANY module resolves against it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the directory. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd` and `env` options of `child_process.spawn`/`exec`/`execSync` (or `Deno.Command`) scope both to the CHILD — or build absolute paths with `path.resolve`. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — source/app.js:44

What to do

  • Each finding names the statement that changes the process-global value and the statement that puts it back. Confirm from the two that nothing between them is protected — then prefer removing the mutation over widening the restore: a working directory or an environment variable passed to the operation that needs it (the `cwd` and `env` options of `child_process`, or of `Deno.Command`) is scoped to that operation, which is what the save-and-restore was trying to approximate. Where the global genuinely must move, a `try`/`finally` is the least that makes the restore unconditional. In Python the same holds for `os.chdir`, `os.environ` and `sys.stdout`: pass `cwd=`/`env=` to `subprocess`, or use `contextlib.chdir`/`redirect_stdout`, rather than moving the global by hand.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

X23 · Unguarded diagnostic materialisation3.5 / 10Weak✓ Tool-verified

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

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

  • `debug` at line 111 is called with an argument built by `"…".join(args)` (line 111), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — source/server.py:111

What to do

  • In Python, put the construction behind the logger's own check (`if logger.isEnabledFor(logging.DEBUG):`), or pass the collection itself with a `%s` placeholder (`logger.debug("Items %s", items)`) so the logging module renders it only when the record is emitted. The placeholder alone is not the fix when the argument is still built first: it defers the formatting, not a `json.dumps`, a `join` or a comprehension in the argument, and an f-string defers nothing at all.
X24 · Document value interpolated into markup unescaped4.7 / 10Weak✓ Tool-verified

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

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

  • `value.substring(0,index)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:1553
  • `item.shortcut` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:1584
  • `entry.title||''` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:3415
  • `entry.element` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:3418
  • `text` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:3864
  • `content?content:'&nbsp;'` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:4002
  • `name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×4) — REDACTED:4046, REDACTED:4194, REDACTED:4200, …
  • `content` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:4827
  • `type` is text this program did not author, and it is written into a URL attribute through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:5022
  • `name` is text this program did not author, and it is written into a URL attribute through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:5142

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X3 · Exception handling4.3 / 10Weak✓ Tool-verified

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

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

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×40) — REDACTED:234, source/server.py:147, source/server.py:227, …

What to do

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

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

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

X4 · Structured logging4.3 / 10Weak✓ Tool-verified

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

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

  • `error` at line 36 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — source/__init__.py:36
  • `info` at line 300 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — source/server.py:300

What to do

  • Interpolated log message defeats structured logging

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health17%Critical — gated by D1, D2, R1, R2, R3, R7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture99%ExemplaryStrongest area.
Maturity46%Weak — gated by D15, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness51%Adequate — gated by R4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security57%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility36%Weak — gated by AC1, AC3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance85%StrongSolid.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

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

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 60 check(s) not relevant to this codebase

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

  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AX1 Captive dependencies — 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
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): the dev server could not reach the network from our sandbox (a registry or API request was refused). This is a limit of our sandbox, not of your repository. Last output: "TypeError: fetch failed / at node:internal/deps/undici/undici:13484:13 / at process.processTicksAndRejections (node:internal/process/task_queues:105:5) / at async FetchDownloader.download (file://<repo>/node_modules/@electron/get/dist/FetchDownloader.js:46:30) / at async file://<repo>/node_modules/@electron/get/dist/index.js:152:9 / at async useAndRemoveDirectory (file://<repo>/node_modules/@electron/get/dist/utils.js:9:18) / at async downloadArtifact (file://<repo>/node_modules/@electron/get/dist/index.js:148:12) / Command failed: npx install-electron" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server (no Express, Fastify, Koa, Hono, NestJS or similar app, no Next.js/SvelteKit/Nuxt server route, no edge function), creates no Supabase tables and talks to no hosted backend. Access control is therefore N/A here — a browser application or library is authorized by the server it calls, not by itself; a client-side route guard hides a page and authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D10 Test Quality — ~1555 lines of test source are present (.py, .js) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the test script invokes plain node, no runner protocol we can drive
  • D16 Bus Factor — single-contributor 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.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Python surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — This repository is one build unit, `(repository root)` (209236 LoC, 41 module-visible types across 3 directories), within the size bounds. Not scored: a single unit of this size gives project cohesion nothing to grade.
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 4 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • M4 Documentation accuracy — Not applicable: the 2 current-state document(s) make no claim of a kind M4 checks. 3 claim(s) of kinds M4 does not check were not checked (command argument 3); M4 checks only links and versions and artefact counts.
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — Not assessed: 127 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation, obsolete TLS versions, passwords stored or checked as plaintext and session cookies set without HttpOnly, Secure or SameSite, and none was found. That half of the dimension is clean, but it is not scored on its own: a C# repository with the same clean reading is scored on its server controls as well, or is N/A for having no web surface, and neither can be decided here. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — X27 reached only 1% of this repository's production lines — javascript (206,936 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • 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
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 33 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×6
  • <img> without a text alternative publish/icon.html:6 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative publish/icon.html:9 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative publish/icon.html:12 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative publish/icon.html:17 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative publish/icon.html:20 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative publish/icon.html:23 — 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 · Link with no accessible name · ×3
  • Link with no accessible name source/index.html:412 — 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 source/index.html:483 — 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 source/index.html:529 — 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.
D30 · Dependency Vulnerabilities · High CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <select> without a programmatic label · ×1
  • <select> without a programmatic label source/index.html:393 — 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 · <input> without a programmatic label · ×1
  • <input> without a programmatic label source/index.html:557 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC3 · Page structure · <html> without a lang · ×1
  • <html> without a lang publish/icon.html:2 — 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> · ×1
  • Document without a <title> publish/icon.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC3 · Page structure · Viewport restricts zoom · ×1
  • Viewport restricts zoom source/index.html:6 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 1410 finding(s)
D3 · God Classes · MethodTooLong · ×79
  • MethodTooLong: Reader.read source/kmodel.js:254 — MethodTooLong — read runs 761 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 661 over it, 7.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Graph.constructor source/darknet.js:81 — MethodTooLong — constructor runs 600 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 500 over it, 6.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NeuralNetworkLayer.decode source/coreml-proto.js:6641 — MethodTooLong — decode runs 502 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 402 over it, 5.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.
  • MethodTooLong: NeuralNetworkLayer.decodeText source/coreml-proto.js:7147 — MethodTooLong — decodeText runs 502 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 402 over it, 5.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.
  • MethodTooLong: Function.decode source/nnabla-proto.js:3180 — MethodTooLong — decode runs 502 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 402 over it, 5.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.
  • MethodTooLong: Function.decodeText source/nnabla-proto.js:3686 — MethodTooLong — decodeText runs 502 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 402 over it, 5.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.
  • MethodTooLong: Graph.constructor source/gguf.js:95 — MethodTooLong — constructor runs 483 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 383 over it, 4.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Node.constructor source/ncnn.js:285 — MethodTooLong — constructor runs 470 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 370 over it, 4.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Node.constructor source/pytorch.js:324 — MethodTooLong — constructor runs 454 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 354 over it, 4.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ModelFactory.open source/tf.js:245 — MethodTooLong — open runs 364 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 264 over it, 3.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Inference.infer source/acuity.js:219 — MethodTooLong — infer runs 343 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 243 over it, 3.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Context.graph source/tf.js:1768 — MethodTooLong — graph runs 299 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 199 over it, 2.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ComputationNetwork.constructor source/cntk.js:594 — MethodTooLong — constructor runs 287 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 187 over it, 2.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Graph.constructor source/megengine.js:81 — MethodTooLong — constructor runs 252 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 152 over it, 2.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Reader.read source/tengine.js:254 — MethodTooLong — read runs 251 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PrimitiveType.decode source/mslite-schema.js:177 — MethodTooLong — decode runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PrimitiveType.decodeText source/mslite-schema.js:404 — MethodTooLong — decodeText runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Graph.model source/coreml.js:878 — MethodTooLong — model runs 223 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Node.constructor source/openvino.js:503 — MethodTooLong — constructor runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LayerParameter.decode source/caffe-proto.js:1080 — MethodTooLong — decode runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LayerParameter.decodeText source/caffe-proto.js:1274 — MethodTooLong — decodeText runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Graph.constructor source/openvino.js:240 — MethodTooLong — constructor runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Graph.node source/coreml.js:655 — MethodTooLong — node runs 188 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Application._updateMenu source/app.js:358 — MethodTooLong — _updateMenu runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ModelFactory.open source/paddle.js:59 — MethodTooLong — open runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× 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.
  • + 54 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×54
  • FileTooLong: source/mlir.js source/mlir.js — FileTooLong — 21147 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 20647 over it, 42.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source/python.js source/python.js — FileTooLong — 16626 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 16126 over it, 33.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source/coreml-proto.js source/coreml-proto.js — FileTooLong — 14440 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 1500 significant lines; this is 12940 over it, 9.63× 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: source/tf-proto.js source/tf-proto.js — FileTooLong — 10428 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 1500 significant lines; this is 8928 over it, 6.95× 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: source/nnabla-proto.js source/nnabla-proto.js — FileTooLong — 10038 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 1500 significant lines; this is 8538 over it, 6.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 5880 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 1500 significant lines; this is 4380 over it, 3.92× 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: source/caffe-proto.js source/caffe-proto.js — FileTooLong — 4441 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 1500 significant lines; this is 2941 over it, 2.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: source/mslite-schema.js source/mslite-schema.js — FileTooLong — 3168 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 1500 significant lines; this is 1668 over it, 2.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source/tflite-schema.js source/tflite-schema.js — FileTooLong — 2792 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 1500 significant lines; this is 1292 over it, 1.86× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source/mnn-schema.js source/mnn-schema.js — FileTooLong — 2613 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 1500 significant lines; this is 1113 over it, 1.74× 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: source/circle-schema.js source/circle-schema.js — FileTooLong — 2542 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 1500 significant lines; this is 1042 over it, 1.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source/armnn-schema.js source/armnn-schema.js — FileTooLong — 2198 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 1500 significant lines; this is 698 over it, 1.47× 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: source/onnx-proto.js source/onnx-proto.js — FileTooLong — 2128 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 1500 significant lines; this is 628 over it, 1.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source/onnx.js source/onnx.js — FileTooLong — 2094 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 1500 significant lines; this is 594 over it, 1.40× 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: source/pytorch.js source/pytorch.js — FileTooLong — 2069 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 1500 significant lines; this is 569 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: source/kmodel.js source/kmodel.js — FileTooLong — 1776 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 1500 significant lines; this is 276 over it, 1.18× 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: source/megengine-schema.js source/megengine-schema.js — FileTooLong — 1725 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 1500 significant lines; this is 225 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source/tf.js source/tf.js — FileTooLong — 1657 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 1500 significant lines; this is 157 over it, 1.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source/dagre.js source/dagre.js — FileTooLong — 1639 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 1500 significant lines; this is 139 over it, 1.09× 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: source/tosa-schema.js source/tosa-schema.js — FileTooLong — 1563 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 1500 significant lines; this is 63 over it, 1.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source/mlnet.js source/mlnet.js — FileTooLong — 1544 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 1500 significant lines; this is 44 over it, 1.03× 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: source/caffe2-proto.js source/caffe2-proto.js — FileTooLong — 1443 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 943 over it, 2.89× 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: source/paddle-proto.js source/paddle-proto.js — FileTooLong — 1325 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 825 over it, 2.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: source/hdf5.js source/hdf5.js — FileTooLong — 1314 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 814 over it, 2.63× 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: source/xmodel-proto.js source/xmodel-proto.js — FileTooLong — 1256 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 756 over it, 2.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 29 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file source/mlir.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/coreml-proto.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/tf-proto.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/nnabla-proto.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/caffe-proto.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/mslite-schema.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/tflite-schema.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/circle-schema.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/mnn-schema.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/armnn-schema.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/onnx.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/pytorch.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/onnx-proto.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/megengine-schema.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/mlnet.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/tosa-schema.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/kmodel.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/tf.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/caffe2-proto.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/paddle-proto.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/xmodel-proto.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/coreml.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/executorch-schema.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/keras.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file source/mindir-proto.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×40
  • Swallowed exception (empty catch) REDACTED:234 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/server.py:147 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/server.py:227 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/app.js:993 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/base.js:1460 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:84 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:558 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:570 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:581 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/caffe2.js:76 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/caffe2.js:89 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/caffe2.js:98 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/caffe2.js:115 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/caffe2.js:124 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/caffe2.js:133 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/caffe2.js:142 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/circle.js:54 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/circle.js:343 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/coreml.js:46 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/coreml.js:142 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/darknet.js:28 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/desktop.mjs:66 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/desktop.mjs:121 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/desktop.mjs:427 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) source/desktop.mjs:561 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 15 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×13
  • Untrusted text written into markup unescaped REDACTED:1553 — `value.substring(0,index)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:1584 — `item.shortcut` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:3415 — `entry.title||''` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:3418 — `entry.element` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:3864 — `text` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:4002 — `content?content:'&nbsp;'` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:4046 — `name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:4194 — `name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:4200 — `name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:4206 — `name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:4827 — `content` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:5022 — `type` is text this program did not author, and it is written into a URL attribute through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:5142 — `name` is text this program did not author, and it is written into a URL attribute through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
D2 · Cognitive Complexity · dagre.dagre.layout · ×12
  • dagre.dagre.layout::position (cognitive 51) source/dagre.js:1637 — dagre.dagre.layout::position has cognitive complexity 51 (threshold 15). Drivers by points: loops 12 (25 pts), if/else 7 (17 pts), ternaries 3 (9 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::position::findType1Conflicts (cognitive 49) source/dagre.js:1821 — dagre.dagre.layout::position::findType1Conflicts has cognitive complexity 49 (threshold 15). Drivers by points: if/else 4 (19 pts), loops 4 (17 pts), ternaries 2 (9 pts), boolean chains 4 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::removeEmptyRanks (cognitive 35) source/dagre.js:532 — dagre.dagre.layout::removeEmptyRanks has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (13 pts), boolean chains 2 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::position::horizontalCompaction (cognitive 33) source/dagre.js:1752 — dagre.dagre.layout::position::horizontalCompaction has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (13 pts), boolean chains 1, ternaries 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. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::parentDummyChains (cognitive 24) source/dagre.js:786 — dagre.dagre.layout::parentDummyChains has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 3 (10 pts), boolean chains 3 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::order::crossCount (cognitive 24) source/dagre.js:1153 — dagre.dagre.layout::order::crossCount has cognitive complexity 24 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 2 (6 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::coordinateSystem_undo (cognitive 24) source/dagre.js:1601 — dagre.dagre.layout::coordinateSystem_undo has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 4 (8 pts), boolean chains 2 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::order::sortSubgraph (cognitive 23) source/dagre.js:896 — dagre.dagre.layout::order::sortSubgraph has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 3, boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::order::sweepLayerGraphs (cognitive 21) source/dagre.js:1102 — dagre.dagre.layout::order::sweepLayerGraphs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (8 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. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs (cognitive 20) source/dagre.js:330 — dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::removeEmptyRanks, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::position::verticalAlignment (cognitive 19) source/dagre.js:1713 — dagre.dagre.layout::position::verticalAlignment has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 2 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
  • dagre.dagre.layout::rank::longestPath (cognitive 18) source/dagre.js:254 — dagre.dagre.layout::rank::longestPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, dagre.dagre.layout::removeEmptyRanks, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 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.
D3 · God Classes · TooManyMethods · ×11
  • TooManyMethods: Parser source/mlir.js:2942 — TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AsmParser source/mlir.js:5469 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Dialect source/mlir.js:8988 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TextReader source/xml.js:8 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OpenMPDialect source/mlir.js:21371 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TextReader source/protobuf.js:648 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TestDialect source/mlir.js:25901 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: View REDACTED:11 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TextReader source/onnx.js:2058 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BinaryReader source/flatbuffers.js:4 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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: Graph REDACTED:1840 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
IC1 · Incompleteness & stubs · Fake-async · ×9
  • Fake-async — async method never awaits REDACTED:240 — `export` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits REDACTED:253 — `execute` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits source/imgdnn.js:6 — `match` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits source/nnef.js:37 — `open` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits source/onnx.js:1962 — `read` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits source/safetensors.js:208 — `read` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits source/tensorrt.js:157 — `read` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits REDACTED:7855 — `_openSignature` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits source/weka.js:28 — `open` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×8
  • Focus outline removed in CSS without a :focus replacement source/index.html:24 — `.target` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement source/index.html:32 — `.toolbar button:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement source/index.html:41 — `.toolbar-select select:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement source/index.html:68 — `.logo-button:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement source/index.html:215 — `.sidebar-item-name input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement source/index.html:240 — `.sidebar-item-selector` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement source/index.html:250 — `.sidebar-find-query` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement source/index.html:256 — `.sidebar-find-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D2 · Cognitive Complexity · constructor · ×8
  • constructor::loadGraph (cognitive 66) source/megengine.js:100 — constructor::loadGraph has cognitive complexity 66 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 7 (19 pts), ternaries 4 (16 pts), match/switch 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.
  • constructor::getAllOprAndTensor (cognitive 31) source/megengine.js:359 — constructor::getAllOprAndTensor has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 4 (15 pts), if/else 4 (9 pts), loops 2 (4 pts), boolean chains 3 (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.
  • constructor::map (cognitive 28) source/circle.js:187 — constructor::map has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 1 (5 pts), boolean chains 4, 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.
  • constructor::map (cognitive 28) source/tflite.js:195 — constructor::map has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 1 (5 pts), boolean chains 4, 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.
  • constructor::BatchNormalization (cognitive 24) source/cntk.js:746 — constructor::BatchNormalization has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 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.
  • constructor::map (cognitive 20) source/executorch.js:72 — constructor::map has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 4 (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.
  • constructor::_keydown (cognitive 20) REDACTED:1274 — constructor::_keydown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, ternaries 5 (6 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.
  • constructor::map (cognitive 17) source/openvino.js:247 — constructor::map has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 3 (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.
D2 · Cognitive Complexity · ModelFactory.open · ×7
  • ModelFactory.open::openJson::openShards (cognitive 42) source/tf.js:424 — ModelFactory.open::openJson::openShards has cognitive complexity 42 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 4 (11 pts), ternaries 2 (7 pts), boolean chains 3, match/switch 1 (3 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. This shape REPEATS in the file: one other method here (ModelFactory.open::openJson) 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.
  • ModelFactory.open::read_weights_hdf5 (cognitive 39) source/keras.js:141 — ModelFactory.open::read_weights_hdf5 has cognitive complexity 39 (threshold 15). Drivers by points: if/else 4 (17 pts), loops 4 (16 pts), ternaries 1 (5 pts), boolean chains 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.
  • ModelFactory.open::openProgram (cognitive 36) source/paddle.js:83 — ModelFactory.open::openProgram has cognitive complexity 36 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 2 (8 pts), ternaries 2 (6 pts), boolean chains 5, error handling 2 (4 pts), match/switch 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. This shape REPEATS in the file: one other method here (ModelFactory.open) 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.
  • ModelFactory.open::openJson (cognitive 27) source/tf.js:397 — ModelFactory.open::openJson has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (7 pts), boolean chains 6, error handling 2 (3 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. This shape REPEATS in the file: one other method here (ModelFactory.open::openJson::openShards) 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.
  • ModelFactory.open::open (cognitive 19) source/caffe2.js:155 — ModelFactory.open::open has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 2 (8 pts), error handling 2 (6 pts), boolean chains 2, match/switch 1 (2 pts), if/else 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. This shape REPEATS in the file: one other method here (ModelFactory.open) 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.
  • ModelFactory.open::openBinary::walkProgram (cognitive 16) source/coreml.js:98 — ModelFactory.open::openBinary::walkProgram has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (5 pts), boolean chains 1 (nesting depth added 10). 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.
  • ModelFactory.open::backref (cognitive 16) source/flux.js:27 — ModelFactory.open::backref has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 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.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.4 · ×5
  • Low contrast colour pair in CSS (4.4:1) source/index.html:37 — `.toolbar-select select` sets color: #fff on background-color: #777 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.4:1) source/index.html:42 — `.toolbar-path-back-button` sets color: #ffffff on background-color: #777 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.4:1) source/index.html:44 — `.toolbar-path-name-button` sets color: #ffffff on background-color: #777 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.4:1) source/index.html:171 — `.toolbar-path-name-button` sets color: #404040 on background-color: #aaaaaa — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.4:1) source/index.html:173 — `.toolbar-select select` sets color: #404040 on background-color: #aaaaaa — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · constructor · ×5
  • constructor::map (cyclomatic 20) source/circle.js:187 — constructor::map 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.
  • constructor::map (cyclomatic 20) source/executorch.js:72 — constructor::map 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. This is NOT this file's highest cyclomatic complexity: constructor (cyclomatic 32) 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.
  • constructor::map (cyclomatic 20) source/tflite.js:195 — constructor::map 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.
  • constructor::map (cyclomatic 18) source/openvino.js:247 — constructor::map 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: constructor (cyclomatic 35) 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.
  • constructor::map (cyclomatic 16) source/pytorch.js:2426 — constructor::map 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. This is NOT this file's highest cyclomatic complexity: toType (cyclomatic 24) 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×5
  • Hotspot: source/mlir.js source/mlir.js:9649 — source/mlir.js changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 356 in Dialect.parseDirective at line 9649. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 09:40:35 -08:00' --until='2026-11-12 09:40:35 -08:00' --full-history --no-merges -- source/mlir.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: tools/mlir-script.js tools/mlir-script.js:50 — tools/mlir-script.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 302 in mlir-script.schema at line 50. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 09:40:35 -08:00' --until='2026-11-12 09:40:35 -08:00' --full-history --no-merges -- tools/mlir-script.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: source/gguf.js source/gguf.js:95 — source/gguf.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 164 in Graph.constructor at line 95. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 09:40:35 -08:00' --until='2026-11-12 09:40:35 -08:00' --full-history --no-merges -- source/gguf.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: source/base.js source/base.js:1006 — source/base.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in Tensor._decodeData at line 1006. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 09:40:35 -08:00' --until='2026-11-12 09:40:35 -08:00' --full-history --no-merges -- source/base.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: REDACTED REDACTED:562 — REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in package.update at line 562. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 09:40:35 -08:00' --until='2026-11-12 09:40:35 -08: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.
D2 · Cognitive Complexity · constructor (cognitive 28) · ×5
  • constructor (cognitive 28) source/dl4j.js:65 — constructor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 4 (8 pts), boolean chains 6, match/switch 1 (3 pts), ternaries 2 (nesting depth added 7). Of this number, 20 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 28) source/hailo.js:133 — constructor has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 11, ternaries 8 (11 pts), if/else 4 (5 pts), loops 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 28) source/mlnet.js:144 — constructor has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (8 pts), loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 6). Of this number, 27 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 28) source/mslite.js:110 — constructor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, loops 4 (6 pts), ternaries 1 (2 pts) (nesting depth added 10). Of this number, 19 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 28) REDACTED:3951 — constructor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 4 (8 pts), boolean chains 2, loops 1 (2 pts), error handling 1, match/switch 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.
R10 · Code Duplication · Duplicated block with local edits (37 matched lines × 2 locations) · ×5
  • Duplicated block with local edits (37 matched lines × 2 locations) source/caffe2.js:254 — source/caffe2.js:254 · source/paddle.js:322 — the two spans are one implementation copied and then locally edited — 296 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 (37 matched lines × 2 locations) source/mlir.js:20227 — source/mlir.js:20227 · source/mlir.js:20330 — the two spans are one implementation copied and then locally edited — 207 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (37 matched lines × 2 locations) source/tengine.js:103 — source/tengine.js:103 · source/tnn.js:174 — the two spans are one implementation copied and then locally edited — 392 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 (37 matched lines × 2 locations) tools/circle-script.js:48 — tools/circle-script.js:48 · tools/mslite-script.js:34 — the two spans are one implementation copied and then locally edited — 319 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 (37 matched lines × 2 locations) tools/mslite-script.js:34 — tools/mslite-script.js:34 · tools/tflite-script.js:48 — the two spans are one implementation copied and then locally edited — 319 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.
D1 · Cyclomatic Complexity · dagre.dagre.layout · ×4
  • dagre.dagre.layout::order (cyclomatic 66) source/dagre.js:895 — dagre.dagre.layout::order has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (dagre.dagre.layout, dagre.dagre.layout::order::buildLayerGraph, dagre.dagre.layout::position, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • dagre.dagre.layout::position (cyclomatic 22) source/dagre.js:1637 — dagre.dagre.layout::position has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (dagre.dagre.layout, dagre.dagre.layout::order, dagre.dagre.layout::order::buildLayerGraph, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • dagre.dagre.layout::order::buildLayerGraph (cyclomatic 20) source/dagre.js:1263 — dagre.dagre.layout::order::buildLayerGraph has cyclomatic complexity 20 (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. This shape REPEATS in the file: 4 other methods here (dagre.dagre.layout, dagre.dagre.layout::order, dagre.dagre.layout::position, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • dagre.dagre.layout::position::buildBlockGraph (cyclomatic 18) source/dagre.js:1655 — dagre.dagre.layout::position::buildBlockGraph has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (dagre.dagre.layout, dagre.dagre.layout::order, dagre.dagre.layout::order::buildLayerGraph, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 53) · ×4
  • Node.constructor (cyclomatic 53) source/caffe.js:341 — Node.constructor has cyclomatic complexity 53 (threshold 15). Of this number, 41 points are the body's own statements and 12 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Node.constructor (cyclomatic 53) source/circle.js:274 — Node.constructor has cyclomatic complexity 53 (threshold 15). Of this number, 43 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Node.constructor (cyclomatic 53) source/rknn.js:287 — Node.constructor has cyclomatic complexity 53 (threshold 15). Of this number, 47 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Node.constructor (cyclomatic 53) source/tflite.js:282 — Node.constructor has cyclomatic complexity 53 (threshold 15). Of this number, 43 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelFactory.open · ×4
  • ModelFactory.open::requestManifest::parse (cyclomatic 38) source/mxnet.js:57 — ModelFactory.open::requestManifest::parse 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.
  • ModelFactory.open::openJson (cyclomatic 22) source/tf.js:397 — ModelFactory.open::openJson has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: one other method here (ModelFactory.open::openJson::openShards) 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.
  • ModelFactory.open::openProgram (cyclomatic 21) source/paddle.js:83 — ModelFactory.open::openProgram has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: one other method here (ModelFactory.open) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: IR.getType (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • ModelFactory.open::openJson::openShards (cyclomatic 17) source/tf.js:424 — ModelFactory.open::openJson::openShards has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ModelFactory.open::openJson) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · layout · ×4
  • layout::order (cognitive 194) source/dagre.js:895 — layout::order has cognitive complexity 194 (threshold 15). Drivers by points: if/else 25 (123 pts), loops 18 (52 pts), boolean chains 17, ternaries 1 (2 pts) (nesting depth added 133). 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.
  • layout::position::buildBlockGraph (cognitive 59) source/dagre.js:1655 — layout::position::buildBlockGraph has cognitive complexity 59 (threshold 15). Drivers by points: if/else 7 (24 pts), ternaries 5 (22 pts), match/switch 2 (10 pts), loops 2 (3 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • layout::order::buildLayerGraph (cognitive 49) source/dagre.js:1263 — layout::order::buildLayerGraph has cognitive complexity 49 (threshold 15). Drivers by points: loops 7 (23 pts), if/else 9 (21 pts), boolean chains 5 (nesting depth added 28). 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.
  • layout::rank::networkSimplex::initCutValues (cognitive 41) source/dagre.js:367 — layout::rank::networkSimplex::initCutValues has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 5 (16 pts), loops 3 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.constructor · ×4
  • Graph.constructor::constant (cognitive 52) source/openvino.js:279 — Graph.constructor::constant has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 7 (10 pts), boolean chains 7, match/switch 1 (3 pts), 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. This shape REPEATS in the file: one other method here (Graph.constructor) 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.
  • Graph.constructor::buildFfn (cognitive 28) source/gguf.js:177 — Graph.constructor::buildFfn has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 6 (11 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Graph.constructor) 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.
  • Graph.constructor::process_node (cognitive 28) source/keras.js:692 — Graph.constructor::process_node has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 4 (10 pts), boolean chains 4 (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.
  • Graph.constructor::deserialize (cognitive 16) source/hickle.js:32 — Graph.constructor::deserialize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 1 (4 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 23) · ×4
  • constructor (cognitive 23) source/acuity.js:32 — constructor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, loops 3, match/switch 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 49, value, a function literal at line 46). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • constructor (cognitive 23) source/espdl.js:239 — constructor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 3 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 9). Of this number, 13 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 23) source/espresso.js:147 — constructor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 8). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 164, 156, 157, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • constructor (cognitive 23) source/lasagne.js:32 — constructor has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 6 (8 pts), boolean chains 4, loops 2 (nesting depth added 8). Of this number, 19 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D6 · Cohesion (LCOM4) · Low cohesion · ×4
  • Low cohesion: Dialect (LCOM4 20) source/mlir.js:8988 — Dialect's methods fall into 20 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 20 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Reader (LCOM4 8) source/hdf5.js:304 — Reader's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Document (LCOM4 4) test/mock.js:203 — Document's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Host (LCOM4 4) test/mock.js:296 — Host's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D1 · Cyclomatic Complexity · Graph.constructor · ×3
  • Graph.constructor::constant (cyclomatic 42) source/openvino.js:279 — Graph.constructor::constant 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. This shape REPEATS in the file: one other method here (Graph.constructor) 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.
  • Graph.constructor::loadGraph (cyclomatic 26) source/megengine.js:100 — Graph.constructor::loadGraph 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.
  • Graph.constructor::process_node (cyclomatic 18) source/keras.js:692 — Graph.constructor::process_node has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Graph.constructor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 26) · ×3
  • Node.constructor (cyclomatic 26) source/dlc.js:149 — Node.constructor 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.
  • Node.constructor (cyclomatic 26) source/uff.js:161 — Node.constructor has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Node.constructor (cyclomatic 26) source/xmodel.js:115 — Node.constructor has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 22) · ×3
  • Graph.constructor (cyclomatic 22) source/mnn.js:73 — Graph.constructor has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Utility.dataType (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.
  • Graph.constructor (cyclomatic 22) source/tosa.js:125 — Graph.constructor has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Graph.constructor (cyclomatic 22) source/uff.js:83 — Graph.constructor has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 21) · ×3
  • Node.constructor (cyclomatic 21) source/acuity.js:114 — Node.constructor 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.
  • Node.constructor (cyclomatic 21) source/kann.js:62 — Node.constructor has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Node.constructor::extractData (cyclomatic 31) 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.
  • Node.constructor (cyclomatic 21) source/qnn.js:176 — Node.constructor 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: Utility.dataType (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 19) · ×3
  • Graph.constructor (cyclomatic 19) source/acuity.js:32 — Graph.constructor has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • Graph.constructor (cyclomatic 19) source/hickle.js:29 — Graph.constructor has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (deserialize). 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.
  • Graph.constructor (cyclomatic 19) source/mediapipe.js:42 — Graph.constructor has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 18) · ×3
  • Graph.constructor (cyclomatic 18) source/dnn.js:43 — Graph.constructor has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Graph.constructor (cyclomatic 18) source/lasagne.js:32 — Graph.constructor has cyclomatic complexity 18 (threshold 15). Of this number, 15 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.
  • Graph.constructor (cyclomatic 18) source/om.js:44 — Graph.constructor has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: OpDef.constructor (cyclomatic 25) 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.
D2 · Cognitive Complexity · open · ×3
  • open::requestManifest::parse (cognitive 79) source/mxnet.js:57 — open::requestManifest::parse has cognitive complexity 79 (threshold 15). Drivers by points: if/else 24 (58 pts), ternaries 3 (9 pts), boolean chains 8, error handling 2 (4 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • open::createModel (cognitive 22) source/mxnet.js:158 — open::createModel has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (6 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • open::masked_crc32c (cognitive 17) source/tf.js:1601 — open::masked_crc32c has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (16 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 42) · ×3
  • constructor (cognitive 42) source/dlc.js:149 — constructor has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (8 pts), match/switch 2 (7 pts), ternaries 4 (6 pts), boolean chains 5 (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.
  • constructor (cognitive 42) source/mediapipe.js:116 — constructor has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 7 (18 pts), boolean chains 3, 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.
  • constructor (cognitive 42) source/onnx.js:49 — constructor has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 7 (13 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 39) · ×3
  • constructor (cognitive 39) source/kann.js:62 — constructor has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 7 (19 pts), if/else 7, boolean chains 6, loops 3 (6 pts), match/switch 1 (nesting depth added 15). Of this number, 34 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 39) source/pytorch.js:2286 — constructor has cognitive complexity 39 (threshold 15). Drivers by points: loops 11 (14 pts), ternaries 3 (10 pts), if/else 4 (8 pts), match/switch 2 (5 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.
  • constructor (cognitive 39) source/xmodel.js:115 — constructor has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 11, ternaries 1 (5 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Context.build · ×3
  • Context.build::resolveBlock (cognitive 23) source/gguf.js:1191 — Context.build::resolveBlock has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 6, loops 1, 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. This shape REPEATS in the file: 3 other methods here (Context.build, Context.build::buildBlockLayers, Context.build::sectionFlat) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Context.build::buildBlockLayers (cognitive 17) source/gguf.js:1234 — Context.build::buildBlockLayers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (8 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. This shape REPEATS in the file: 3 other methods here (Context.build, Context.build::resolveBlock, Context.build::sectionFlat) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • Context.build::sectionFlat (cognitive 16) source/gguf.js:1345 — Context.build::sectionFlat has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), if/else 2 (4 pts), ternaries 1 (4 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. This shape REPEATS in the file: 3 other methods here (Context.build, Context.build::resolveBlock, Context.build::buildBlockLayers) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · constructor (cognitive 20) · ×3
  • constructor (cognitive 20) source/nnabla.js:110 — constructor has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 4, if/else 2 (3 pts), loops 3, match/switch 1 (nesting depth added 5). None of this is in the body itself: all 20 points belong to 9 function items inside it that branch (a function literal at line 140, get_parameters, a function literal at line 142, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • constructor (cognitive 20) source/onnx.js:163 — constructor has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (8 pts), boolean chains 7, if/else 2 (3 pts), ternaries 2 (nesting depth added 4). Of this number, 18 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 20) source/tf.js:1266 — constructor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (8 pts), boolean chains 3 (nesting depth added 9). Of this number, 10 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 16) · ×3
  • constructor (cognitive 16) source/barracuda.js:38 — constructor has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 4 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 11 points are the body's own statements and 5 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.
  • constructor (cognitive 16) REDACTED:8 — constructor has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 5, if/else 2 (3 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.
  • constructor (cognitive 16) source/dlc.js:28 — constructor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). 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.
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark publish/icon.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 source/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · Context.graph · ×2
  • Context.graph::updateTorchScript (cyclomatic 81) source/tf.js:1907 — Context.graph::updateTorchScript has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (Context.graph, Context.graph::updateTorchScript::match) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • Context.graph::updateTorchScript::match (cyclomatic 31) source/tf.js:1997 — Context.graph::updateTorchScript::match has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (Context.graph, Context.graph::updateTorchScript) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 48) · ×2
  • Node.constructor (cyclomatic 48) source/paddle.js:456 — Node.constructor has cyclomatic complexity 48 (threshold 15). Of this number, 17 points are the body's own statements and 31 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Node.constructor (cyclomatic 48) source/sklearn.js:137 — Node.constructor has cyclomatic complexity 48 (threshold 15). Of this number, 44 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 45) · ×2
  • Graph.constructor (cyclomatic 45) source/kmodel.js:33 — Graph.constructor has cyclomatic complexity 45 (threshold 15). Of this number, 36 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Graph.constructor (cyclomatic 45) source/rknn.js:109 — Graph.constructor has cyclomatic complexity 45 (threshold 15). Of this number, 25 points are the body's own statements and 20 belong to 6 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 40) · ×2
  • Node.constructor (cyclomatic 40) source/onnx.js:289 — Node.constructor has cyclomatic complexity 40 (threshold 15). Of this number, 36 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • Node.constructor (cyclomatic 40) source/pickle.js:95 — Node.constructor has cyclomatic complexity 40 (threshold 15). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 37) · ×2
  • Node.constructor (cyclomatic 37) source/dl4j.js:167 — Node.constructor has cyclomatic complexity 37 (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.
  • Node.constructor (cyclomatic 37) source/mindir.js:120 — Node.constructor has cyclomatic complexity 37 (threshold 15). Of this number, 27 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Model.constructor (cyclomatic 36) · ×2
  • Model.constructor (cyclomatic 36) source/circle.js:71 — Model.constructor has cyclomatic complexity 36 (threshold 15). Of this number, 30 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Model.constructor (cyclomatic 36) source/tflite.js:79 — Model.constructor has cyclomatic complexity 36 (threshold 15). Of this number, 30 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 35) · ×2
  • Node.constructor (cyclomatic 35) source/bigdl.js:106 — Node.constructor has cyclomatic complexity 35 (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.
  • Node.constructor (cyclomatic 35) source/espdl.js:120 — Node.constructor has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 35) · ×2
  • Graph.constructor (cyclomatic 35) source/circle.js:167 — Graph.constructor has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 12 of the 35 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 187, 230, 237, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • Graph.constructor (cyclomatic 35) source/tflite.js:175 — Graph.constructor has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 12 of the 35 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 195, 238, 245, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · View.refresh · ×2
  • View.refresh::animateTransition (cyclomatic 32) REDACTED:517 — View.refresh::animateTransition 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. This shape REPEATS in the file: 2 other methods here (View.refresh, View.refresh::animateTransition::tick) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • View.refresh::animateTransition::tick (cyclomatic 18) REDACTED:619 — View.refresh::animateTransition::tick has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (View.refresh, View.refresh::animateTransition) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 32) · ×2
  • Node.constructor (cyclomatic 32) source/executorch.js:206 — Node.constructor has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Node.constructor (cyclomatic 32) source/tengine.js:83 — Node.constructor has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 31) · ×2
  • Node.constructor (cyclomatic 31) source/barracuda.js:100 — Node.constructor has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Node.constructor (cyclomatic 31) source/darknet.js:805 — Node.constructor has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 28) · ×2
  • Node.constructor (cyclomatic 28) source/mlnet.js:144 — Node.constructor has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
  • Node.constructor (cyclomatic 28) source/torch.js:95 — Node.constructor has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 23) · ×2
  • Graph.constructor (cyclomatic 23) source/dlc.js:57 — Graph.constructor has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Graph.constructor (cyclomatic 23) source/hailo.js:49 — Graph.constructor has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 22) · ×2
  • Node.constructor (cyclomatic 22) source/armnn.js:141 — Node.constructor 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.
  • Node.constructor (cyclomatic 22) source/coreml.js:295 — Node.constructor has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Module.constructor (cyclomatic 22) · ×2
  • Module.constructor (cyclomatic 22) source/message.js:47 — Module.constructor has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Module.constructor (cyclomatic 22) source/mlnet.js:42 — Module.constructor has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ModelFactory.open (cyclomatic 21) · ×2
  • ModelFactory.open (cyclomatic 21) source/ncnn.js:106 — ModelFactory.open 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.
  • ModelFactory.open (cyclomatic 21) source/paddle.js:59 — ModelFactory.open has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: one other method here (ModelFactory.open::openProgram) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: IR.getType (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · constructor (cyclomatic 16) · ×2
  • constructor (cyclomatic 16) source/espresso.js:147 — constructor has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • constructor (cyclomatic 16) source/nnabla.js:110 — constructor 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 9 function items inside it that branch (a function literal at line 140, a function literal at line 142, get_parameters, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · constructor (cognitive 212) · ×2
  • constructor (cognitive 212) source/keras.js:908 — constructor has cognitive complexity 212 (threshold 15). Drivers by points: if/else 49 (117 pts), boolean chains 46, ternaries 12 (25 pts), loops 9 (19 pts), match/switch 3 (5 pts) (nesting depth added 93). Of this number, 174 points are the body's own statements and 38 belong to 9 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • constructor (cognitive 212) source/pytorch.js:74 — constructor has cognitive complexity 212 (threshold 15). Drivers by points: if/else 40 (104 pts), loops 16 (45 pts), ternaries 10 (33 pts), boolean chains 30 (nesting depth added 116). Of this number, 166 points are the body's own statements and 46 belong to 12 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 115) · ×2
  • constructor (cognitive 115) source/circle.js:274 — constructor has cognitive complexity 115 (threshold 15). Drivers by points: if/else 23 (68 pts), loops 5 (16 pts), boolean chains 11, ternaries 5 (11 pts), match/switch 1 (5 pts), error handling 1 (4 pts) (nesting depth added 69). Of this number, 88 points are the body's own statements and 27 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.
  • constructor (cognitive 115) source/tflite.js:282 — constructor has cognitive complexity 115 (threshold 15). Drivers by points: if/else 23 (68 pts), loops 5 (16 pts), boolean chains 11, ternaries 5 (11 pts), match/switch 1 (5 pts), error handling 1 (4 pts) (nesting depth added 69). Of this number, 88 points are the body's own statements and 27 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · graph · ×2
  • graph::updateTorchScript (cognitive 100) source/tf.js:1907 — graph::updateTorchScript has cognitive complexity 100 (threshold 15). Drivers by points: if/else 20 (54 pts), boolean chains 17, loops 7 (13 pts), ternaries 3 (11 pts), match/switch 1 (5 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graph::updateTorchScript::match (cognitive 36) source/tf.js:1997 — graph::updateTorchScript::match has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 8, match/switch 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 67) · ×2
  • constructor (cognitive 67) source/circle.js:71 — constructor has cognitive complexity 67 (threshold 15). Drivers by points: if/else 11 (31 pts), ternaries 9 (22 pts), boolean chains 8, loops 3, match/switch 1 (3 pts) (nesting depth added 35). Of this number, 57 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 67) source/tflite.js:79 — constructor has cognitive complexity 67 (threshold 15). Drivers by points: if/else 11 (31 pts), ternaries 9 (22 pts), boolean chains 8, loops 3, match/switch 1 (3 pts) (nesting depth added 35). Of this number, 57 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · View.refresh · ×2
  • View.refresh::animateTransition (cognitive 60) REDACTED:517 — View.refresh::animateTransition has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (42 pts), boolean chains 10, ternaries 1 (5 pts), loops 3 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (View.refresh::animateTransition::tick) 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.
  • View.refresh::animateTransition::tick (cognitive 39) REDACTED:619 — View.refresh::animateTransition::tick has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (35 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (View.refresh::animateTransition) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · constructor (cognitive 59) · ×2
  • constructor (cognitive 59) source/caffe2.js:353 — constructor has cognitive complexity 59 (threshold 15). Drivers by points: if/else 16 (24 pts), ternaries 6 (17 pts), boolean chains 14, loops 2 (4 pts) (nesting depth added 21). Of this number, 28 points are the body's own statements and 31 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 59) source/tengine.js:83 — constructor has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 8 (22 pts), if/else 10 (20 pts), boolean chains 12, loops 3 (5 pts) (nesting depth added 26). Of this number, 54 points are the body's own statements and 5 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 58) · ×2
  • constructor (cognitive 58) source/executorch.js:206 — constructor has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 11 (29 pts), if/else 6 (10 pts), loops 5 (10 pts), boolean chains 9 (nesting depth added 27). Of this number, 54 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 58) source/zip.js:139 — constructor has cognitive complexity 58 (threshold 15). Drivers by points: if/else 10 (44 pts), loops 3 (5 pts), match/switch 1 (4 pts), boolean chains 3, ternaries 1 (2 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.
D2 · Cognitive Complexity · Utility.weights · ×2
  • Utility.weights::dict (cognitive 47) source/numpy.js:173 — Utility.weights::dict has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (16 pts), boolean chains 3, ternaries 1 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (Utility.weights::list) 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.
  • Utility.weights::list (cognitive 16) source/numpy.js:219 — Utility.weights::list has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 2 (6 pts), boolean chains 3, 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. This shape REPEATS in the file: one other method here (Utility.weights::dict) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · constructor (cognitive 44) · ×2
  • constructor (cognitive 44) source/armnn.js:141 — constructor has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 9 (23 pts), loops 4 (9 pts), if/else 4 (8 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.
  • constructor (cognitive 44) source/darknet.js:805 — constructor has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 8, ternaries 3 (5 pts), loops 2 (4 pts), match/switch 1 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tensor.constructor (cognitive 38) · ×2
  • Tensor.constructor (cognitive 38) source/mlir.js:662 — Tensor.constructor has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 12, ternaries 3 (7 pts), loops 1 (3 pts) (nesting depth added 14). Of this number, 35 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Tensor.constructor (cognitive 38) source/tf.js:1114 — Tensor.constructor has cognitive complexity 38 (threshold 15). Drivers by points: loops 4 (16 pts), boolean chains 14, if/else 4 (5 pts), match/switch 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 37) · ×2
  • constructor (cognitive 37) source/pickle.js:95 — constructor has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 16, ternaries 2 (3 pts), loops 1 (nesting depth added 4). Of this number, 35 points are the body's own statements and 2 belong to 7 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • constructor (cognitive 37) REDACTED:3878 — constructor has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 13, ternaries 3 (5 pts), loops 2 (3 pts) (nesting depth added 7). Of this number, 33 points are the body's own statements and 4 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.constructor (cognitive 35) · ×2
  • Graph.constructor (cognitive 35) source/executorch.js:51 — Graph.constructor has cognitive complexity 35 (threshold 15). Drivers by points: loops 8 (12 pts), boolean chains 10, if/else 4 (8 pts), ternaries 3 (5 pts) (nesting depth added 10). Of this number, 28 points are the body's own statements and 7 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Graph.constructor (cognitive 35) source/uff.js:83 — Graph.constructor has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (11 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 34) · ×2
  • constructor (cognitive 34) source/dnn.js:126 — constructor has cognitive complexity 34 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (9 pts), loops 4 (8 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 16). Of this number, 30 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • constructor (cognitive 34) source/torch.js:95 — constructor has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 10, ternaries 2 (4 pts), loops 2 (nesting depth added 10). Of this number, 32 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelFactory.match (cognitive 33) · ×2
  • ModelFactory.match (cognitive 33) source/caffe2.js:6 — ModelFactory.match has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (20 pts), boolean chains 6, match/switch 2 (6 pts), ternaries 1 (nesting depth added 18). 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.
  • ModelFactory.match (cognitive 33) source/keras.js:10 — ModelFactory.match has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 11, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 31) · ×2
  • constructor (cognitive 31) source/message.js:47 — constructor has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 7 (11 pts), boolean chains 7 (nesting depth added 10). Of this number, 30 points are the body's own statements and 1 belongs to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 31) source/mnn.js:73 — constructor has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (9 pts), loops 5 (6 pts), boolean chains 4 (nesting depth added 11). Most of this is not in the body itself: 14 of the 31 points are its own statements and the rest belongs to 3 function items inside it that branch (map, a function literal at line 90, a function literal at line 121). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Node.constructor (cognitive 24) · ×2
  • Node.constructor (cognitive 24) source/pytorch.js:2497 — Node.constructor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (6 pts), loops 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.
  • Node.constructor (cognitive 24) source/uff.js:161 — Node.constructor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (7 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 12). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 22) · ×2
  • constructor (cognitive 22) source/mediapipe.js:42 — constructor has cognitive complexity 22 (threshold 15). Drivers by points: loops 7, if/else 5 (6 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 4). Of this number, 14 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • constructor (cognitive 22) source/rknn.js:56 — constructor has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 4 (9 pts), boolean chains 8, if/else 2 (4 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · decodeJson (cognitive 21) · ×2
  • decodeJson (cognitive 21) source/onnx-proto.js:1519 — decodeJson has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, ternaries 3 (6 pts) (nesting depth added 3). Of this number, 19 points are the body's own statements and 2 belong to 11 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • decodeJson (cognitive 21) source/pytorch-proto.js:222 — decodeJson has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, ternaries 4 (8 pts) (nesting depth added 4). Of this number, 19 points are the body's own statements and 2 belong to 9 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ModelFactory.open (cognitive 20) · ×2
  • ModelFactory.open (cognitive 20) source/circle.js:22 — ModelFactory.open has cognitive complexity 20 (threshold 15). Drivers by points: error handling 3 (6 pts), ternaries 2 (6 pts), loops 1 (3 pts), boolean chains 2, if/else 1 (2 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ModelFactory.open (cognitive 20) source/tflite.js:30 — ModelFactory.open has cognitive complexity 20 (threshold 15). Drivers by points: error handling 3 (6 pts), ternaries 2 (6 pts), loops 1 (3 pts), boolean chains 2, if/else 1 (2 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Tensor.values (cognitive 20) · ×2
  • Tensor.values (cognitive 20) source/circle.js:458 — Tensor.values has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Tensor.values (cognitive 20) source/tflite.js:466 — Tensor.values has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · constructor (cognitive 19) · ×2
  • constructor (cognitive 19) source/executorch.js:815 — constructor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (7 pts), loops 3 (nesting depth added 5). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (map). 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.
  • constructor (cognitive 19) source/om.js:44 — constructor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 2, match/switch 1 (nesting depth added 3). Of this number, 12 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.constructor (cognitive 18) · ×2
  • Graph.constructor (cognitive 18) source/coreml.js:576 — Graph.constructor has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (6 pts), ternaries 3 (6 pts), boolean chains 5, if/else 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.
  • Graph.constructor (cognitive 18) source/mslite.js:67 — Graph.constructor has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (12 pts), boolean chains 3, if/else 2, ternaries 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ModelFactoryService._unsupported · ×2
  • ModelFactoryService._unsupported::flatbuffers (cognitive 18) REDACTED:7608 — ModelFactoryService._unsupported::flatbuffers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ModelFactoryService._unsupported::pb::match) 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.
  • ModelFactoryService._unsupported::pb::match (cognitive 16) REDACTED:7568 — ModelFactoryService._unsupported::pb::match has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 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. This shape REPEATS in the file: one other method here (ModelFactoryService._unsupported::flatbuffers) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Metadata.attribute (cognitive 17) · ×2
  • Metadata.attribute (cognitive 17) source/pytorch.js:2726 — Metadata.attribute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (8 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.
  • Metadata.attribute (cognitive 17) source/ncnn.js:1193 — Metadata.attribute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (8 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium CVE · ×2
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Guard cannot change the result · ×2
  • Guard cannot change the result — returns what the code already falls through to source/mlir.js:3223 — The guard above `return attr;` also returns `attr`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
  • Guard cannot change the result — returns what the code already falls through to REDACTED:5580 — The guard above `return value;` also returns `value`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
R10 · Code Duplication · Duplicated block with local edits (46 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (46 matched lines × 2 locations) source/mxnet.js:493 — source/mxnet.js:493 · source/openvino.js:563 — the two spans are one implementation copied and then locally edited — 304 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 (46 matched lines × 2 locations) source/tf-proto.js:1086 — source/tf-proto.js:1086 · source/uff-proto.js:10 — the two spans are one implementation copied and then locally edited — 225 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (38 lines × 2 locations) · ×2
  • Duplicated block (38 lines × 2 locations) source/espdl.js:286 — source/espdl.js:286 · source/onnx.js:1339 — 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 (38 lines × 2 locations) source/mlir.js:13052 — source/mlir.js:13052 · source/mlir.js:13107 — 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 (29 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (29 matched lines × 2 locations) source/darknet.js:361 — source/darknet.js:361 · source/darknet.js:584 — the two spans are one implementation copied and then locally edited — 271 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (29 matched lines × 2 locations) source/lightgbm.js:70 — source/lightgbm.js:70 · source/sklearn.js:108 — the two spans are one implementation copied and then locally edited — 189 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (28 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (28 matched lines × 2 locations) source/dl4j.js:387 — source/dl4j.js:387 · source/gguf.js:842 — the two spans are one implementation copied and then locally edited — 130 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 (28 matched lines × 2 locations) source/gguf.js:845 — source/gguf.js:845 · source/tf.js:1493 — the two spans are one implementation copied and then locally edited — 136 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.
AC3 · Page structure · Empty <h1> heading · ×1
  • Empty <h1> heading source/index.html:315 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×1
  • Animation without a prefers-reduced-motion guard source/index.html:83 — `.welcome.spinner .logo-spinner` moves (`animation: orbit 0.5s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D1 · Cyclomatic Complexity · Execution.constructor (cyclomatic 2972) · ×1
  • Execution.constructor (cyclomatic 2972) source/python.js:8 — Execution.constructor has cyclomatic complexity 2972 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Dialect.parseDirective (cyclomatic 313) · ×1
  • Dialect.parseDirective (cyclomatic 313) source/mlir.js:9649 — Dialect.parseDirective has cyclomatic complexity 313 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 309) · ×1
  • Node.constructor (cyclomatic 309) source/pytorch.js:324 — Node.constructor has cyclomatic complexity 309 (threshold 15). Of this number, 259 points are the body's own statements and 50 belong to 15 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 276) · ×1
  • Node.constructor (cyclomatic 276) source/ncnn.js:285 — Node.constructor has cyclomatic complexity 276 (threshold 15). Of this number, 269 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SPIRVDialect.parseOperation (cyclomatic 195) · ×1
  • SPIRVDialect.parseOperation (cyclomatic 195) source/mlir.js:17902 — SPIRVDialect.parseOperation has cyclomatic complexity 195 (threshold 15). To reduce it, separate the cases: extract each independent 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 164) · ×1
  • Graph.constructor (cyclomatic 164) source/gguf.js:95 — Graph.constructor has cyclomatic complexity 164 (threshold 15). Of this number, 136 points are the body's own statements and 28 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelFactory.open (cyclomatic 148) · ×1
  • ModelFactory.open (cyclomatic 148) source/keras.js:79 — ModelFactory.open has cyclomatic complexity 148 (threshold 15). Of this number, 92 points are the body's own statements and 56 belong to 17 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 136) · ×1
  • Graph.constructor (cyclomatic 136) source/darknet.js:81 — Graph.constructor has cyclomatic complexity 136 (threshold 15). Of this number, 121 points are the body's own statements and 15 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 128) · ×1
  • Node.constructor (cyclomatic 128) source/keras.js:908 — Node.constructor has cyclomatic complexity 128 (threshold 15). Of this number, 108 points are the body's own statements and 20 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 124) · ×1
  • Graph.constructor (cyclomatic 124) source/mlir.js:181 — Graph.constructor has cyclomatic complexity 124 (threshold 15). Of this number, 119 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · next (cyclomatic 124) · ×1
  • next (cyclomatic 124) source/protobuf.js:1124 — next 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.
D1 · Cyclomatic Complexity · LinalgDialect.parseOperation (cyclomatic 121) · ×1
  • LinalgDialect.parseOperation (cyclomatic 121) source/mlir.js:15989 — LinalgDialect.parseOperation has cyclomatic complexity 121 (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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 118) · ×1
  • Node.constructor (cyclomatic 118) source/openvino.js:503 — Node.constructor has cyclomatic complexity 118 (threshold 15). Of this number, 114 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SdfgDialect.parseOperation (cyclomatic 114) · ×1
  • SdfgDialect.parseOperation (cyclomatic 114) source/mlir.js:24920 — SdfgDialect.parseOperation has cyclomatic complexity 114 (threshold 15). To reduce it, separate the cases: extract each independent 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Dialect.inferResultTypes (cyclomatic 111) · ×1
  • Dialect.inferResultTypes (cyclomatic 111) source/mlir.js:9360 — Dialect.inferResultTypes has cyclomatic complexity 111 (threshold 15). To reduce it, separate the cases: extract each independent 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · HALDialect.parseOperation (cyclomatic 107) · ×1
  • HALDialect.parseOperation (cyclomatic 107) source/mlir.js:13672 — HALDialect.parseOperation has cyclomatic complexity 107 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Node._add (cyclomatic 100) · ×1
  • Node._add (cyclomatic 100) REDACTED:2825 — Node._add has cyclomatic complexity 100 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TextReader.read (cyclomatic 99) · ×1
  • TextReader.read (cyclomatic 99) source/xml.js:33 — TextReader.read has cyclomatic complexity 99 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 99) · ×1
  • Graph.constructor (cyclomatic 99) source/pytorch.js:74 — Graph.constructor has cyclomatic complexity 99 (threshold 15). Of this number, 84 points are the body's own statements and 15 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 98) · ×1
  • ModelFactory.match (cyclomatic 98) source/tf.js:12 — ModelFactory.match has cyclomatic complexity 98 (threshold 15). Of this number, 83 points are the body's own statements and 15 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Inference.infer (cyclomatic 96) · ×1
  • Inference.infer (cyclomatic 96) source/acuity.js:219 — Inference.infer has cyclomatic complexity 96 (threshold 15). Most of this is not in the body itself: 6 of the 96 points are its own statements and the rest belongs to 24 function items inside it that branch (a function literal at line 482, infer, a function literal at line 585, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 86) · ×1
  • Node.constructor (cyclomatic 86) source/tf.js:904 — Node.constructor has cyclomatic complexity 86 (threshold 15). Of this number, 49 points are the body's own statements and 37 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Context.peek (cyclomatic 83) · ×1
  • Context.peek (cyclomatic 83) REDACTED:6783 — Context.peek has cyclomatic complexity 83 (threshold 15). Of this number, 74 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Tensor._decodeData (cyclomatic 81) · ×1
  • Tensor._decodeData (cyclomatic 81) source/base.js:1006 — Tensor._decodeData has cyclomatic complexity 81 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · Reader.read (cyclomatic 80) · ×1
  • Reader.read (cyclomatic 80) source/kmodel.js:254 — Reader.read has cyclomatic complexity 80 (threshold 15). Of this number, 62 points are the body's own statements and 18 belong to 10 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 80) · ×1
  • Graph.constructor (cyclomatic 80) source/mxnet.js:268 — Graph.constructor has cyclomatic complexity 80 (threshold 15). Of this number, 68 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Formatter._format (cyclomatic 79) · ×1
  • Formatter._format (cyclomatic 79) REDACTED:5526 — Formatter._format has cyclomatic complexity 79 (threshold 15). Of this number, 69 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 79) · ×1
  • Graph.constructor (cyclomatic 79) source/keras.js:524 — Graph.constructor has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Graph.constructor::process_node) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 76) · ×1
  • Node.constructor (cyclomatic 76) source/tnn.js:134 — Node.constructor has cyclomatic complexity 76 (threshold 15). Of this number, 72 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 74) · ×1
  • Node.constructor (cyclomatic 74) source/mlir.js:490 — Node.constructor 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · _tokenizeInline (cyclomatic 70) · ×1
  • _tokenizeInline (cyclomatic 70) REDACTED:5955 — _tokenizeInline has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ComputationNetwork.constructor (cyclomatic 69) · ×1
  • ComputationNetwork.constructor (cyclomatic 69) source/cntk.js:594 — ComputationNetwork.constructor has cyclomatic complexity 69 (threshold 15). Of this number, 25 points are the body's own statements and 44 belong to 15 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProtoReader.open (cyclomatic 69) · ×1
  • ProtoReader.open (cyclomatic 69) source/onnx.js:1482 — ProtoReader.open has cyclomatic complexity 69 (threshold 15). Of this number, 55 points are the body's own statements and 14 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 66) · ×1
  • Node.constructor (cyclomatic 66) source/mxnet.js:459 — Node.constructor has cyclomatic complexity 66 (threshold 15). Of this number, 64 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Utility.weights (cyclomatic 65) · ×1
  • Utility.weights (cyclomatic 65) source/pickle.js:317 — Utility.weights has cyclomatic complexity 65 (threshold 15). Of this number, 62 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Tensor.constructor (cyclomatic 63) · ×1
  • Tensor.constructor (cyclomatic 63) source/onnx.js:440 — Tensor.constructor has cyclomatic complexity 63 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Application._updateMenu (cyclomatic 62) · ×1
  • Application._updateMenu (cyclomatic 62) source/app.js:358 — Application._updateMenu has cyclomatic complexity 62 (threshold 15). Of this number, 16 points are the body's own statements and 46 belong to 21 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Documentation.open (cyclomatic 62) · ×1
  • Documentation.open (cyclomatic 62) REDACTED:5327 — Documentation.open has cyclomatic complexity 62 (threshold 15). Of this number, 28 points are the body's own statements and 34 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelFactoryService._unsupported (cyclomatic 61) · ×1
  • ModelFactoryService._unsupported (cyclomatic 61) REDACTED:7402 — ModelFactoryService._unsupported has cyclomatic complexity 61 (threshold 15). Most of this is not in the body itself: 4 of the 61 points are its own statements and the rest belongs to 13 function items inside it that branch (flatbuffers, pb::match, pb, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Generator._tokenize (cyclomatic 60) · ×1
  • Generator._tokenize (cyclomatic 60) REDACTED:5749 — Generator._tokenize has cyclomatic complexity 60 (threshold 15). Of this number, 59 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Utility.weights (cyclomatic 60) · ×1
  • Utility.weights (cyclomatic 60) source/pytorch.js:2172 — Utility.weights has cyclomatic complexity 60 (threshold 15). Of this number, 55 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RewriterConfig.decodeJson (cyclomatic 60) · ×1
  • RewriterConfig.decodeJson (cyclomatic 60) source/tf-proto.js:12220 — RewriterConfig.decodeJson has cyclomatic complexity 60 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProtoReader.read (cyclomatic 59) · ×1
  • ProtoReader.read (cyclomatic 59) source/onnx.js:1618 — ProtoReader.read has cyclomatic complexity 59 (threshold 15). Of this number, 53 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Decoder.open (cyclomatic 58) · ×1
  • Decoder.open (cyclomatic 58) source/text.js:6 — Decoder.open has cyclomatic complexity 58 (threshold 15). Of this number, 56 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 58) · ×1
  • Node.constructor (cyclomatic 58) source/megengine.js:438 — Node.constructor has cyclomatic complexity 58 (threshold 15). Of this number, 42 points are the body's own statements and 16 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 56) · ×1
  • Graph.constructor (cyclomatic 56) source/dot.js:50 — Graph.constructor has cyclomatic complexity 56 (threshold 15). Of this number, 51 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 56) · ×1
  • Node.constructor (cyclomatic 56) source/om.js:96 — Node.constructor has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AssemblyFormatParser.parseDirective (cyclomatic 55) · ×1
  • AssemblyFormatParser.parseDirective (cyclomatic 55) source/mlir.js:8473 — AssemblyFormatParser.parseDirective has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TestDialect.parseOperation (cyclomatic 55) · ×1
  • TestDialect.parseOperation (cyclomatic 55) source/mlir.js:25944 — TestDialect.parseOperation has cyclomatic complexity 55 (threshold 15). Of this number, 48 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Execution.expression (cyclomatic 54) · ×1
  • Execution.expression (cyclomatic 54) source/python.js:22217 — Execution.expression has cyclomatic complexity 54 (threshold 15). Of this number, 50 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 54) · ×1
  • Node.constructor (cyclomatic 54) source/cntk.js:285 — Node.constructor has cyclomatic complexity 54 (threshold 15). Of this number, 39 points are the body's own statements and 15 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Context.graph (cyclomatic 53) · ×1
  • Context.graph (cyclomatic 53) source/tf.js:1768 — Context.graph has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (Context.graph::updateTorchScript, Context.graph::updateTorchScript::match) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 52) · ×1
  • Graph.constructor (cyclomatic 52) source/executorch.js:51 — Graph.constructor has cyclomatic complexity 52 (threshold 15). Of this number, 20 points are the body's own statements and 32 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 51) · ×1
  • Graph.constructor (cyclomatic 51) source/caffe.js:189 — Graph.constructor has cyclomatic complexity 51 (threshold 15). Of this number, 47 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Tensor._context (cyclomatic 50) · ×1
  • Tensor._context (cyclomatic 50) source/base.js:845 — Tensor._context has cyclomatic complexity 50 (threshold 15). Of this number, 48 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VhloDialect.readType (cyclomatic 50) · ×1
  • VhloDialect.readType (cyclomatic 50) source/mlir.js:11839 — VhloDialect.readType has cyclomatic complexity 50 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 50) · ×1
  • Graph.constructor (cyclomatic 50) source/paddle.js:296 — Graph.constructor has cyclomatic complexity 50 (threshold 15). Of this number, 48 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BuiltinDialect.readAttribute (cyclomatic 49) · ×1
  • BuiltinDialect.readAttribute (cyclomatic 49) source/mlir.js:19653 — BuiltinDialect.readAttribute has cyclomatic complexity 49 (threshold 15). Of this number, 46 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 49) · ×1
  • Graph.constructor (cyclomatic 49) source/tvm.js:74 — Graph.constructor has cyclomatic complexity 49 (threshold 15). Of this number, 44 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Execution.statement (cyclomatic 47) · ×1
  • Execution.statement (cyclomatic 47) source/python.js:22083 — Execution.statement has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.model (cyclomatic 47) · ×1
  • Graph.model (cyclomatic 47) source/coreml.js:878 — Graph.model has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Parser.parseAttribute (cyclomatic 47) · ×1
  • Parser.parseAttribute (cyclomatic 47) source/mlir.js:3735 — Parser.parseAttribute has cyclomatic complexity 47 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 47) · ×1
  • ModelFactory.match (cyclomatic 47) source/openvino.js:6 — ModelFactory.match has cyclomatic complexity 47 (threshold 15). Of this number, 24 points are the body's own statements and 23 belong to 6 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 45) · ×1
  • Node.constructor (cyclomatic 45) source/tosa.js:166 — Node.constructor 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.
D1 · Cyclomatic Complexity · Tensor.constructor (cyclomatic 44) · ×1
  • Tensor.constructor (cyclomatic 44) source/tf.js:1114 — Tensor.constructor has cyclomatic complexity 44 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Archive.open (cyclomatic 43) · ×1
  • Archive.open (cyclomatic 43) source/zip.js:14 — Archive.open has cyclomatic complexity 43 (threshold 15). Of this number, 29 points are the body's own statements and 14 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextReader._internalSubset (cyclomatic 43) · ×1
  • TextReader._internalSubset (cyclomatic 43) source/xml.js:312 — TextReader._internalSubset has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 42) · ×1
  • Graph.constructor (cyclomatic 42) source/caffe2.js:205 — Graph.constructor has cyclomatic complexity 42 (threshold 15). Of this number, 38 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VMDialect.parseOperation (cyclomatic 42) · ×1
  • VMDialect.parseOperation (cyclomatic 42) source/mlir.js:23610 — VMDialect.parseOperation 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 42) · ×1
  • Node.constructor (cyclomatic 42) source/onednn.js:94 — Node.constructor has cyclomatic complexity 42 (threshold 15). Of this number, 40 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · View.refresh (cyclomatic 41) · ×1
  • View.refresh (cyclomatic 41) REDACTED:434 — View.refresh 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. This shape REPEATS in the file: 2 other methods here (View.refresh::animateTransition, View.refresh::animateTransition::tick) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · FindSidebar._node (cyclomatic 41) · ×1
  • FindSidebar._node (cyclomatic 41) REDACTED:4962 — FindSidebar._node has cyclomatic complexity 41 (threshold 15). Of this number, 40 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Quantization.toString (cyclomatic 41) · ×1
  • Quantization.toString (cyclomatic 41) REDACTED:5275 — Quantization.toString has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BuiltinDialect.readType (cyclomatic 41) · ×1
  • BuiltinDialect.readType (cyclomatic 41) source/mlir.js:19534 — BuiltinDialect.readType has cyclomatic complexity 41 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Model.constructor (cyclomatic 41) · ×1
  • Model.constructor (cyclomatic 41) source/onnx.js:987 — Model.constructor has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Lexer.lexToken (cyclomatic 40) · ×1
  • Lexer.lexToken (cyclomatic 40) source/mlir.js:2504 — Lexer.lexToken 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 40) · ×1
  • Graph.constructor (cyclomatic 40) source/openvino.js:240 — Graph.constructor 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. This shape REPEATS in the file: one other method here (Graph.constructor::constant) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Graph.add (cyclomatic 39) · ×1
  • Graph.add (cyclomatic 39) REDACTED:1968 — Graph.add has cyclomatic complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Generator._render (cyclomatic 39) · ×1
  • Generator._render (cyclomatic 39) REDACTED:6198 — Generator._render has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Utility.dataType (cyclomatic 39) · ×1
  • Utility.dataType (cyclomatic 39) source/mlir.js:808 — Utility.dataType has cyclomatic complexity 39 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 39) · ×1
  • ModelFactory.match (cyclomatic 39) source/ncnn.js:13 — ModelFactory.match has cyclomatic complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelFactory.open (cyclomatic 38) · ×1
  • ModelFactory.open (cyclomatic 38) source/coreml.js:84 — ModelFactory.open has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 9 of the 38 points are its own statements and the rest belongs to 5 function items inside it that branch (openBinary::walkModel, openBinary, openBinary::walkProgram, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Container.read (cyclomatic 38) · ×1
  • Container.read (cyclomatic 38) source/om.js:355 — Container.read has cyclomatic complexity 38 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · BinaryReader.value (cyclomatic 37) · ×1
  • BinaryReader.value (cyclomatic 37) source/python.js:5262 — BinaryReader.value has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Reader.read (cyclomatic 37) · ×1
  • Reader.read (cyclomatic 37) source/espresso.js:243 — Reader.read has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 36) · ×1
  • Node.constructor (cyclomatic 36) source/caffe2.js:353 — Node.constructor has cyclomatic complexity 36 (threshold 15). Of this number, 22 points are the body's own statements and 14 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · View.start (cyclomatic 36) · ×1
  • View.start (cyclomatic 36) REDACTED:35 — View.start has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 15 of the 36 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 69, 64, 59, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · NodeSidebar.render (cyclomatic 36) · ×1
  • NodeSidebar.render (cyclomatic 36) REDACTED:3679 — NodeSidebar.render has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Parser.parseNonFunctionType (cyclomatic 36) · ×1
  • Parser.parseNonFunctionType (cyclomatic 36) source/mlir.js:3492 — Parser.parseNonFunctionType has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 36) · ×1
  • ModelFactory.match (cyclomatic 36) source/transformers.js:9 — ModelFactory.match has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VhloDialect.readAttribute (cyclomatic 35) · ×1
  • VhloDialect.readAttribute (cyclomatic 35) source/mlir.js:11956 — VhloDialect.readAttribute has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ArgumentView.constructor (cyclomatic 34) · ×1
  • ArgumentView.constructor (cyclomatic 34) REDACTED:3878 — ArgumentView.constructor has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DocumentationSidebar.render (cyclomatic 34) · ×1
  • DocumentationSidebar.render (cyclomatic 34) REDACTED:4752 — DocumentationSidebar.render has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BytecodeReader.parseAttributeDict (cyclomatic 34) · ×1
  • BytecodeReader.parseAttributeDict (cyclomatic 34) source/mlir.js:7966 — BytecodeReader.parseAttributeDict 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 34) · ×1
  • Node.constructor (cyclomatic 34) source/mnn.js:142 — Node.constructor has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsonReader._attribute (cyclomatic 34) · ×1
  • JsonReader._attribute (cyclomatic 34) source/onnx.js:1990 — JsonReader._attribute has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · IR.op (cyclomatic 34) · ×1
  • IR.op (cyclomatic 34) source/paddle.js:1014 — IR.op has cyclomatic complexity 34 (threshold 15). Of this number, 19 points are the body's own statements and 15 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Experimental.decodeJson (cyclomatic 34) · ×1
  • Experimental.decodeJson (cyclomatic 34) source/tf-proto.js:9091 — Experimental.decodeJson 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. This is NOT this file's highest cyclomatic complexity: RewriterConfig.decode (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 33) · ×1
  • Graph.constructor (cyclomatic 33) source/cntk.js:119 — Graph.constructor has cyclomatic complexity 33 (threshold 15). Of this number, 27 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 33) · ×1
  • ModelFactory.match (cyclomatic 33) source/coreml.js:8 — ModelFactory.match has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Graph.layout (cyclomatic 33) · ×1
  • Graph.layout (cyclomatic 33) source/grapher.js:224 — Graph.layout has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Datatype.type (cyclomatic 33) · ×1
  • Datatype.type (cyclomatic 33) source/hdf5.js:1096 — Datatype.type has cyclomatic complexity 33 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · KrnlDialect.parseOperation (cyclomatic 33) · ×1
  • KrnlDialect.parseOperation (cyclomatic 33) source/mlir.js:16526 — KrnlDialect.parseOperation has cyclomatic complexity 33 (threshold 15). Of this number, 26 points are the body's own statements and 7 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TFRTDialect.parseOperation (cyclomatic 33) · ×1
  • TFRTDialect.parseOperation (cyclomatic 33) source/mlir.js:24415 — TFRTDialect.parseOperation has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactory.open (cyclomatic 32) · ×1
  • ModelFactory.open (cyclomatic 32) source/caffe2.js:58 — ModelFactory.open has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Graph.node · ×1
  • Graph.node::weights (cyclomatic 32) source/coreml.js:715 — Graph.node::weights 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. This shape REPEATS in the file: one other method here (Graph.node) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Tensor.constructor (cyclomatic 32) · ×1
  • Tensor.constructor (cyclomatic 32) source/mlir.js:662 — Tensor.constructor has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PXADialect.parseOperation (cyclomatic 32) · ×1
  • PXADialect.parseOperation (cyclomatic 32) source/mlir.js:24733 — PXADialect.parseOperation has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · XlaDialect.parseOperation (cyclomatic 32) · ×1
  • XlaDialect.parseOperation (cyclomatic 32) source/mlir.js:28680 — XlaDialect.parseOperation 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 32) · ×1
  • ModelFactory.match (cyclomatic 32) source/keras.js:10 — ModelFactory.match has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Host.start (cyclomatic 31) · ×1
  • Host.start (cyclomatic 31) REDACTED:147 — Host.start has cyclomatic complexity 31 (threshold 15). Of this number, 23 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BinaryReader._readBson (cyclomatic 31) · ×1
  • BinaryReader._readBson (cyclomatic 31) source/json.js:436 — BinaryReader._readBson has cyclomatic complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Container.read (cyclomatic 31) · ×1
  • Container.read (cyclomatic 31) source/dlc.js:306 — Container.read has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OpenMPDialect.parseBlockArgRegion (cyclomatic 31) · ×1
  • OpenMPDialect.parseBlockArgRegion (cyclomatic 31) source/mlir.js:21908 — OpenMPDialect.parseBlockArgRegion has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 31) · ×1
  • Graph.constructor (cyclomatic 31) source/tf.js:726 — Graph.constructor has cyclomatic complexity 31 (threshold 15). Of this number, 24 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · package.update (cyclomatic 30) · ×1
  • package.update (cyclomatic 30) REDACTED:562 — package.update has cyclomatic complexity 30 (threshold 15). Of this number, 17 points are the body's own statements and 13 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.program (cyclomatic 30) · ×1
  • Graph.program (cyclomatic 30) source/coreml.js:1238 — Graph.program has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: one other method here (Graph.program::convertValue) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Utf8.decode (cyclomatic 30) · ×1
  • Utf8.decode (cyclomatic 30) source/text.js:103 — Utf8.decode has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 30) · ×1
  • Node.constructor (cyclomatic 30) REDACTED:2779 — Node.constructor has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TensorSidebar.render (cyclomatic 30) · ×1
  • TensorSidebar.render (cyclomatic 30) REDACTED:4508 — TensorSidebar.render has cyclomatic complexity 30 (threshold 15). Of this number, 25 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 30) · ×1
  • Graph.constructor (cyclomatic 30) source/mindir.js:58 — Graph.constructor has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.program · ×1
  • Graph.program::convertValue (cyclomatic 29) source/coreml.js:1246 — Graph.program::convertValue has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (Graph.program) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · TextReader.read (cyclomatic 29) · ×1
  • TextReader.read (cyclomatic 29) source/json.js:66 — TextReader.read has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Menu.constructor (cyclomatic 29) · ×1
  • Menu.constructor (cyclomatic 29) REDACTED:1256 — Menu.constructor has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 10 of the 29 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1274, 1294, 1316, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · SerializedModel.constructor (cyclomatic 29) · ×1
  • SerializedModel.constructor (cyclomatic 29) source/pytorch.js:2286 — SerializedModel.constructor has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 29) · ×1
  • Node.constructor (cyclomatic 29) source/hailo.js:133 — Node.constructor has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Model.constructor (cyclomatic 29) · ×1
  • Model.constructor (cyclomatic 29) source/mlir.js:91 — Model.constructor has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to 3 function items inside it that branch (collectModules, formatPrefix, isFunc). 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Lexer.lexBareIdentifierOrKeyword (cyclomatic 29) · ×1
  • Lexer.lexBareIdentifierOrKeyword (cyclomatic 29) source/mlir.js:2749 — Lexer.lexBareIdentifierOrKeyword has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Reader.read (cyclomatic 29) · ×1
  • Reader.read (cyclomatic 29) source/tengine.js:254 — Reader.read has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LayerResourceReader.constructor (cyclomatic 29) · ×1
  • LayerResourceReader.constructor (cyclomatic 29) source/tnn.js:478 — LayerResourceReader.constructor has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ValueView.constructor (cyclomatic 28) · ×1
  • ValueView.constructor (cyclomatic 28) REDACTED:4059 — ValueView.constructor has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Tensor.metrics (cyclomatic 28) · ×1
  • Tensor.metrics (cyclomatic 28) REDACTED:6655 — Tensor.metrics has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExportedProgram.read (cyclomatic 28) · ×1
  • ExportedProgram.read (cyclomatic 28) source/pytorch.js:1576 — ExportedProgram.read has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OperationParser.parseRegion (cyclomatic 28) · ×1
  • OperationParser.parseRegion (cyclomatic 28) source/mlir.js:5363 — OperationParser.parseRegion has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · FlowDialect.parseShapedFunctionType (cyclomatic 28) · ×1
  • FlowDialect.parseShapedFunctionType (cyclomatic 28) source/mlir.js:14972 — FlowDialect.parseShapedFunctionType has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TFLDialect.parseOperation (cyclomatic 28) · ×1
  • TFLDialect.parseOperation (cyclomatic 28) source/mlir.js:25391 — TFLDialect.parseOperation has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 28) · ×1
  • Graph.constructor (cyclomatic 28) source/ncnn.js:200 — Graph.constructor has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Model.constructor (cyclomatic 28) · ×1
  • Model.constructor (cyclomatic 28) source/onnx.js:49 — Model.constructor has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelFactory.open (cyclomatic 27) · ×1
  • ModelFactory.open (cyclomatic 27) source/caffe.js:26 — ModelFactory.open has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 5 function items inside it that branch (openNetParameterText, a function literal at line 37, a function literal at line 55, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · DialectReader.readAPFloatWithKnownSemantics (cyclomatic 27) · ×1
  • DialectReader.readAPFloatWithKnownSemantics (cyclomatic 27) source/mlir.js:6882 — DialectReader.readAPFloatWithKnownSemantics has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · BytecodeReader.parseOpWithoutRegions (cyclomatic 27) · ×1
  • BytecodeReader.parseOpWithoutRegions (cyclomatic 27) source/mlir.js:7857 — BytecodeReader.parseOpWithoutRegions has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TextReader.open (cyclomatic 26) · ×1
  • TextReader.open (cyclomatic 26) source/json.js:9 — TextReader.open has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Menu.register (cyclomatic 26) · ×1
  • Menu.register (cyclomatic 26) REDACTED:1420 — Menu.register has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Context.graph (cyclomatic 26) · ×1
  • Context.graph (cyclomatic 26) source/pytorch.js:1061 — Context.graph has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TorchDialect.parseOperation (cyclomatic 26) · ×1
  • TorchDialect.parseOperation (cyclomatic 26) source/mlir.js:13314 — TorchDialect.parseOperation 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Context.createAttribute (cyclomatic 26) · ×1
  • Context.createAttribute (cyclomatic 26) source/onnx.js:830 — Context.createAttribute has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 26) · ×1
  • Graph.constructor (cyclomatic 26) source/onnx.js:1164 — Graph.constructor has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelFactory.open (cyclomatic 26) · ×1
  • ModelFactory.open (cyclomatic 26) source/openvino.js:102 — ModelFactory.open has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 181, child, edges, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: TensorType.constructor (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 25) · ×1
  • ModelFactory.match (cyclomatic 25) source/caffe2.js:6 — ModelFactory.match has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Datatype.read (cyclomatic 25) · ×1
  • Datatype.read (cyclomatic 25) source/hdf5.js:1162 — Datatype.read has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ValueView.expand (cyclomatic 25) · ×1
  • ValueView.expand (cyclomatic 25) REDACTED:4122 — ValueView.expand has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TargetSidebar.render (cyclomatic 25) · ×1
  • TargetSidebar.render (cyclomatic 25) REDACTED:4669 — TargetSidebar.render has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FindSidebar.render (cyclomatic 25) · ×1
  • FindSidebar.render (cyclomatic 25) REDACTED:5108 — FindSidebar.render has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 5158, 5129, 5206, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 25) · ×1
  • Graph.constructor (cyclomatic 25) source/dl4j.js:65 — Graph.constructor has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 25) · ×1
  • Node.constructor (cyclomatic 25) source/dnn.js:126 — Node.constructor has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Tensor.constructor (cyclomatic 25) · ×1
  • Tensor.constructor (cyclomatic 25) source/pytorch.js:880 — Tensor.constructor has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Lexer.lexPrefixedIdentifier (cyclomatic 25) · ×1
  • Lexer.lexPrefixedIdentifier (cyclomatic 25) source/mlir.js:2785 — Lexer.lexPrefixedIdentifier has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TensorLiteralParser.getAttr · ×1
  • TensorLiteralParser.getAttr::convertElement (cyclomatic 25) source/mlir.js:6510 — TensorLiteralParser.getAttr::convertElement has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (TensorLiteralParser.getAttr) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Dialect.parseOperation (cyclomatic 25) · ×1
  • Dialect.parseOperation (cyclomatic 25) source/mlir.js:10563 — Dialect.parseOperation has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TestDialect.inferResultTypes (cyclomatic 25) · ×1
  • TestDialect.inferResultTypes (cyclomatic 25) source/mlir.js:26483 — TestDialect.inferResultTypes has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Pickle.constructor (cyclomatic 25) · ×1
  • Pickle.constructor (cyclomatic 25) source/paddle.js:697 — Pickle.constructor has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 2 function items inside it that branch (filter, entries). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · _parseAttribute (cyclomatic 25) · ×1
  • _parseAttribute (cyclomatic 25) source/onnx.js:2269 — _parseAttribute has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Telemetry.start (cyclomatic 24) · ×1
  • Telemetry.start (cyclomatic 24) source/base.js:1371 — Telemetry.start has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.updateTunnels · ×1
  • Graph.updateTunnels::findTarget (cyclomatic 24) REDACTED:2205 — Graph.updateTunnels::findTarget 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. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactoryService.open (cyclomatic 24) · ×1
  • ModelFactoryService.open (cyclomatic 24) REDACTED:7335 — ModelFactoryService.open has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 24) · ×1
  • ModelFactory.match (cyclomatic 24) source/mlir.js:12 — ModelFactory.match has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Dialect.getOperation (cyclomatic 24) · ×1
  • Dialect.getOperation (cyclomatic 24) source/mlir.js:9096 — Dialect.getOperation 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OpenMPDialect.parseLoopNestOp (cyclomatic 24) · ×1
  • OpenMPDialect.parseLoopNestOp (cyclomatic 24) source/mlir.js:21487 — OpenMPDialect.parseLoopNestOp 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OpenMPDialect.parseBlockArgClause (cyclomatic 24) · ×1
  • OpenMPDialect.parseBlockArgClause (cyclomatic 24) source/mlir.js:21804 — OpenMPDialect.parseBlockArgClause 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · LLVMDialect.parseLLVMInvokeOp (cyclomatic 24) · ×1
  • LLVMDialect.parseLLVMInvokeOp (cyclomatic 24) source/mlir.js:23181 — LLVMDialect.parseLLVMInvokeOp 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Object.constructor (cyclomatic 24) · ×1
  • Object.constructor (cyclomatic 24) source/mediapipe.js:207 — Object.constructor has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 24) · ×1
  • Graph.constructor (cyclomatic 24) source/onednn.js:32 — Graph.constructor has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Graph.push (cyclomatic 24) · ×1
  • Graph.push (cyclomatic 24) source/onnx.js:1284 — Graph.push has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 1297). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Tensor.constructor (cyclomatic 24) · ×1
  • Tensor.constructor (cyclomatic 24) source/pickle.js:196 — Tensor.constructor has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · open (cyclomatic 24) · ×1
  • open (cyclomatic 24) source/protobuf.js:650 — open has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextReader._number (cyclomatic 23) · ×1
  • TextReader._number (cyclomatic 23) source/json.js:260 — TextReader._number has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · View.export (cyclomatic 23) · ×1
  • View.export (cyclomatic 23) REDACTED:950 — View.export has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (applyStyleSheet, a function literal at line 1017, a function literal at line 1013). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Value.build (cyclomatic 23) · ×1
  • Value.build (cyclomatic 23) REDACTED:3199 — Value.build has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Context.tags (cyclomatic 23) · ×1
  • Context.tags (cyclomatic 23) REDACTED:7106 — Context.tags has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Context.constructor (cyclomatic 23) · ×1
  • Context.constructor (cyclomatic 23) source/espdl.js:341 — Context.constructor has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Lexer.lexNumber (cyclomatic 23) · ×1
  • Lexer.lexNumber (cyclomatic 23) source/mlir.js:2660 — Lexer.lexNumber 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. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Constraint._parseEnum (cyclomatic 23) · ×1
  • Constraint._parseEnum (cyclomatic 23) source/mlir.js:8222 — Constraint._parseEnum has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PCFDialect.parseParallelExecutionBody (cyclomatic 23) · ×1
  • PCFDialect.parseParallelExecutionBody (cyclomatic 23) source/mlir.js:15866 — PCFDialect.parseParallelExecutionBody has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SparseTensorDialect.parseCoIterateOp (cyclomatic 23) · ×1
  • SparseTensorDialect.parseCoIterateOp (cyclomatic 23) source/mlir.js:20406 — SparseTensorDialect.parseCoIterateOp has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 23) · ×1
  • Node.constructor (cyclomatic 23) source/mediapipe.js:116 — Node.constructor has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelDef.constructor (cyclomatic 23) · ×1
  • ModelDef.constructor (cyclomatic 23) source/om.js:536 — ModelDef.constructor has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: OpDef.constructor (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TensorProto.decodeJson (cyclomatic 23) · ×1
  • TensorProto.decodeJson (cyclomatic 23) source/tf-proto.js:1901 — TensorProto.decodeJson has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: RewriterConfig.decode (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TensorBundle.constructor (cyclomatic 23) · ×1
  • TensorBundle.constructor (cyclomatic 23) source/tf.js:1336 — TensorBundle.constructor has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelFactory.open (cyclomatic 23) · ×1
  • ModelFactory.open (cyclomatic 23) source/tosa.js:18 — ModelFactory.open has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Host.view (cyclomatic 22) · ×1
  • Host.view (cyclomatic 22) REDACTED:55 — Host.view has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 5 function items inside it that branch (consent, telemetry, a function literal at line 95, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Graph.node (cyclomatic 22) · ×1
  • Graph.node (cyclomatic 22) source/coreml.js:655 — Graph.node has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Graph.node::weights) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Graph.addTunnels · ×1
  • Graph.addTunnels::subgraphOuterRefs (cyclomatic 22) REDACTED:2076 — Graph.addTunnels::subgraphOuterRefs has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Graph.scrollTo (cyclomatic 22) · ×1
  • Graph.scrollTo (cyclomatic 22) REDACTED:2701 — Graph.scrollTo has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TargetSelector.update (cyclomatic 22) · ×1
  • TargetSelector.update (cyclomatic 22) REDACTED:3556 — TargetSelector.update has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Target.metrics (cyclomatic 22) · ×1
  • Target.metrics (cyclomatic 22) REDACTED:6606 — Target.metrics has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Container._params4 (cyclomatic 22) · ×1
  • Container._params4 (cyclomatic 22) source/dlc.js:571 — Container._params4 has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Context.build (cyclomatic 22) · ×1
  • Context.build (cyclomatic 22) source/gguf.js:1170 — Context.build has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Context.build::resolveBlock) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · AffineBinaryOpExpr.printAffineExprInternal (cyclomatic 22) · ×1
  • AffineBinaryOpExpr.printAffineExprInternal (cyclomatic 22) source/mlir.js:1421 — AffineBinaryOpExpr.printAffineExprInternal has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TensorLiteralParser.getAttr (cyclomatic 22) · ×1
  • TensorLiteralParser.getAttr (cyclomatic 22) source/mlir.js:6485 — TensorLiteralParser.getAttr has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (TensorLiteralParser.getAttr::convertElement) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · BytecodeReader.parseRegions (cyclomatic 22) · ×1
  • BytecodeReader.parseRegions (cyclomatic 22) source/mlir.js:7684 — BytecodeReader.parseRegions has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Constraint._parseGeneric (cyclomatic 22) · ×1
  • Constraint._parseGeneric (cyclomatic 22) source/mlir.js:8277 — Constraint._parseGeneric has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · GpuDialect.parseOperation (cyclomatic 22) · ×1
  • GpuDialect.parseOperation (cyclomatic 22) source/mlir.js:20608 — GpuDialect.parseOperation has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · NVVMDialect.parseMmaProperties (cyclomatic 22) · ×1
  • NVVMDialect.parseMmaProperties (cyclomatic 22) source/mlir.js:21211 — NVVMDialect.parseMmaProperties has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Utility.weights · ×1
  • Utility.weights::dict (cyclomatic 22) source/numpy.js:173 — Utility.weights::dict has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AttributeProto.decodeJson (cyclomatic 22) · ×1
  • AttributeProto.decodeJson (cyclomatic 22) source/onnx-proto.js:170 — AttributeProto.decodeJson has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextReader._parseAttributeValue (cyclomatic 22) · ×1
  • TextReader._parseAttributeValue (cyclomatic 22) source/onnx.js:2340 — TextReader._parseAttributeValue has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · inflateRaw (cyclomatic 22) · ×1
  • inflateRaw (cyclomatic 22) source/zip.js:267 — inflateRaw has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 21) · ×1
  • Graph.constructor (cyclomatic 21) source/armnn.js:68 — Graph.constructor has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BinaryReader.open (cyclomatic 21) · ×1
  • BinaryReader.open (cyclomatic 21) source/flatbuffers.js:6 — BinaryReader.open has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Configuration.read (cyclomatic 21) · ×1
  • Configuration.read (cyclomatic 21) source/darknet.js:924 — Configuration.read has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Context.constructor (cyclomatic 21) · ×1
  • Context.constructor (cyclomatic 21) source/gguf.js:1050 — Context.constructor has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (registerSection, a function literal at line 1112). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · DenseArrayAttr.value (cyclomatic 21) · ×1
  • DenseArrayAttr.value (cyclomatic 21) source/mlir.js:1730 — DenseArrayAttr.value has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Parser.parseDialectSymbolBody (cyclomatic 21) · ×1
  • Parser.parseDialectSymbolBody (cyclomatic 21) source/mlir.js:4275 — Parser.parseDialectSymbolBody 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · HLODialect.parseReduceOp (cyclomatic 21) · ×1
  • HLODialect.parseReduceOp (cyclomatic 21) source/mlir.js:11499 — HLODialect.parseReduceOp has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TextReader._parseLiteral (cyclomatic 21) · ×1
  • TextReader._parseLiteral (cyclomatic 21) source/onnx.js:2597 — TextReader._parseLiteral has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _parseTensor (cyclomatic 21) · ×1
  • _parseTensor (cyclomatic 21) source/onnx.js:2465 — _parseTensor has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Utility.featureType (cyclomatic 20) · ×1
  • Utility.featureType (cyclomatic 20) source/coreml.js:1455 — Utility.featureType has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TextReader._processingInstruction (cyclomatic 20) · ×1
  • TextReader._processingInstruction (cyclomatic 20) source/xml.js:944 — TextReader._processingInstruction has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextReader._next (cyclomatic 20) · ×1
  • TextReader._next (cyclomatic 20) source/xml.js:1084 — TextReader._next has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Datatype.constructor (cyclomatic 20) · ×1
  • Datatype.constructor (cyclomatic 20) source/hdf5.js:994 — Datatype.constructor has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · BinaryReader.decode · ×1
  • BinaryReader.decode::decodeMessage (cyclomatic 20) source/protobuf.js:60 — BinaryReader.decode::decodeMessage has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (BinaryReader.decode) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Menu._update (cyclomatic 20) · ×1
  • Menu._update (cyclomatic 20) REDACTED:1618 — Menu._update has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Lexer.lexString (cyclomatic 20) · ×1
  • Lexer.lexString (cyclomatic 20) source/mlir.js:2702 — Lexer.lexString has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Constraint.parseListArgument (cyclomatic 20) · ×1
  • Constraint.parseListArgument (cyclomatic 20) source/mlir.js:8368 — Constraint.parseListArgument has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 20) · ×1
  • Node.constructor (cyclomatic 20) source/lasagne.js:98 — Node.constructor has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Model.constructor (cyclomatic 20) · ×1
  • Model.constructor (cyclomatic 20) source/rknn.js:56 — Model.constructor has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: Tensor.constructor (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ConfigProto.decodeJson (cyclomatic 20) · ×1
  • ConfigProto.decodeJson (cyclomatic 20) source/tf-proto.js:8791 — ConfigProto.decodeJson 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. This is NOT this file's highest cyclomatic complexity: RewriterConfig.decode (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 20) · ×1
  • ModelFactory.match (cyclomatic 20) source/uff.js:6 — ModelFactory.match has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _Graph.to_json (cyclomatic 20) · ×1
  • _Graph.to_json (cyclomatic 20) source/pytorch.py:58 — _Graph.to_json has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _Graph._argument_type (cyclomatic 20) · ×1
  • _Graph._argument_type (cyclomatic 20) source/pytorch.py:245 — _Graph._argument_type has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Execution.import (cyclomatic 19) · ×1
  • Execution.import (cyclomatic 19) source/python.js:21843 — Execution.import 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: Execution.constructor::arg_type (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Archive.constructor (cyclomatic 19) · ×1
  • Archive.constructor (cyclomatic 19) source/zip.js:139 — Archive.constructor has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · View.open (cyclomatic 19) · ×1
  • View.open (cyclomatic 19) REDACTED:726 — View.open has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Container._model3 (cyclomatic 19) · ×1
  • Container._model3 (cyclomatic 19) source/dlc.js:378 — Container._model3 has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (updateAttribute). 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: Container._model4::dataType (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · data_pkl.open (cyclomatic 19) · ×1
  • data_pkl.open (cyclomatic 19) source/pytorch.js:1219 — data_pkl.open 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: Utility.toType (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OperationParser.parseOperation (cyclomatic 19) · ×1
  • OperationParser.parseOperation (cyclomatic 19) source/mlir.js:5023 — OperationParser.parseOperation has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OperationParser.parseBlock (cyclomatic 19) · ×1
  • OperationParser.parseBlock (cyclomatic 19) source/mlir.js:5319 — OperationParser.parseBlock 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Dialect.parsePropertiesFromKeyValueList (cyclomatic 19) · ×1
  • Dialect.parsePropertiesFromKeyValueList (cyclomatic 19) source/mlir.js:9602 — Dialect.parsePropertiesFromKeyValueList 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Dialect.parseDynamicIndexList (cyclomatic 19) · ×1
  • Dialect.parseDynamicIndexList (cyclomatic 19) source/mlir.js:10740 — Dialect.parseDynamicIndexList has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · VectorDialect.parseOperation (cyclomatic 19) · ×1
  • VectorDialect.parseOperation (cyclomatic 19) source/mlir.js:12708 — VectorDialect.parseOperation 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · LinalgDialect.parseCommonStructuredOpParts (cyclomatic 19) · ×1
  • LinalgDialect.parseCommonStructuredOpParts (cyclomatic 19) source/mlir.js:16164 — LinalgDialect.parseCommonStructuredOpParts 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · LLVMDialect.getInsertExtractValueElementType (cyclomatic 19) · ×1
  • LLVMDialect.getInsertExtractValueElementType (cyclomatic 19) source/mlir.js:22500 — LLVMDialect.getInsertExtractValueElementType 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · LLVMDialect.parseLLVMLoadOp (cyclomatic 19) · ×1
  • LLVMDialect.parseLLVMLoadOp (cyclomatic 19) source/mlir.js:22757 — LLVMDialect.parseLLVMLoadOp 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · XlaGpuDialect.parseOperation (cyclomatic 19) · ×1
  • XlaGpuDialect.parseOperation (cyclomatic 19) source/mlir.js:28814 — XlaGpuDialect.parseOperation 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 19) · ×1
  • Node.constructor (cyclomatic 19) source/mslite.js:110 — Node.constructor has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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: TensorType.constructor (cyclomatic 45) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TensorProto.decodeJson (cyclomatic 19) · ×1
  • TensorProto.decodeJson (cyclomatic 19) source/onnx-proto.js:1519 — TensorProto.decodeJson has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: AttributeProto.decode (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 19) · ×1
  • ModelFactory.match (cyclomatic 19) source/paddle.js:11 — ModelFactory.match has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IR.getType (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · IR.getAttr (cyclomatic 19) · ×1
  • IR.getAttr (cyclomatic 19) source/paddle.js:1282 — IR.getAttr has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: IR.getType (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Experimental.decodeJson (cyclomatic 19) · ×1
  • Experimental.decodeJson (cyclomatic 19) source/tf-proto.js:8073 — Experimental.decodeJson has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: RewriterConfig.decode (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · content (cyclomatic 19) · ×1
  • content (cyclomatic 19) REDACTED:4252 — content has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Execution.call (cyclomatic 18) · ×1
  • Execution.call (cyclomatic 18) source/python.js:22010 — Execution.call 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: Execution.constructor::arg_type (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Variable.data (cyclomatic 18) · ×1
  • Variable.data (cyclomatic 18) source/hdf5.js:218 — Variable.data 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: DataObjectHeader._readMessage (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · BinaryReader.decode (cyclomatic 18) · ×1
  • BinaryReader.decode (cyclomatic 18) source/protobuf.js:56 — BinaryReader.decode has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (BinaryReader.decode::decodeMessage) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · PrimitiveView.constructor (cyclomatic 18) · ×1
  • PrimitiveView.constructor (cyclomatic 18) REDACTED:3951 — PrimitiveView.constructor 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: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · FindSidebar._value (cyclomatic 18) · ×1
  • FindSidebar._value (cyclomatic 18) REDACTED:4920 — FindSidebar._value has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Context.read (cyclomatic 18) · ×1
  • Context.read (cyclomatic 18) REDACTED:7028 — Context.read 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: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelFactoryService._openEntries (cyclomatic 18) · ×1
  • ModelFactoryService._openEntries (cyclomatic 18) REDACTED:7754 — ModelFactoryService._openEntries has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (filter, a function literal at line 7764, rootFolder::rotate, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Parser._parseBlock (cyclomatic 18) · ×1
  • Parser._parseBlock (cyclomatic 18) source/dot.js:338 — Parser._parseBlock has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Reader.read (cyclomatic 18) · ×1
  • Reader.read (cyclomatic 18) source/executorch.js:395 — Reader.read 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. This is NOT this file's highest cyclomatic complexity: TensorType.constructor (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Constraint.tokenize (cyclomatic 18) · ×1
  • Constraint.tokenize (cyclomatic 18) source/mlir.js:8104 — Constraint.tokenize 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Constraint.parseTokens (cyclomatic 18) · ×1
  • Constraint.parseTokens (cyclomatic 18) source/mlir.js:8161 — Constraint.parseTokens 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · AffineDialect.parseOperation (cyclomatic 18) · ×1
  • AffineDialect.parseOperation (cyclomatic 18) source/mlir.js:12092 — AffineDialect.parseOperation 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SPIRVDialect.parseSwitchOpCases (cyclomatic 18) · ×1
  • SPIRVDialect.parseSwitchOpCases (cyclomatic 18) source/mlir.js:17828 — SPIRVDialect.parseSwitchOpCases has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (CFDialect.parseSwitchOpCases) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · CFDialect.parseSwitchOpCases (cyclomatic 18) · ×1
  • CFDialect.parseSwitchOpCases (cyclomatic 18) source/mlir.js:18765 — CFDialect.parseSwitchOpCases has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (SPIRVDialect.parseSwitchOpCases) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · BufferizationDialect.parseOperation (cyclomatic 18) · ×1
  • BufferizationDialect.parseOperation (cyclomatic 18) source/mlir.js:19856 — BufferizationDialect.parseOperation 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · NVVMDialect.parseOperation (cyclomatic 18) · ×1
  • NVVMDialect.parseOperation (cyclomatic 18) source/mlir.js:21100 — NVVMDialect.parseOperation 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TFRTTestDialect.parseOperation (cyclomatic 18) · ×1
  • TFRTTestDialect.parseOperation (cyclomatic 18) source/mlir.js:27458 — TFRTTestDialect.parseOperation 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Context.createType (cyclomatic 18) · ×1
  • Context.createType (cyclomatic 18) source/onnx.js:925 — Context.createType has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TensorProto.decodeJson (cyclomatic 18) · ×1
  • TensorProto.decodeJson (cyclomatic 18) source/pytorch-proto.js:222 — TensorProto.decodeJson has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · StructuredValue.decodeJson (cyclomatic 18) · ×1
  • StructuredValue.decodeJson (cyclomatic 18) source/tf-proto.js:4884 — StructuredValue.decodeJson 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: RewriterConfig.decode (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · NodeExecStats.decodeJson (cyclomatic 18) · ×1
  • NodeExecStats.decodeJson (cyclomatic 18) source/tf-proto.js:11090 — NodeExecStats.decodeJson 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: RewriterConfig.decode (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Tensor._stringify (cyclomatic 17) · ×1
  • Tensor._stringify (cyclomatic 17) source/base.js:1251 — Tensor._stringify has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Host.constructor (cyclomatic 17) · ×1
  • Host.constructor (cyclomatic 17) REDACTED:8 — Host.constructor has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Context.constructor (cyclomatic 17) · ×1
  • Context.constructor (cyclomatic 17) source/coreml.js:532 — Context.constructor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Graph.updateClassifierOutput (cyclomatic 17) · ×1
  • Graph.updateClassifierOutput (cyclomatic 17) source/coreml.js:1158 — Graph.updateClassifierOutput has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Formatter.tensor (cyclomatic 17) · ×1
  • Formatter.tensor (cyclomatic 17) REDACTED:5651 — Formatter.tensor has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Container._model4 (cyclomatic 17) · ×1
  • Container._model4 (cyclomatic 17) source/dlc.js:426 — Container._model4 has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Container._model4::dataType (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TensorType.constructor (cyclomatic 17) · ×1
  • TensorType.constructor (cyclomatic 17) source/espdl.js:239 — TensorType.constructor has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Utility.unpack (cyclomatic 17) · ×1
  • Utility.unpack (cyclomatic 17) source/pytorch.js:2061 — Utility.unpack has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Utility.toType (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Constraint.parseArgumentTokens (cyclomatic 17) · ×1
  • Constraint.parseArgumentTokens (cyclomatic 17) source/mlir.js:8335 — Constraint.parseArgumentTokens has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · UtilDialect.parseUtilFuncOp (cyclomatic 17) · ×1
  • UtilDialect.parseUtilFuncOp (cyclomatic 17) source/mlir.js:14585 — UtilDialect.parseUtilFuncOp has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SparseTensorDialect.parseIterateOp (cyclomatic 17) · ×1
  • SparseTensorDialect.parseIterateOp (cyclomatic 17) source/mlir.js:20338 — SparseTensorDialect.parseIterateOp has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TransformDialect.parsePackedOrDynamicIndexList (cyclomatic 17) · ×1
  • TransformDialect.parsePackedOrDynamicIndexList (cyclomatic 17) source/mlir.js:25748 — TransformDialect.parsePackedOrDynamicIndexList has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Node.constructor (cyclomatic 17) · ×1
  • Node.constructor (cyclomatic 17) source/nnabla.js:201 — Node.constructor has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Graph.constructor (cyclomatic 17) · ×1
  • Graph.constructor (cyclomatic 17) source/onnx.js:163 — Graph.constructor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Container.signature (cyclomatic 17) · ×1
  • Container.signature (cyclomatic 17) source/rknn.js:557 — Container.signature has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Tensor.constructor (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SavedObject.decodeJson (cyclomatic 17) · ×1
  • SavedObject.decodeJson (cyclomatic 17) source/tf-proto.js:3740 — SavedObject.decodeJson has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: RewriterConfig.decode (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Node.decodeJson (cyclomatic 17) · ×1
  • Node.decodeJson (cyclomatic 17) source/tf-proto.js:10379 — Node.decodeJson has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: RewriterConfig.decode (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TextProtoReader.read (cyclomatic 17) · ×1
  • TextProtoReader.read (cyclomatic 17) source/tnn.js:385 — TextProtoReader.read has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _parseModel (cyclomatic 17) · ×1
  • _parseModel (cyclomatic 17) source/onnx.js:2127 — _parseModel has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · _skipType (cyclomatic 17) · ×1
  • _skipType (cyclomatic 17) source/protobuf.js:395 — _skipType has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _add · ×1
  • _add::isObject (cyclomatic 17) REDACTED:2908 — _add::isObject has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dagre.dagre.layout (cyclomatic 16) · ×1
  • dagre.dagre.layout (cyclomatic 16) source/dagre.js:8 — dagre.dagre.layout has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (dagre.dagre.layout::order, dagre.dagre.layout::order::buildLayerGraph, dagre.dagre.layout::position, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Graph.build (cyclomatic 16) · ×1
  • Graph.build (cyclomatic 16) source/grapher.js:106 — Graph.build has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DataObjectHeader.constructor (cyclomatic 16) · ×1
  • DataObjectHeader.constructor (cyclomatic 16) source/hdf5.js:730 — DataObjectHeader.constructor has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DataObjectHeader._readMessage (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · BinaryReader._uint32 (cyclomatic 16) · ×1
  • BinaryReader._uint32 (cyclomatic 16) source/protobuf.js:237 — BinaryReader._uint32 has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · View._updatePath (cyclomatic 16) · ×1
  • View._updatePath (cyclomatic 16) REDACTED:816 — View._updatePath has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ModelSidebar.render (cyclomatic 16) · ×1
  • ModelSidebar.render (cyclomatic 16) REDACTED:4610 — ModelSidebar.render has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: TensorView.export (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Host.start (cyclomatic 16) · ×1
  • Host.start (cyclomatic 16) source/desktop.mjs:157 — Host.start 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 3 function literals inside it that branch (lines 229, 187, 260). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Context.build · ×1
  • Context.build::resolveBlock (cyclomatic 16) source/gguf.js:1191 — Context.build::resolveBlock has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Context.build) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.window.addEventListener("load") (cyclomatic 16) · ×1
  • index.window.addEventListener("load") (cyclomatic 16) source/index.js:95 — index.window.addEventListener("load") has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Utility.valueType (cyclomatic 16) · ×1
  • Utility.valueType (cyclomatic 16) source/mlir.js:874 — Utility.valueType has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Parser.parseNameOrFileLineColRange (cyclomatic 16) · ×1
  • Parser.parseNameOrFileLineColRange (cyclomatic 16) source/mlir.js:3156 — Parser.parseNameOrFileLineColRange has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PropertiesSectionReader.read (cyclomatic 16) · ×1
  • PropertiesSectionReader.read (cyclomatic 16) source/mlir.js:7190 — PropertiesSectionReader.read has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · AssemblyFormatParser.parseParenList (cyclomatic 16) · ×1
  • AssemblyFormatParser.parseParenList (cyclomatic 16) source/mlir.js:8705 — AssemblyFormatParser.parseParenList has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (parseElement). 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · HLODialect.parseWindowAttributes (cyclomatic 16) · ×1
  • HLODialect.parseWindowAttributes (cyclomatic 16) source/mlir.js:11282 — HLODialect.parseWindowAttributes has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MemRefDialect.parseOperation (cyclomatic 16) · ×1
  • MemRefDialect.parseOperation (cyclomatic 16) source/mlir.js:12507 — MemRefDialect.parseOperation has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · IREEDialect.parseDispatchEntryPoints (cyclomatic 16) · ×1
  • IREEDialect.parseDispatchEntryPoints (cyclomatic 16) source/mlir.js:13474 — IREEDialect.parseDispatchEntryPoints has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · StreamDialect.parseResourceRegion (cyclomatic 16) · ×1
  • StreamDialect.parseResourceRegion (cyclomatic 16) source/mlir.js:15343 — StreamDialect.parseResourceRegion has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · LLVMDialect.parseLLVMCallOp (cyclomatic 16) · ×1
  • LLVMDialect.parseLLVMCallOp (cyclomatic 16) source/mlir.js:23056 — LLVMDialect.parseLLVMCallOp has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TFRTFallbackAsyncDialect.parseExecuteOpCommon (cyclomatic 16) · ×1
  • TFRTFallbackAsyncDialect.parseExecuteOpCommon (cyclomatic 16) source/mlir.js:24634 — TFRTFallbackAsyncDialect.parseExecuteOpCommon has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ACCDialect.parseGangClause (cyclomatic 16) · ×1
  • ACCDialect.parseGangClause (cyclomatic 16) source/mlir.js:27868 — ACCDialect.parseGangClause has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ACCDialect.parseOperation (cyclomatic 16) · ×1
  • ACCDialect.parseOperation (cyclomatic 16) source/mlir.js:28075 — ACCDialect.parseOperation has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dialect.createBuildableType (cyclomatic 199) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Model.constructor (cyclomatic 16) · ×1
  • Model.constructor (cyclomatic 16) source/sklearn.js:49 — Model.constructor has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelFactory.match (cyclomatic 16) · ×1
  • ModelFactory.match (cyclomatic 16) source/tnn.js:6 — ModelFactory.match has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · match · ×1
  • match::match (cyclomatic 16) source/coreml.js:14 — match::match has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 16) · ×1
  • (anonymous) (cyclomatic 16) source/index.js:95 — (anonymous) has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · read (cyclomatic 16) · ×1
  • read (cyclomatic 16) source/pytorch.js:1417 — read has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: toType (cyclomatic 24) 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.
D2 · Cognitive Complexity · Execution.constructor (cognitive 3595) · ×1
  • Execution.constructor (cognitive 3595) source/python.js:8 — Execution.constructor has cognitive complexity 3595 (threshold 15). Drivers by points: if/else 2213 (3282 pts), boolean chains 758, loops 412 (704 pts), ternaries 142 (226 pts), match/switch 71 (125 pts), error handling 5 (7 pts) (nesting depth added 1501). To reduce it, split the body into named stages: move each independent 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 (Execution.constructor::convertObject) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Dialect.parseDirective (cognitive 788) · ×1
  • Dialect.parseDirective (cognitive 788) source/mlir.js:9649 — Dialect.parseDirective has cognitive complexity 788 (threshold 15). Drivers by points: if/else 194 (562 pts), loops 28 (100 pts), boolean chains 72, ternaries 17 (50 pts), match/switch 3 (4 pts) (nesting depth added 474). Of this number, 723 points are the body's own statements and 65 belong to 9 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 598) · ×1
  • constructor (cognitive 598) source/pytorch.js:324 — constructor has cognitive complexity 598 (threshold 15). Drivers by points: if/else 117 (280 pts), ternaries 40 (161 pts), boolean chains 110, loops 14 (45 pts), match/switch 1 (2 pts) (nesting depth added 316). Of this number, 454 points are the body's own statements and 144 belong to 45 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SPIRVDialect.parseOperation (cognitive 407) · ×1
  • SPIRVDialect.parseOperation (cognitive 407) source/mlir.js:17902 — SPIRVDialect.parseOperation has cognitive complexity 407 (threshold 15). Drivers by points: if/else 138 (301 pts), loops 25 (81 pts), boolean chains 25 (nesting depth added 219). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Dialect.inferResultTypes (cognitive 385) · ×1
  • Dialect.inferResultTypes (cognitive 385) source/mlir.js:9360 — Dialect.inferResultTypes has cognitive complexity 385 (threshold 15). Drivers by points: if/else 59 (278 pts), loops 10 (54 pts), boolean chains 36, ternaries 2 (17 pts) (nesting depth added 278). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 359) · ×1
  • constructor (cognitive 359) source/ncnn.js:285 — constructor has cognitive complexity 359 (threshold 15). Drivers by points: if/else 67 (143 pts), boolean chains 134, ternaries 27 (64 pts), loops 5 (10 pts), match/switch 3 (8 pts) (nesting depth added 123). Of this number, 348 points are the body's own statements and 11 belong to 10 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · read (cognitive 281) · ×1
  • read (cognitive 281) source/xml.js:33 — read has cognitive complexity 281 (threshold 15). Drivers by points: if/else 41 (176 pts), ternaries 8 (35 pts), boolean chains 34, loops 8 (31 pts), match/switch 2 (5 pts) (nesting depth added 188). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 262) · ×1
  • constructor (cognitive 262) source/darknet.js:81 — constructor has cognitive complexity 262 (threshold 15). Drivers by points: if/else 50 (144 pts), ternaries 20 (70 pts), boolean chains 22, loops 8 (20 pts), match/switch 3 (6 pts) (nesting depth added 159). Of this number, 242 points are the body's own statements and 20 belong to 12 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.constructor (cognitive 256) · ×1
  • Graph.constructor (cognitive 256) source/gguf.js:95 — Graph.constructor has cognitive complexity 256 (threshold 15). Drivers by points: if/else 67 (195 pts), ternaries 20 (83 pts), boolean chains 46, loops 9 (23 pts) (nesting depth added 205). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (Graph.constructor::buildFfn) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · peek (cognitive 250) · ×1
  • peek (cognitive 250) REDACTED:6783 — peek has cognitive complexity 250 (threshold 15). Drivers by points: if/else 27 (140 pts), error handling 10 (53 pts), boolean chains 21, loops 2 (13 pts), ternaries 2 (12 pts), match/switch 2 (11 pts) (nesting depth added 186). Of this number, 224 points are the body's own statements and 26 belong to 10 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HALDialect.parseOperation (cognitive 243) · ×1
  • HALDialect.parseOperation (cognitive 243) source/mlir.js:13672 — HALDialect.parseOperation has cognitive complexity 243 (threshold 15). Drivers by points: if/else 76 (168 pts), loops 11 (37 pts), ternaries 9 (28 pts), boolean chains 10 (nesting depth added 137). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SdfgDialect.parseOperation (cognitive 230) · ×1
  • SdfgDialect.parseOperation (cognitive 230) source/mlir.js:24920 — SdfgDialect.parseOperation has cognitive complexity 230 (threshold 15). Drivers by points: if/else 88 (180 pts), loops 8 (29 pts), boolean chains 19, ternaries 1 (2 pts) (nesting depth added 114). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Graph.constructor (cognitive 222) · ×1
  • Graph.constructor (cognitive 222) source/mlir.js:181 — Graph.constructor has cognitive complexity 222 (threshold 15). Drivers by points: if/else 44 (124 pts), loops 20 (45 pts), boolean chains 37, ternaries 6 (16 pts) (nesting depth added 115). Of this number, 217 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · open (cognitive 208) · ×1
  • open (cognitive 208) source/keras.js:79 — open has cognitive complexity 208 (threshold 15). Drivers by points: if/else 53 (154 pts), loops 20 (67 pts), ternaries 22 (63 pts), boolean chains 39, error handling 2 (3 pts), match/switch 1 (nesting depth added 190). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 205) · ×1
  • constructor (cognitive 205) source/keras.js:524 — constructor has cognitive complexity 205 (threshold 15). Drivers by points: if/else 51 (185 pts), loops 19 (103 pts), boolean chains 35, ternaries 7 (23 pts), match/switch 3 (11 pts) (nesting depth added 242). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · read (cognitive 179) · ×1
  • read (cognitive 179) source/kmodel.js:254 — read has cognitive complexity 179 (threshold 15). Drivers by points: loops 31 (79 pts), if/else 19 (53 pts), ternaries 8 (28 pts), match/switch 4 (12 pts), boolean chains 7 (nesting depth added 110). Of this number, 143 points are the body's own statements and 36 belong to 50 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 171) · ×1
  • constructor (cognitive 171) source/mxnet.js:459 — constructor has cognitive complexity 171 (threshold 15). Drivers by points: if/else 24 (81 pts), ternaries 6 (37 pts), loops 7 (27 pts), boolean chains 15, match/switch 2 (11 pts) (nesting depth added 117). Of this number, 155 points are the body's own statements and 16 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 170) · ×1
  • constructor (cognitive 170) source/mxnet.js:268 — constructor has cognitive complexity 170 (threshold 15). Drivers by points: if/else 24 (72 pts), loops 14 (34 pts), ternaries 8 (32 pts), boolean chains 23, error handling 1 (9 pts) (nesting depth added 100). Of this number, 147 points are the body's own statements and 23 belong to 9 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · next (cognitive 167) · ×1
  • next (cognitive 167) source/protobuf.js:1124 — next has cognitive complexity 167 (threshold 15). Drivers by points: if/else 31 (103 pts), boolean chains 36, loops 8 (21 pts), match/switch 3 (7 pts) (nesting depth added 89). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 162) · ×1
  • constructor (cognitive 162) source/tf.js:904 — constructor has cognitive complexity 162 (threshold 15). Drivers by points: if/else 36 (99 pts), boolean chains 24, ternaries 7 (22 pts), match/switch 2 (9 pts), loops 3 (8 pts) (nesting depth added 90). Of this number, 77 points are the body's own statements and 85 belong to 13 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _tokenize (cognitive 162) · ×1
  • _tokenize (cognitive 162) REDACTED:5749 — _tokenize has cognitive complexity 162 (threshold 15). Drivers by points: if/else 40 (104 pts), ternaries 9 (35 pts), loops 5 (15 pts), boolean chains 8 (nesting depth added 100). Of this number, 157 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Model.constructor (cognitive 161) · ×1
  • Model.constructor (cognitive 161) source/onnx.js:987 — Model.constructor has cognitive complexity 161 (threshold 15). Drivers by points: if/else 15 (80 pts), loops 13 (55 pts), ternaries 4 (19 pts), boolean chains 7 (nesting depth added 122). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _tokenizeInline (cognitive 158) · ×1
  • _tokenizeInline (cognitive 158) REDACTED:5955 — _tokenizeInline has cognitive complexity 158 (threshold 15). Drivers by points: if/else 36 (94 pts), loops 8 (24 pts), ternaries 6 (19 pts), boolean chains 16, match/switch 1 (5 pts) (nesting depth added 91). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · open (cognitive 155) · ×1
  • open (cognitive 155) REDACTED:5327 — open has cognitive complexity 155 (threshold 15). Drivers by points: if/else 55 (140 pts), ternaries 3 (12 pts), boolean chains 3 (nesting depth added 94). Of this number, 47 points are the body's own statements and 108 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 152) · ×1
  • constructor (cognitive 152) source/openvino.js:503 — constructor has cognitive complexity 152 (threshold 15). Drivers by points: if/else 28 (70 pts), ternaries 10 (33 pts), boolean chains 27, loops 6 (14 pts), match/switch 3 (8 pts) (nesting depth added 78). Of this number, 141 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ModelFactory.match (cognitive 148) · ×1
  • ModelFactory.match (cognitive 148) source/tf.js:12 — ModelFactory.match has cognitive complexity 148 (threshold 15). Drivers by points: if/else 50 (155 pts), boolean chains 25, loops 3 (10 pts), ternaries 2 (7 pts), error handling 1 (4 pts) (nesting depth added 120). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (ModelFactory.match::match) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · TextReader._internalSubset (cognitive 133) · ×1
  • TextReader._internalSubset (cognitive 133) source/xml.js:312 — TextReader._internalSubset has cognitive complexity 133 (threshold 15). Drivers by points: if/else 32 (104 pts), loops 3 (14 pts), boolean chains 10, match/switch 2 (5 pts) (nesting depth added 86). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Node.constructor (cognitive 132) · ×1
  • Node.constructor (cognitive 132) source/mlir.js:490 — Node.constructor has cognitive complexity 132 (threshold 15). Drivers by points: if/else 39 (84 pts), boolean chains 24, loops 10 (24 pts) (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · read (cognitive 126) · ×1
  • read (cognitive 126) source/onnx.js:1618 — read has cognitive complexity 126 (threshold 15). Drivers by points: loops 11 (40 pts), if/else 16 (33 pts), ternaries 9 (26 pts), error handling 5 (13 pts), boolean chains 11, match/switch 2 (3 pts) (nesting depth added 72). Of this number, 117 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 123) · ×1
  • constructor (cognitive 123) source/megengine.js:438 — constructor has cognitive complexity 123 (threshold 15). Drivers by points: ternaries 17 (52 pts), if/else 20 (44 pts), loops 6 (14 pts), boolean chains 13 (nesting depth added 67). Of this number, 99 points are the body's own statements and 24 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _add (cognitive 121) · ×1
  • _add (cognitive 121) REDACTED:2825 — _add has cognitive complexity 121 (threshold 15). Drivers by points: boolean chains 58, if/else 31 (43 pts), ternaries 8 (11 pts), loops 5 (9 pts) (nesting depth added 19). Of this number, 100 points are the body's own statements and 21 belong to 14 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · constructor (cognitive 120) · ×1
  • constructor (cognitive 120) source/paddle.js:296 — constructor has cognitive complexity 120 (threshold 15). Drivers by points: if/else 23 (66 pts), loops 13 (35 pts), ternaries 4 (13 pts), boolean chains 6 (nesting depth added 74). Of this number, 112 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VMDialect.parseOperation (cognitive 119) · ×1
  • VMDialect.parseOperation (cognitive 119) source/mlir.js:23610 — VMDialect.parseOperation has cognitive complexity 119 (threshold 15). Drivers by points: if/else 37 (86 pts), loops 9 (27 pts), ternaries 2 (6 pts) (nesting depth added 71). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 119) · ×1
  • constructor (cognitive 119) source/dot.js:50 — constructor has cognitive complexity 119 (threshold 15). Drivers by points: if/else 28 (87 pts), loops 8 (16 pts), boolean chains 12, ternaries 1 (4 pts) (nesting depth added 70). Of this number, 110 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · weights (cognitive 118) · ×1
  • weights (cognitive 118) source/pickle.js:317 — weights has cognitive complexity 118 (threshold 15). Drivers by points: if/else 25 (75 pts), boolean chains 19, loops 4 (12 pts), ternaries 4 (12 pts) (nesting depth added 66). Of this number, 115 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TestDialect.parseOperation (cognitive 114) · ×1
  • TestDialect.parseOperation (cognitive 114) source/mlir.js:25944 — TestDialect.parseOperation has cognitive complexity 114 (threshold 15). Drivers by points: if/else 42 (81 pts), loops 8 (22 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 55). Of this number, 93 points are the body's own statements and 21 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tensor._decodeData (cognitive 111) · ×1
  • Tensor._decodeData (cognitive 111) source/base.js:1006 — Tensor._decodeData has cognitive complexity 111 (threshold 15). Drivers by points: loops 33 (98 pts), if/else 5 (8 pts), ternaries 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 70). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · FlowDialect.parseShapedFunctionType (cognitive 108) · ×1
  • FlowDialect.parseShapedFunctionType (cognitive 108) source/mlir.js:14972 — FlowDialect.parseShapedFunctionType has cognitive complexity 108 (threshold 15). Drivers by points: if/else 24 (88 pts), loops 4 (16 pts), boolean chains 4 (nesting depth added 76). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 106) · ×1
  • constructor (cognitive 106) source/tnn.js:134 — constructor has cognitive complexity 106 (threshold 15). Drivers by points: if/else 26 (55 pts), ternaries 8 (23 pts), boolean chains 19, loops 3 (5 pts), match/switch 2 (4 pts) (nesting depth added 48). Of this number, 100 points are the body's own statements and 6 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 103) · ×1
  • constructor (cognitive 103) source/rknn.js:287 — constructor has cognitive complexity 103 (threshold 15). Drivers by points: ternaries 12 (39 pts), if/else 15 (33 pts), loops 6 (16 pts), boolean chains 14, match/switch 1 (nesting depth added 55). Of this number, 83 points are the body's own statements and 20 belong to 6 function literals inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · weights (cognitive 102) · ×1
  • weights (cognitive 102) source/pytorch.js:2172 — weights has cognitive complexity 102 (threshold 15). Drivers by points: if/else 20 (61 pts), boolean chains 18, loops 4 (12 pts), ternaries 4 (11 pts) (nesting depth added 56). Of this number, 96 points are the body's own statements and 6 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · add (cognitive 102) · ×1
  • add (cognitive 102) REDACTED:1968 — add has cognitive complexity 102 (threshold 15). Drivers by points: if/else 22 (65 pts), loops 10 (30 pts), boolean chains 4, ternaries 3 (nesting depth added 63). Of this number, 97 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 99) · ×1
  • constructor (cognitive 99) source/cntk.js:285 — constructor has cognitive complexity 99 (threshold 15). Drivers by points: if/else 24 (51 pts), loops 7 (19 pts), boolean chains 15, ternaries 3 (13 pts), match/switch 1 (nesting depth added 49). Of this number, 58 points are the body's own statements and 41 belong to 7 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _node (cognitive 97) · ×1
  • _node (cognitive 97) REDACTED:4962 — _node has cognitive complexity 97 (threshold 15). Drivers by points: if/else 16 (47 pts), loops 5 (21 pts), ternaries 2 (16 pts), boolean chains 13 (nesting depth added 61). Of this number, 88 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.
D2 · Cognitive Complexity · Execution.statement (cognitive 93) · ×1
  • Execution.statement (cognitive 93) source/python.js:22083 — Execution.statement has cognitive complexity 93 (threshold 15). Drivers by points: if/else 33 (58 pts), loops 7 (17 pts), ternaries 6 (14 pts), boolean chains 4 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 93) · ×1
  • constructor (cognitive 93) source/onnx.js:440 — constructor has cognitive complexity 93 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 4 (19 pts), ternaries 3 (16 pts), boolean chains 12, match/switch 2 (5 pts) (nesting depth added 60). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AssemblyFormatParser.parseDirective (cognitive 91) · ×1
  • AssemblyFormatParser.parseDirective (cognitive 91) source/mlir.js:8473 — AssemblyFormatParser.parseDirective has cognitive complexity 91 (threshold 15). Drivers by points: if/else 42 (72 pts), loops 4 (10 pts), boolean chains 9 (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.
D2 · Cognitive Complexity · constructor (cognitive 91) · ×1
  • constructor (cognitive 91) source/tvm.js:74 — constructor has cognitive complexity 91 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 12 (27 pts), ternaries 6 (17 pts), boolean chains 14 (nesting depth added 46). Of this number, 80 points are the body's own statements and 11 belong to 6 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _updateMenu (cognitive 90) · ×1
  • _updateMenu (cognitive 90) source/app.js:358 — _updateMenu has cognitive complexity 90 (threshold 15). Drivers by points: ternaries 23 (47 pts), boolean chains 24, if/else 9 (15 pts), loops 2 (4 pts) (nesting depth added 32). Of this number, 26 points are the body's own statements and 64 belong to 43 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _render (cognitive 90) · ×1
  • _render (cognitive 90) REDACTED:6198 — _render has cognitive complexity 90 (threshold 15). Drivers by points: ternaries 12 (42 pts), if/else 6 (24 pts), loops 6 (17 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 60). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Archive.open (cognitive 89) · ×1
  • Archive.open (cognitive 89) source/zip.js:14 — Archive.open has cognitive complexity 89 (threshold 15). Drivers by points: if/else 21 (66 pts), boolean chains 12, loops 2 (7 pts), ternaries 2 (4 pts) (nesting depth added 52). Of this number, 60 points are the body's own statements and 29 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · XlaDialect.parseOperation (cognitive 89) · ×1
  • XlaDialect.parseOperation (cognitive 89) source/mlir.js:28680 — XlaDialect.parseOperation has cognitive complexity 89 (threshold 15). Drivers by points: if/else 20 (57 pts), loops 10 (30 pts), boolean chains 2 (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 89) · ×1
  • constructor (cognitive 89) source/onednn.js:94 — constructor has cognitive complexity 89 (threshold 15). Drivers by points: if/else 11 (37 pts), ternaries 6 (22 pts), loops 5 (14 pts), boolean chains 9, match/switch 2 (7 pts) (nesting depth added 56). Of this number, 79 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KrnlDialect.parseOperation (cognitive 88) · ×1
  • KrnlDialect.parseOperation (cognitive 88) source/mlir.js:16526 — KrnlDialect.parseOperation has cognitive complexity 88 (threshold 15). Drivers by points: if/else 22 (54 pts), loops 8 (24 pts), ternaries 2 (8 pts), boolean chains 2 (nesting depth added 54). Of this number, 65 points are the body's own statements and 23 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 87) · ×1
  • constructor (cognitive 87) source/caffe.js:189 — constructor has cognitive complexity 87 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 12 (20 pts), ternaries 5 (19 pts), boolean chains 10, match/switch 1 (nesting depth added 43). Of this number, 81 points are the body's own statements and 6 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Execution.expression (cognitive 86) · ×1
  • Execution.expression (cognitive 86) source/python.js:22217 — Execution.expression has cognitive complexity 86 (threshold 15). Drivers by points: if/else 23 (57 pts), ternaries 4 (12 pts), boolean chains 8, loops 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 47). Of this number, 84 points are the body's own statements and 2 belong to one function item inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ModelFactory.match (cognitive 85) · ×1
  • ModelFactory.match (cognitive 85) source/ncnn.js:13 — ModelFactory.match has cognitive complexity 85 (threshold 15). Drivers by points: if/else 23 (63 pts), loops 3 (12 pts), boolean chains 7, error handling 1 (3 pts) (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _format (cognitive 84) · ×1
  • _format (cognitive 84) REDACTED:5526 — _format has cognitive complexity 84 (threshold 15). Drivers by points: if/else 25 (35 pts), ternaries 16 (32 pts), boolean chains 15, match/switch 2 (nesting depth added 26). Of this number, 74 points are the body's own statements and 10 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProtoReader.open (cognitive 82) · ×1
  • ProtoReader.open (cognitive 82) source/onnx.js:1482 — ProtoReader.open has cognitive complexity 82 (threshold 15). Drivers by points: if/else 29 (89 pts), boolean chains 22, ternaries 2 (9 pts), loops 2 (8 pts) (nesting depth added 73). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (ProtoReader.open::match) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · read (cognitive 82) · ×1
  • read (cognitive 82) source/json.js:66 — read has cognitive complexity 82 (threshold 15). Drivers by points: if/else 19 (57 pts), match/switch 4 (14 pts), ternaries 2 (9 pts), boolean chains 1, loops 1 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · decodeJson (cognitive 81) · ×1
  • decodeJson (cognitive 81) source/tf-proto.js:12220 — decodeJson has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 22 (44 pts), if/else 37 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Node.constructor (cognitive 78) · ×1
  • Node.constructor (cognitive 78) source/sklearn.js:137 — Node.constructor has cognitive complexity 78 (threshold 15). Drivers by points: if/else 23 (55 pts), boolean chains 20, loops 1 (2 pts), ternaries 1 (nesting depth added 33). Of this number, 75 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 78) · ×1
  • constructor (cognitive 78) source/caffe.js:341 — constructor has cognitive complexity 78 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 15, ternaries 5 (14 pts), loops 5 (12 pts), match/switch 2 (nesting depth added 33). Of this number, 55 points are the body's own statements and 23 belong to 10 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · render (cognitive 78) · ×1
  • render (cognitive 78) REDACTED:4752 — render has cognitive complexity 78 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 7 (26 pts), loops 6 (18 pts), boolean chains 8 (nesting depth added 45). Of this number, 69 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Node.constructor (cognitive 77) · ×1
  • Node.constructor (cognitive 77) source/om.js:96 — Node.constructor has cognitive complexity 77 (threshold 15). Drivers by points: if/else 18 (35 pts), ternaries 5 (17 pts), boolean chains 15, loops 4 (8 pts), match/switch 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 77) · ×1
  • constructor (cognitive 77) source/cntk.js:119 — constructor has cognitive complexity 77 (threshold 15). Drivers by points: if/else 10 (37 pts), loops 8 (23 pts), match/switch 3 (6 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 49). Of this number, 66 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TFRTDialect.parseOperation (cognitive 76) · ×1
  • TFRTDialect.parseOperation (cognitive 76) source/mlir.js:24415 — TFRTDialect.parseOperation has cognitive complexity 76 (threshold 15). Drivers by points: if/else 28 (56 pts), loops 6 (20 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · read (cognitive 76) · ×1
  • read (cognitive 76) source/pytorch.js:1576 — read has cognitive complexity 76 (threshold 15). Drivers by points: if/else 13 (35 pts), loops 8 (23 pts), ternaries 3 (13 pts), boolean chains 5 (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 75) · ×1
  • constructor (cognitive 75) source/om.js:536 — constructor has cognitive complexity 75 (threshold 15). Drivers by points: if/else 10 (40 pts), loops 6 (23 pts), ternaries 2 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinalgDialect.parseOperation (cognitive 72) · ×1
  • LinalgDialect.parseOperation (cognitive 72) source/mlir.js:15989 — LinalgDialect.parseOperation has cognitive complexity 72 (threshold 15). Drivers by points: if/else 34 (60 pts), loops 2 (9 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · constructor (cognitive 72) · ×1
  • constructor (cognitive 72) source/tosa.js:166 — constructor has cognitive complexity 72 (threshold 15). Drivers by points: if/else 11 (35 pts), ternaries 8 (19 pts), boolean chains 10, loops 3 (4 pts), match/switch 1 (4 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · refresh (cognitive 72) · ×1
  • refresh (cognitive 72) REDACTED:434 — refresh has cognitive complexity 72 (threshold 15). Drivers by points: if/else 52 (139 pts), boolean chains 27, loops 8 (19 pts), ternaries 7 (16 pts) (nesting depth added 107). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 71) · ×1
  • constructor (cognitive 71) source/kmodel.js:33 — constructor has cognitive complexity 71 (threshold 15). Drivers by points: loops 14 (30 pts), if/else 6 (15 pts), boolean chains 13, ternaries 4 (11 pts), match/switch 1 (2 pts) (nesting depth added 33). Of this number, 61 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · metrics (cognitive 69) · ×1
  • metrics (cognitive 69) REDACTED:6655 — metrics has cognitive complexity 69 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 4 (18 pts), ternaries 3 (14 pts), boolean chains 8 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 66) · ×1
  • constructor (cognitive 66) source/espdl.js:120 — constructor has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 11 (40 pts), if/else 7 (11 pts), boolean chains 6, loops 3 (6 pts), match/switch 1 (3 pts) (nesting depth added 38). Of this number, 60 points are the body's own statements and 6 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _context (cognitive 65) · ×1
  • _context (cognitive 65) source/base.js:845 — _context has cognitive complexity 65 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 16, ternaries 4 (11 pts), loops 3 (7 pts), match/switch 2 (3 pts) (nesting depth added 25). Of this number, 59 points are the body's own statements and 6 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 65) · ×1
  • constructor (cognitive 65) source/caffe2.js:205 — constructor has cognitive complexity 65 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 11 (17 pts), boolean chains 11, ternaries 2 (3 pts) (nesting depth added 27). Of this number, 56 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 64) · ×1
  • constructor (cognitive 64) source/rknn.js:109 — constructor has cognitive complexity 64 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 8 (16 pts), ternaries 5 (11 pts), match/switch 4 (9 pts), boolean chains 7 (nesting depth added 31). Of this number, 43 points are the body's own statements and 21 belong to 10 function items inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · register (cognitive 64) · ×1
  • register (cognitive 64) REDACTED:1420 — register has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 14 (50 pts), if/else 4 (7 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Reader.read (cognitive 63) · ×1
  • Reader.read (cognitive 63) source/espresso.js:243 — Reader.read has cognitive complexity 63 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 5 (12 pts), boolean chains 5, error handling 2 (4 pts), match/switch 1 (3 pts), ternaries 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.
D2 · Cognitive Complexity · OpenMPDialect.parseLoopNestOp (cognitive 63) · ×1
  • OpenMPDialect.parseLoopNestOp (cognitive 63) source/mlir.js:21487 — OpenMPDialect.parseLoopNestOp has cognitive complexity 63 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 8 (31 pts) (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PXADialect.parseOperation (cognitive 63) · ×1
  • PXADialect.parseOperation (cognitive 63) source/mlir.js:24733 — PXADialect.parseOperation has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (44 pts), loops 3 (11 pts), boolean chains 8 (nesting depth added 31). Of this number, 61 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Node.constructor (cognitive 63) · ×1
  • Node.constructor (cognitive 63) source/mnn.js:142 — Node.constructor has cognitive complexity 63 (threshold 15). Drivers by points: if/else 13 (22 pts), ternaries 7 (22 pts), boolean chains 9, loops 2 (5 pts), match/switch 1 (5 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.
D2 · Cognitive Complexity · TensorSidebar.render (cognitive 61) · ×1
  • TensorSidebar.render (cognitive 61) REDACTED:4508 — TensorSidebar.render has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (34 pts), ternaries 4 (11 pts), loops 3 (10 pts), boolean chains 6 (nesting depth added 32). Of this number, 44 points are the body's own statements and 17 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BytecodeReader.parseRegions (cognitive 61) · ×1
  • BytecodeReader.parseRegions (cognitive 61) source/mlir.js:7684 — BytecodeReader.parseRegions has cognitive complexity 61 (threshold 15). Drivers by points: if/else 11 (41 pts), loops 4 (10 pts), ternaries 2 (6 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · read (cognitive 61) · ×1
  • read (cognitive 61) source/om.js:355 — read has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 5 (22 pts), loops 4 (15 pts), if/else 4 (13 pts), match/switch 2 (6 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PCFDialect.parseParallelExecutionBody (cognitive 60) · ×1
  • PCFDialect.parseParallelExecutionBody (cognitive 60) source/mlir.js:15866 — PCFDialect.parseParallelExecutionBody has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (39 pts), loops 6 (21 pts) (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · View.start (cognitive 59) · ×1
  • View.start (cognitive 59) REDACTED:35 — View.start has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 10 (23 pts), if/else 12 (21 pts), boolean chains 10, loops 2 (4 pts), error handling 1 (nesting depth added 24). Of this number, 26 points are the body's own statements and 33 belong to 11 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Node.constructor (cognitive 59) · ×1
  • Node.constructor (cognitive 59) source/mindir.js:120 — Node.constructor has cognitive complexity 59 (threshold 15). Drivers by points: if/else 11 (35 pts), boolean chains 11, ternaries 4 (6 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 29). Of this number, 40 points are the body's own statements and 19 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TensorBundle.constructor (cognitive 59) · ×1
  • TensorBundle.constructor (cognitive 59) source/tf.js:1336 — TensorBundle.constructor has cognitive complexity 59 (threshold 15). Drivers by points: if/else 11 (35 pts), ternaries 3 (13 pts), loops 3 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 37). Of this number, 58 points are the body's own statements and 1 belongs to one function literal inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Graph.constructor (cognitive 58) · ×1
  • Graph.constructor (cognitive 58) source/openvino.js:240 — Graph.constructor has cognitive complexity 58 (threshold 15). Drivers by points: if/else 29 (66 pts), loops 21 (34 pts), boolean chains 30, ternaries 4 (8 pts), match/switch 1 (3 pts) (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Graph.constructor::constant) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Context.graph (cognitive 58) · ×1
  • Context.graph (cognitive 58) source/tf.js:1768 — Context.graph has cognitive complexity 58 (threshold 15). Drivers by points: if/else 54 (148 pts), boolean chains 36, loops 20 (32 pts), ternaries 4 (10 pts), match/switch 2 (9 pts) (nesting depth added 119). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Variable.data (cognitive 57) · ×1
  • Variable.data (cognitive 57) source/hdf5.js:218 — Variable.data has cognitive complexity 57 (threshold 15). Drivers by points: if/else 8 (31 pts), loops 7 (24 pts), boolean chains 1, match/switch 1 (nesting depth added 40). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Target.metrics (cognitive 57) · ×1
  • Target.metrics (cognitive 57) REDACTED:6606 — Target.metrics has cognitive complexity 57 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 4 (19 pts), boolean chains 7, ternaries 1 (4 pts) (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 57) · ×1
  • constructor (cognitive 57) source/paddle.js:456 — constructor has cognitive complexity 57 (threshold 15). Drivers by points: if/else 12 (29 pts), ternaries 4 (12 pts), loops 4 (7 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 30). Of this number, 25 points are the body's own statements and 32 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BinaryReader.decode (cognitive 56) · ×1
  • BinaryReader.decode (cognitive 56) source/protobuf.js:56 — BinaryReader.decode has cognitive complexity 56 (threshold 15). Drivers by points: if/else 26 (77 pts), loops 4 (16 pts), boolean chains 5, error handling 2 (nesting depth added 63). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (BinaryReader.decode::decodeMessage) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ModelFactory.match (cognitive 56) · ×1
  • ModelFactory.match (cognitive 56) source/openvino.js:6 — ModelFactory.match has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 15, loops 4 (12 pts) (nesting depth added 24). Of this number, 39 points are the body's own statements and 17 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · match (cognitive 56) · ×1
  • match (cognitive 56) source/coreml.js:8 — match has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 24, error handling 1 (2 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 13). Of this number, 42 points are the body's own statements and 14 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · open (cognitive 55) · ×1
  • open (cognitive 55) source/protobuf.js:650 — open has cognitive complexity 55 (threshold 15). Drivers by points: if/else 10 (34 pts), loops 3 (12 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · toString (cognitive 55) · ×1
  • toString (cognitive 55) REDACTED:5275 — toString has cognitive complexity 55 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 5 (19 pts), boolean chains 15, loops 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.program (cognitive 54) · ×1
  • Graph.program (cognitive 54) source/coreml.js:1238 — Graph.program has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 13 (29 pts), boolean chains 15, match/switch 3 (7 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Graph.program::convertValue) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · XlaGpuDialect.parseOperation (cognitive 54) · ×1
  • XlaGpuDialect.parseOperation (cognitive 54) source/mlir.js:28814 — XlaGpuDialect.parseOperation has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 6 (20 pts) (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · read (cognitive 54) · ×1
  • read (cognitive 54) source/tengine.js:254 — read has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 5 (10 pts), ternaries 3 (10 pts), match/switch 2 (9 pts) (nesting depth added 33). Of this number, 44 points are the body's own statements and 10 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dialect.getOperation (cognitive 53) · ×1
  • Dialect.getOperation (cognitive 53) source/mlir.js:9096 — Dialect.getOperation has cognitive complexity 53 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 5 (15 pts), boolean chains 7 (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.
D2 · Cognitive Complexity · LLVMDialect.parseLLVMInvokeOp (cognitive 53) · ×1
  • LLVMDialect.parseLLVMInvokeOp (cognitive 53) source/mlir.js:23181 — LLVMDialect.parseLLVMInvokeOp has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 6 (21 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IR.op · ×1
  • IR.op::collectRegions (cognitive 52) source/paddle.js:1071 — IR.op::collectRegions has cognitive complexity 52 (threshold 15). Drivers by points: if/else 5 (24 pts), loops 5 (16 pts), ternaries 2 (10 pts), boolean chains 2 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (IR.op) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · constructor (cognitive 52) · ×1
  • constructor (cognitive 52) source/ncnn.js:200 — constructor has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 5 (17 pts), boolean chains 12, ternaries 1 (3 pts) (nesting depth added 24). Of this number, 41 points are the body's own statements and 11 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · decode (cognitive 52) · ×1
  • decode (cognitive 52) source/text.js:103 — decode has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (40 pts), boolean chains 12 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Context.graph (cognitive 50) · ×1
  • Context.graph (cognitive 50) source/pytorch.js:1061 — Context.graph has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (37 pts), boolean chains 7, loops 3 (6 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.
D2 · Cognitive Complexity · ModelFactory.open (cognitive 50) · ×1
  • ModelFactory.open (cognitive 50) source/paddle.js:59 — ModelFactory.open has cognitive complexity 50 (threshold 15). Drivers by points: if/else 9 (36 pts), error handling 8 (33 pts), loops 8 (26 pts), ternaries 4 (14 pts), boolean chains 7, match/switch 3 (5 pts) (nesting depth added 82). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (ModelFactory.open::openProgram) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Graph.constructor (cognitive 50) · ×1
  • Graph.constructor (cognitive 50) source/tf.js:726 — Graph.constructor has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 4 (10 pts), boolean chains 7 (nesting depth added 25). Of this number, 37 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DenseArrayAttr.value (cognitive 49) · ×1
  • DenseArrayAttr.value (cognitive 49) source/mlir.js:1730 — DenseArrayAttr.value has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 5 (23 pts), if/else 9 (13 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BytecodeReader.parseOpWithoutRegions (cognitive 49) · ×1
  • BytecodeReader.parseOpWithoutRegions (cognitive 49) source/mlir.js:7857 — BytecodeReader.parseOpWithoutRegions has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (29 pts), loops 5 (12 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.updateTunnels · ×1
  • Graph.updateTunnels::findTarget (cognitive 48) REDACTED:2205 — Graph.updateTunnels::findTarget has cognitive complexity 48 (threshold 15). Drivers by points: if/else 7 (29 pts), boolean chains 12, loops 3 (7 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Object.constructor (cognitive 48) · ×1
  • Object.constructor (cognitive 48) source/mediapipe.js:207 — Object.constructor has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 3 (8 pts), boolean chains 6 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 48) · ×1
  • constructor (cognitive 48) source/mindir.js:58 — constructor has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 6 (18 pts), boolean chains 13, if/else 7 (13 pts), loops 4 (nesting depth added 18). Of this number, 45 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BytecodeReader.parseAttributeDict (cognitive 47) · ×1
  • BytecodeReader.parseAttributeDict (cognitive 47) source/mlir.js:7966 — BytecodeReader.parseAttributeDict has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 11, loops 6 (11 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuiltinDialect.readAttribute (cognitive 47) · ×1
  • BuiltinDialect.readAttribute (cognitive 47) source/mlir.js:19653 — BuiltinDialect.readAttribute has cognitive complexity 47 (threshold 15). Drivers by points: loops 8 (17 pts), ternaries 6 (13 pts), if/else 7 (12 pts), boolean chains 4, match/switch 1 (nesting depth added 21). Of this number, 41 points are the body's own statements and 6 belong to one function item inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TFDeviceDialect.parseReplicateOp (cognitive 47) · ×1
  • TFDeviceDialect.parseReplicateOp (cognitive 47) source/mlir.js:23973 — TFDeviceDialect.parseReplicateOp has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 5 (20 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · open (cognitive 47) · ×1
  • open (cognitive 47) source/flatbuffers.js:6 — open has cognitive complexity 47 (threshold 15). Drivers by points: if/else 8 (25 pts), boolean chains 8, loops 1 (7 pts), ternaries 3 (7 pts) (nesting depth added 27). Of this number, 46 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 47) · ×1
  • constructor (cognitive 47) source/pytorch.js:880 — constructor has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 7, ternaries 2 (5 pts), loops 2 (4 pts), match/switch 1 (4 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.
D2 · Cognitive Complexity · tags (cognitive 47) · ×1
  • tags (cognitive 47) REDACTED:7106 — tags has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (24 pts), ternaries 2 (11 pts), boolean chains 4, error handling 1 (4 pts), match/switch 1 (4 pts) (nesting depth added 29). Of this number, 45 points are the body's own statements and 2 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Node.constructor (cognitive 46) · ×1
  • Node.constructor (cognitive 46) source/dl4j.js:167 — Node.constructor has cognitive complexity 46 (threshold 15). Drivers by points: match/switch 5 (17 pts), if/else 10 (16 pts), boolean chains 6, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.constructor (cognitive 45) · ×1
  • Graph.constructor (cognitive 45) source/dlc.js:57 — Graph.constructor has cognitive complexity 45 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 8 (18 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 25). Of this number, 44 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dialect.parseDynamicIndexList (cognitive 45) · ×1
  • Dialect.parseDynamicIndexList (cognitive 45) source/mlir.js:10740 — Dialect.parseDynamicIndexList has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (36 pts), boolean chains 3, loops 1 (3 pts), ternaries 2 (3 pts) (nesting depth added 25). Of this number, 43 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · read (cognitive 45) · ×1
  • read (cognitive 45) source/dlc.js:306 — read has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 12, ternaries 3 (9 pts), loops 1 (2 pts) (nesting depth added 13). Of this number, 39 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 45) · ×1
  • constructor (cognitive 45) source/onnx.js:289 — constructor has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 20, if/else 7 (11 pts), ternaries 6 (11 pts), loops 3 (nesting depth added 9). Of this number, 41 points are the body's own statements and 4 belong to 8 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _uint32 (cognitive 45) · ×1
  • _uint32 (cognitive 45) source/protobuf.js:237 — _uint32 has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (41 pts), boolean chains 4 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ModelFactory.open (cognitive 44) · ×1
  • ModelFactory.open (cognitive 44) source/caffe2.js:58 — ModelFactory.open has cognitive complexity 44 (threshold 15). Drivers by points: error handling 10 (32 pts), if/else 9 (11 pts), ternaries 2 (8 pts), boolean chains 6, loops 1 (3 pts), match/switch 2 (3 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. This shape REPEATS in the file: one other method here (ModelFactory.open::open) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · BinaryReader.decode · ×1
  • BinaryReader.decode::decodeMessage (cognitive 44) source/protobuf.js:60 — BinaryReader.decode::decodeMessage has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (35 pts), loops 2 (6 pts), boolean chains 2, error handling 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (BinaryReader.decode) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Graph.addTunnels · ×1
  • Graph.addTunnels::subgraphOuterRefs (cognitive 44) REDACTED:2076 — Graph.addTunnels::subgraphOuterRefs has cognitive complexity 44 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 8 (17 pts), boolean chains 5 (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. This shape REPEATS in the file: one other method here (Graph.addTunnels) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · NodeSidebar.render (cognitive 44) · ×1
  • NodeSidebar.render (cognitive 44) REDACTED:3679 — NodeSidebar.render has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 6 (12 pts), boolean chains 10, ternaries 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.
D2 · Cognitive Complexity · exception (cognitive 44) · ×1
  • exception (cognitive 44) REDACTED:300 — exception has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (34 pts), ternaries 4 (9 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · open (cognitive 44) · ×1
  • open (cognitive 44) REDACTED:7335 — open has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 7, error handling 2 (5 pts), ternaries 1 (4 pts) (nesting depth added 21). Of this number, 37 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · package.update (cognitive 43) · ×1
  • package.update (cognitive 43) REDACTED:562 — package.update has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 8, loops 4 (6 pts), ternaries 2, error handling 1 (nesting depth added 13). Of this number, 22 points are the body's own statements and 21 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Container._params4 (cognitive 43) · ×1
  • Container._params4 (cognitive 43) source/dlc.js:571 — Container._params4 has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (8 pts), boolean chains 5, ternaries 2 (5 pts), error handling 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Context.constructor (cognitive 43) · ×1
  • Context.constructor (cognitive 43) source/espdl.js:341 — Context.constructor has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (12 pts), loops 4 (8 pts), boolean chains 7 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StructType.parse (cognitive 43) · ×1
  • StructType.parse (cognitive 43) source/mlir.js:17507 — StructType.parse has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (36 pts), loops 3 (7 pts) (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · constructor (cognitive 43) · ×1
  • constructor (cognitive 43) REDACTED:2779 — constructor has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (11 pts), boolean chains 8, ternaries 1 (nesting depth added 22). Of this number, 42 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Parser._parseBlock (cognitive 41) · ×1
  • Parser._parseBlock (cognitive 41) source/dot.js:338 — Parser._parseBlock has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HLODialect.parseReduceOp (cognitive 41) · ×1
  • HLODialect.parseReduceOp (cognitive 41) source/mlir.js:11499 — HLODialect.parseReduceOp has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 2 (7 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 18). Of this number, 38 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IREEDialect.parseDispatchEntryPoints (cognitive 41) · ×1
  • IREEDialect.parseDispatchEntryPoints (cognitive 41) source/mlir.js:13474 — IREEDialect.parseDispatchEntryPoints has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (34 pts), boolean chains 4, loops 1 (2 pts), ternaries 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.
D2 · Cognitive Complexity · FlowDialect.parseFlowFuncOp (cognitive 41) · ×1
  • FlowDialect.parseFlowFuncOp (cognitive 41) source/mlir.js:14853 — FlowDialect.parseFlowFuncOp has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 2 (9 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.
D2 · Cognitive Complexity · constructor (cognitive 41) · ×1
  • constructor (cognitive 41) source/hailo.js:49 — constructor has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 4 (16 pts), boolean chains 8, if/else 5 (8 pts), loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 20). Of this number, 32 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _parseAttributeValue (cognitive 41) · ×1
  • _parseAttributeValue (cognitive 41) source/onnx.js:2340 — _parseAttributeValue has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · open (cognitive 41) · ×1
  • open (cognitive 41) source/tosa.js:18 — open has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 5 (14 pts), boolean chains 3, error handling 2 (3 pts), match/switch 2 (nesting depth added 21). Of this number, 32 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Host.start (cognitive 40) · ×1
  • Host.start (cognitive 40) REDACTED:147 — Host.start has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 10, ternaries 4 (6 pts) (nesting depth added 13). Of this number, 30 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.layout (cognitive 40) · ×1
  • Graph.layout (cognitive 40) source/grapher.js:224 — Graph.layout has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 12, loops 6 (8 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.
D2 · Cognitive Complexity · FindSidebar._value (cognitive 40) · ×1
  • FindSidebar._value (cognitive 40) REDACTED:4920 — FindSidebar._value has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (28 pts), boolean chains 5, ternaries 1 (5 pts), loops 1 (2 pts) (nesting depth added 23). Of this number, 35 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GpuDialect.parseOperation (cognitive 40) · ×1
  • GpuDialect.parseOperation (cognitive 40) source/mlir.js:20608 — GpuDialect.parseOperation has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 5 (10 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ColumnConcatenatingTransformer.constructor (cognitive 40) · ×1
  • ColumnConcatenatingTransformer.constructor (cognitive 40) source/mlnet.js:745 — ColumnConcatenatingTransformer.constructor has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 7 (20 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · match (cognitive 40) · ×1
  • match (cognitive 40) source/transformers.js:9 — match has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 15 (nesting depth added 14). Of this number, 38 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · View._updatePath (cognitive 39) · ×1
  • View._updatePath (cognitive 39) REDACTED:816 — View._updatePath has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 19). Of this number, 34 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · OperationParser.finalize · ×1
  • OperationParser.finalize::walk (cognitive 39) source/mlir.js:4994 — OperationParser.finalize::walk has cognitive complexity 39 (threshold 15). Drivers by points: if/else 6 (25 pts), loops 4 (14 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TensorLiteralParser.getAttr · ×1
  • TensorLiteralParser.getAttr::convertElement (cognitive 39) source/mlir.js:6510 — TensorLiteralParser.getAttr::convertElement has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (24 pts), ternaries 3 (9 pts), boolean chains 6 (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 (TensorLiteralParser.getAttr) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · BufferizationDialect.parseOperation (cognitive 39) · ×1
  • BufferizationDialect.parseOperation (cognitive 39) source/mlir.js:19856 — BufferizationDialect.parseOperation has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (36 pts), loops 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TFRTTestDialect.parseOperation (cognitive 39) · ×1
  • TFRTTestDialect.parseOperation (cognitive 39) source/mlir.js:27458 — TFRTTestDialect.parseOperation has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 4 (10 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.
D2 · Cognitive Complexity · Datatype.constructor (cognitive 38) · ×1
  • Datatype.constructor (cognitive 38) source/hdf5.js:994 — Datatype.constructor has cognitive complexity 38 (threshold 15). Drivers by points: loops 5 (18 pts), if/else 5 (17 pts), match/switch 2 (3 pts) (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LinalgDialect.parseCommonStructuredOpParts (cognitive 38) · ×1
  • LinalgDialect.parseCommonStructuredOpParts (cognitive 38) source/mlir.js:16164 — LinalgDialect.parseCommonStructuredOpParts has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 4 (12 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.constructor (cognitive 38) · ×1
  • Graph.constructor (cognitive 38) source/onnx.js:1164 — Graph.constructor has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 5 (10 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · open (cognitive 38) · ×1
  • open (cognitive 38) source/caffe.js:26 — open has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 3 (8 pts), boolean chains 6, error handling 3 (5 pts), match/switch 1 (nesting depth added 14). Most of this is not in the body itself: 15 of the 38 points are its own statements and the rest belongs to 6 function items inside it that branch (openNetParameterText::field, openNetParameterText, a function literal at line 55, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · _readBson (cognitive 38) · ×1
  • _readBson (cognitive 38) source/json.js:436 — _readBson has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (27 pts), match/switch 2 (5 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 19). Of this number, 35 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 38) · ×1
  • constructor (cognitive 38) source/pickle.js:196 — constructor has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 11, ternaries 5 (10 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Context.build (cognitive 37) · ×1
  • Context.build (cognitive 37) source/gguf.js:1170 — Context.build has cognitive complexity 37 (threshold 15). Drivers by points: if/else 27 (52 pts), loops 19 (29 pts), boolean chains 18, ternaries 5 (11 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (Context.build::resolveBlock, Context.build::buildBlockLayers, Context.build::sectionFlat) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · OperationParser.parseRegion (cognitive 37) · ×1
  • OperationParser.parseRegion (cognitive 37) source/mlir.js:5363 — OperationParser.parseRegion has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 11, loops 4 (8 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LLVMDialect.parseIndirectBrOpSucessors (cognitive 37) · ×1
  • LLVMDialect.parseIndirectBrOpSucessors (cognitive 37) source/mlir.js:22996 — LLVMDialect.parseIndirectBrOpSucessors has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (16 pts), ternaries 1 (4 pts) (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · read (cognitive 37) · ×1
  • read (cognitive 37) source/tnn.js:385 — read has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 3 (8 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 22). Of this number, 32 points are the body's own statements and 5 belong to 8 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Node.constructor (cognitive 36) · ×1
  • Node.constructor (cognitive 36) source/bigdl.js:106 — Node.constructor has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (8 pts), boolean chains 7, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Constraint._parseGeneric (cognitive 36) · ×1
  • Constraint._parseGeneric (cognitive 36) source/mlir.js:8277 — Constraint._parseGeneric has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 7, loops 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VectorDialect.parseExtractOp (cognitive 36) · ×1
  • VectorDialect.parseExtractOp (cognitive 36) source/mlir.js:12837 — VectorDialect.parseExtractOp has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 1 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · OpenMPDialect.parseBlockArgClause (cognitive 36) · ×1
  • OpenMPDialect.parseBlockArgClause (cognitive 36) source/mlir.js:21804 — OpenMPDialect.parseBlockArgClause has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TFLDialect.parseOperation (cognitive 36) · ×1
  • TFLDialect.parseOperation (cognitive 36) source/mlir.js:25391 — TFLDialect.parseOperation has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ACCDialect.parseOperation (cognitive 36) · ×1
  • ACCDialect.parseOperation (cognitive 36) source/mlir.js:28075 — ACCDialect.parseOperation has cognitive complexity 36 (threshold 15). Drivers by points: loops 6 (17 pts), if/else 7 (16 pts), ternaries 1 (2 pts), boolean chains 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.
D2 · Cognitive Complexity · constructor (cognitive 36) · ×1
  • constructor (cognitive 36) source/barracuda.js:100 — constructor has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 15, if/else 7 (9 pts), ternaries 3 (7 pts), loops 3 (5 pts) (nesting depth added 8). Of this number, 34 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · node · ×1
  • node::weights (cognitive 36) source/coreml.js:715 — node::weights has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 4 (11 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _update (cognitive 36) · ×1
  • _update (cognitive 36) REDACTED:1618 — _update has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 3 (7 pts), loops 3 (5 pts), boolean chains 4, match/switch 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.
D2 · Cognitive Complexity · Decoder.open (cognitive 35) · ×1
  • Decoder.open (cognitive 35) source/text.js:6 — Decoder.open has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 16, if/else 14 (16 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 3). Of this number, 33 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · TextReader._parseLiteral (cognitive 35) · ×1
  • TextReader._parseLiteral (cognitive 35) source/onnx.js:2597 — TextReader._parseLiteral has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 8, loops 3 (7 pts), ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LayerResourceReader.constructor (cognitive 35) · ×1
  • LayerResourceReader.constructor (cognitive 35) source/tnn.js:478 — LayerResourceReader.constructor has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (29 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · open (cognitive 35) · ×1
  • open (cognitive 35) source/openvino.js:102 — open has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 5 (7 pts), error handling 3 (5 pts), loops 3 (5 pts), match/switch 2 (5 pts), boolean chains 4 (nesting depth added 12). Most of this is not in the body itself: 15 of the 35 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 181, child, edges, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · build (cognitive 35) · ×1
  • build (cognitive 35) REDACTED:3199 — build has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (18 pts), ternaries 2 (8 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 19). Of this number, 28 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.constructor (cognitive 34) · ×1
  • Graph.constructor (cognitive 34) source/armnn.js:68 — Graph.constructor has cognitive complexity 34 (threshold 15). Drivers by points: loops 7 (13 pts), ternaries 5 (13 pts), if/else 3 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 16). Of this number, 24 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer.lexNumber (cognitive 34) · ×1
  • Lexer.lexNumber (cognitive 34) source/mlir.js:2660 — Lexer.lexNumber has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 11, loops 4 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HALDialect.parseParamValue (cognitive 34) · ×1
  • HALDialect.parseParamValue (cognitive 34) source/mlir.js:14145 — HALDialect.parseParamValue has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (13 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · UtilDialect.parseUtilFuncOp (cognitive 34) · ×1
  • UtilDialect.parseUtilFuncOp (cognitive 34) source/mlir.js:14585 — UtilDialect.parseUtilFuncOp has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (9 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 17). Of this number, 22 points are the body's own statements and 12 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SparseTensorDialect.parseCoIterateOp (cognitive 34) · ×1
  • SparseTensorDialect.parseCoIterateOp (cognitive 34) source/mlir.js:20406 — SparseTensorDialect.parseCoIterateOp has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 8 (11 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LLVMDialect.parseSwitchOpCases (cognitive 34) · ×1
  • LLVMDialect.parseSwitchOpCases (cognitive 34) source/mlir.js:22630 — LLVMDialect.parseSwitchOpCases has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 4 (10 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonReader._attribute (cognitive 34) · ×1
  • JsonReader._attribute (cognitive 34) source/onnx.js:1990 — JsonReader._attribute has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 19, if/else 15. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · decodeJson (cognitive 34) · ×1
  • decodeJson (cognitive 34) source/tf-proto.js:9091 — decodeJson has cognitive complexity 34 (threshold 15). Drivers by points: if/else 32, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · update (cognitive 34) · ×1
  • update (cognitive 34) REDACTED:3556 — update has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 6 (12 pts), boolean chains 5, ternaries 2 (nesting depth added 15). Of this number, 27 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.updatePreprocessing (cognitive 33) · ×1
  • Graph.updatePreprocessing (cognitive 33) source/coreml.js:1204 — Graph.updatePreprocessing has cognitive complexity 33 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 5 (14 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer.lexToken (cognitive 33) · ×1
  • Lexer.lexToken (cognitive 33) source/mlir.js:2504 — Lexer.lexToken has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (29 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
D2 · Cognitive Complexity · OpAsmParser.parseFunctionArgumentList (cognitive 33) · ×1
  • OpAsmParser.parseFunctionArgumentList (cognitive 33) source/mlir.js:5936 — OpAsmParser.parseFunctionArgumentList has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 1 (2 pts), boolean chains 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.
D2 · Cognitive Complexity · Constraint.tokenize (cognitive 33) · ×1
  • Constraint.tokenize (cognitive 33) source/mlir.js:8104 — Constraint.tokenize has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Constraint.parseListArgument (cognitive 33) · ×1
  • Constraint.parseListArgument (cognitive 33) source/mlir.js:8368 — Constraint.parseListArgument has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 5, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · OpenMPDialect.parseBlockArgRegion (cognitive 33) · ×1
  • OpenMPDialect.parseBlockArgRegion (cognitive 33) source/mlir.js:21908 — OpenMPDialect.parseBlockArgRegion has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 10, loops 4 (6 pts), ternaries 1 (nesting depth added 10). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LLVMDialect.parseLLVMCallOp (cognitive 33) · ×1
  • LLVMDialect.parseLLVMCallOp (cognitive 33) source/mlir.js:23056 — LLVMDialect.parseLLVMCallOp has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 4 (15 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TFGDialect.parseOperation (cognitive 33) · ×1
  • TFGDialect.parseOperation (cognitive 33) source/mlir.js:24051 — TFGDialect.parseOperation has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 1 (4 pts) (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.
D2 · Cognitive Complexity · Group.constructor (cognitive 33) · ×1
  • Group.constructor (cognitive 33) source/onnx.js:370 — Group.constructor has cognitive complexity 33 (threshold 15). Drivers by points: loops 8 (16 pts), if/else 5 (13 pts), ternaries 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.
D2 · Cognitive Complexity · type (cognitive 33) · ×1
  • type (cognitive 33) source/hdf5.js:1096 — type has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 10, match/switch 3 (9 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _lzf (cognitive 33) · ×1
  • _lzf (cognitive 33) source/hdf5.js:1468 — _lzf has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 4 (8 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StreamDialect.parseResourceRegion (cognitive 32) · ×1
  • StreamDialect.parseResourceRegion (cognitive 32) source/mlir.js:15343 — StreamDialect.parseResourceRegion has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 5 (9 pts) (nesting depth added 14). Of this number, 24 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SPIRVDialect.parseSwitchOpCases (cognitive 32) · ×1
  • SPIRVDialect.parseSwitchOpCases (cognitive 32) source/mlir.js:17828 — SPIRVDialect.parseSwitchOpCases has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 5 (11 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. This shape REPEATS in the file: one other method here (CFDialect.parseSwitchOpCases) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · CFDialect.parseSwitchOpCases (cognitive 32) · ×1
  • CFDialect.parseSwitchOpCases (cognitive 32) source/mlir.js:18765 — CFDialect.parseSwitchOpCases has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 5 (11 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. This shape REPEATS in the file: one other method here (SPIRVDialect.parseSwitchOpCases) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · _Graph.to_json (cognitive 32) · ×1
  • _Graph.to_json (cognitive 32) source/pytorch.py:58 — _Graph.to_json has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 7 (10 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.
D2 · Cognitive Complexity · constructor (cognitive 32) · ×1
  • constructor (cognitive 32) source/acuity.js:114 — constructor has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 4 (12 pts), boolean chains 9, loops 4 (7 pts), if/else 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextReader.open (cognitive 31) · ×1
  • TextReader.open (cognitive 31) source/json.js:9 — TextReader.open has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 5, match/switch 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.
D2 · Cognitive Complexity · Graph.addTunnels (cognitive 31) · ×1
  • Graph.addTunnels (cognitive 31) REDACTED:2074 — Graph.addTunnels has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (43 pts), loops 11 (23 pts), boolean chains 9 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Graph.addTunnels::subgraphOuterRefs) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · TFExecutorDialect.parseGraphOp (cognitive 31) · ×1
  • TFExecutorDialect.parseGraphOp (cognitive 31) source/mlir.js:24275 — TFExecutorDialect.parseGraphOp has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (16 pts), ternaries 1 (6 pts), loops 1 (5 pts), boolean chains 4 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TransformDialect.parsePackedOrDynamicIndexList (cognitive 31) · ×1
  • TransformDialect.parsePackedOrDynamicIndexList (cognitive 31) source/mlir.js:25748 — TransformDialect.parsePackedOrDynamicIndexList has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TestDialect.inferResultTypes (cognitive 31) · ×1
  • TestDialect.inferResultTypes (cognitive 31) source/mlir.js:26483 — TestDialect.inferResultTypes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 6, loops 2 (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.
D2 · Cognitive Complexity · Graph.constructor (cognitive 31) · ×1
  • Graph.constructor (cognitive 31) source/onednn.js:32 — Graph.constructor has cognitive complexity 31 (threshold 15). Drivers by points: loops 8 (12 pts), if/else 6 (9 pts), boolean chains 8, ternaries 2 (nesting depth added 7). Of this number, 22 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IR.op (cognitive 31) · ×1
  • IR.op (cognitive 31) source/paddle.js:1014 — IR.op has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (43 pts), loops 11 (32 pts), ternaries 4 (16 pts), boolean chains 5 (nesting depth added 63). To reduce it, split the body into named stages: move each independent 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 (IR.op::collectRegions) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · GraphMetadata.visible (cognitive 31) · ×1
  • GraphMetadata.visible (cognitive 31) source/tf.js:1705 — GraphMetadata.visible has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · open (cognitive 31) · ×1
  • open (cognitive 31) source/ncnn.js:106 — open has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 4 (9 pts), ternaries 2 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · exception (cognitive 31) · ×1
  • exception (cognitive 31) source/desktop.mjs:388 — exception has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 4 (9 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Graph.node (cognitive 30) · ×1
  • Graph.node (cognitive 30) source/coreml.js:655 — Graph.node has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (35 pts), ternaries 11 (24 pts), boolean chains 12, loops 4 (6 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · Graph.model (cognitive 30) · ×1
  • Graph.model (cognitive 30) source/coreml.js:878 — Graph.model has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 6 (16 pts), loops 6 (12 pts), boolean chains 1, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ValueView.expand (cognitive 30) · ×1
  • ValueView.expand (cognitive 30) REDACTED:4122 — ValueView.expand has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 8, error handling 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.
D2 · Cognitive Complexity · TargetSidebar.render (cognitive 30) · ×1
  • TargetSidebar.render (cognitive 30) REDACTED:4669 — TargetSidebar.render has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 5 (10 pts), boolean chains 6, ternaries 3 (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.
D2 · Cognitive Complexity · data_pkl.open (cognitive 30) · ×1
  • data_pkl.open (cognitive 30) source/pytorch.js:1219 — data_pkl.open has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer.lexPrefixedIdentifier (cognitive 30) · ×1
  • Lexer.lexPrefixedIdentifier (cognitive 30) source/mlir.js:2785 — Lexer.lexPrefixedIdentifier has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, loops 3 (7 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.parseDialectSymbolBody (cognitive 30) · ×1
  • Parser.parseDialectSymbolBody (cognitive 30) source/mlir.js:4275 — Parser.parseDialectSymbolBody has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · start (cognitive 30) · ×1
  • start (cognitive 30) source/base.js:1371 — start has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 10, if/else 5 (6 pts) (nesting depth added 7). Of this number, 28 points are the body's own statements and 2 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 30) · ×1
  • constructor (cognitive 30) source/coreml.js:295 — constructor has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 7, ternaries 2 (3 pts) (nesting depth added 9). Most of this is not in the body itself: 10 of the 30 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 315, 307, 308, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · createAttribute (cognitive 30) · ×1
  • createAttribute (cognitive 30) source/onnx.js:830 — createAttribute has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 4 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Inference.infer · ×1
  • Inference.infer::infer (cognitive 29) source/acuity.js:643 — Inference.infer::infer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 2 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComputationNetwork.constructor (cognitive 29) · ×1
  • ComputationNetwork.constructor (cognitive 29) source/cntk.js:594 — ComputationNetwork.constructor has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Configuration.read (cognitive 29) · ×1
  • Configuration.read (cognitive 29) source/darknet.js:924 — Configuration.read has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (19 pts), ternaries 1 (4 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Datatype.read (cognitive 29) · ×1
  • Datatype.read (cognitive 29) source/hdf5.js:1162 — Datatype.read has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 7 (9 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · View.export (cognitive 29) · ×1
  • View.export (cognitive 29) REDACTED:950 — View.export has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (12 pts), boolean chains 4, ternaries 1 (nesting depth added 15). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 3 function items inside it that branch (applyStyleSheet, a function literal at line 1013, a function literal at line 1017). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Reader.read (cognitive 29) · ×1
  • Reader.read (cognitive 29) source/executorch.js:395 — Reader.read has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (10 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.
D2 · Cognitive Complexity · Constraint.parseTokens (cognitive 29) · ×1
  • Constraint.parseTokens (cognitive 29) source/mlir.js:8161 — Constraint.parseTokens has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StreamDialect.parseDispatchFunctionSignature (cognitive 29) · ×1
  • StreamDialect.parseDispatchFunctionSignature (cognitive 29) source/mlir.js:15627 — StreamDialect.parseDispatchFunctionSignature has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (6 pts) (nesting depth added 17). Of this number, 26 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · getFloat8e4m3 (cognitive 29) · ×1
  • getFloat8e4m3 (cognitive 29) source/base.js:150 — getFloat8e4m3 has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 29) · ×1
  • constructor (cognitive 29) source/mlnet.js:42 — constructor has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 5 (9 pts), boolean chains 4, ternaries 1 (3 pts), match/switch 1 (nesting depth added 8). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 4 function items inside it that branch (createNode, map, loadChain, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · _processingInstruction (cognitive 29) · ×1
  • _processingInstruction (cognitive 29) source/xml.js:944 — _processingInstruction has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (11 pts), ternaries 2 (5 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inflateRaw (cognitive 29) · ×1
  • inflateRaw (cognitive 29) source/zip.js:267 — inflateRaw has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (3 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.
D2 · Cognitive Complexity · TextReader._number (cognitive 28) · ×1
  • TextReader._number (cognitive 28) source/json.js:260 — TextReader._number has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 9, loops 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DataObjectHeader.constructor (cognitive 28) · ×1
  • DataObjectHeader.constructor (cognitive 28) source/hdf5.js:730 — DataObjectHeader.constructor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AffineMap.parse (cognitive 28) · ×1
  • AffineMap.parse (cognitive 28) source/mlir.js:1494 — AffineMap.parse has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Parser.parseNameOrFileLineColRange (cognitive 28) · ×1
  • Parser.parseNameOrFileLineColRange (cognitive 28) source/mlir.js:3156 — Parser.parseNameOrFileLineColRange has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtilDialect.parseTiedFunctionResultList (cognitive 28) · ×1
  • UtilDialect.parseTiedFunctionResultList (cognitive 28) source/mlir.js:14477 — UtilDialect.parseTiedFunctionResultList has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 3 (7 pts) (nesting depth added 14). Of this number, 18 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.
D2 · Cognitive Complexity · THLODialect.parseOperation (cognitive 28) · ×1
  • THLODialect.parseOperation (cognitive 28) source/mlir.js:16768 — THLODialect.parseOperation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 4 (9 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IR.getOutputAttr (cognitive 28) · ×1
  • IR.getOutputAttr (cognitive 28) source/paddle.js:1343 — IR.getOutputAttr has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _parseAttribute (cognitive 28) · ×1
  • _parseAttribute (cognitive 28) source/onnx.js:2269 — _parseAttribute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (11 pts), loops 2 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Host.view (cognitive 27) · ×1
  • Host.view (cognitive 27) REDACTED:55 — Host.view has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 7 (8 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (nesting depth added 7). None of this is in the body itself: all 27 points belong to 5 function items inside it that branch (telemetry, consent, a function literal at line 95, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Container.read (cognitive 27) · ×1
  • Container.read (cognitive 27) source/hailo.js:296 — Container.read has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · OperationParser.parseOperation (cognitive 27) · ×1
  • OperationParser.parseOperation (cognitive 27) source/mlir.js:5023 — OperationParser.parseOperation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 9). Of this number, 18 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TensorLiteralParser.getAttr (cognitive 27) · ×1
  • TensorLiteralParser.getAttr (cognitive 27) source/mlir.js:6485 — TensorLiteralParser.getAttr has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26 (36 pts), boolean chains 13, ternaries 6 (12 pts), loops 2 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (TensorLiteralParser.getAttr::convertElement) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Constraint._parseEnum (cognitive 27) · ×1
  • Constraint._parseEnum (cognitive 27) source/mlir.js:8222 — Constraint._parseEnum has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dialect.parseOperation (cognitive 27) · ×1
  • Dialect.parseOperation (cognitive 27) source/mlir.js:10563 — Dialect.parseOperation has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 10, loops 6 (9 pts), if/else 7 (8 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AffineDialect.parseParallelOp (cognitive 27) · ×1
  • AffineDialect.parseParallelOp (cognitive 27) source/mlir.js:12381 — AffineDialect.parseParallelOp has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 4 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlowDialect.parseTensorLoadStoreOp (cognitive 27) · ×1
  • FlowDialect.parseTensorLoadStoreOp (cognitive 27) source/mlir.js:15061 — FlowDialect.parseTensorLoadStoreOp has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 12). Of this number, 16 points are the body's own statements and 11 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · updateClassifierOutput (cognitive 27) · ×1
  • updateClassifierOutput (cognitive 27) source/coreml.js:1158 — updateClassifierOutput has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (9 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · open (cognitive 27) · ×1
  • open (cognitive 27) source/nnabla.js:17 — open has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (8 pts), ternaries 1 (6 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 17). Of this number, 25 points are the body's own statements and 2 belong to 5 function literals inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _parseGraph (cognitive 27) · ×1
  • _parseGraph (cognitive 27) source/onnx.js:2180 — _parseGraph has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4 (12 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _skipType (cognitive 27) · ×1
  • _skipType (cognitive 27) source/protobuf.js:395 — _skipType has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · constructor (cognitive 27) · ×1
  • constructor (cognitive 27) source/tosa.js:125 — constructor has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (9 pts), if/else 4 (6 pts), loops 2 (nesting depth added 6). Of this number, 23 points are the body's own statements and 4 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Execution.__import__ (cognitive 26) · ×1
  • Execution.__import__ (cognitive 26) source/python.js:21902 — Execution.__import__ has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). Of this number, 15 points are the body's own statements and 11 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VectorDialect.parseTransferOp (cognitive 26) · ×1
  • VectorDialect.parseTransferOp (cognitive 26) source/mlir.js:12897 — VectorDialect.parseTransferOp has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 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.
D2 · Cognitive Complexity · NVVMDialect.parseOperation (cognitive 26) · ×1
  • NVVMDialect.parseOperation (cognitive 26) source/mlir.js:21100 — NVVMDialect.parseOperation has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LLVMDialect.getInsertExtractValueElementType (cognitive 26) · ×1
  • LLVMDialect.getInsertExtractValueElementType (cognitive 26) source/mlir.js:22500 — LLVMDialect.getInsertExtractValueElementType has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, loops 2 (4 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.
D2 · Cognitive Complexity · LLVMDialect.parseLLVMCallIntrinsicOp (cognitive 26) · ×1
  • LLVMDialect.parseLLVMCallIntrinsicOp (cognitive 26) source/mlir.js:23134 — LLVMDialect.parseLLVMCallIntrinsicOp has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (15 pts), if/else 5 (11 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · TextParamReader.constructor (cognitive 26) · ×1
  • TextParamReader.constructor (cognitive 26) source/ncnn.js:945 — TextParamReader.constructor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (11 pts), ternaries 3 (9 pts), loops 3 (5 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.
D2 · Cognitive Complexity · Node.constructor (cognitive 26) · ×1
  • Node.constructor (cognitive 26) source/qnn.js:176 — Node.constructor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, loops 4 (6 pts), ternaries 4 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · decodeJson (cognitive 26) · ×1
  • decodeJson (cognitive 26) source/tf-proto.js:1901 — decodeJson has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, ternaries 4 (8 pts) (nesting depth added 4). Of this number, 24 points are the body's own statements and 2 belong to 15 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · metrics (cognitive 26) · ×1
  • metrics (cognitive 26) REDACTED:6575 — metrics has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 2 (8 pts), boolean chains 6, if/else 3 (6 pts), loops 2 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextReader._entityReference (cognitive 25) · ×1
  • TextReader._entityReference (cognitive 25) source/xml.js:890 — TextReader._entityReference has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FindSidebar.render (cognitive 25) · ×1
  • FindSidebar.render (cognitive 25) REDACTED:5108 — FindSidebar.render has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 5158, 5129, 5206, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · OperationParser.parseBlock (cognitive 25) · ×1
  • OperationParser.parseBlock (cognitive 25) source/mlir.js:5319 — OperationParser.parseBlock has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, 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.
D2 · Cognitive Complexity · MemRefDialect.parseOperation (cognitive 25) · ×1
  • MemRefDialect.parseOperation (cognitive 25) source/mlir.js:12507 — MemRefDialect.parseOperation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 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.
D2 · Cognitive Complexity · VectorDialect.parseOperation (cognitive 25) · ×1
  • VectorDialect.parseOperation (cognitive 25) source/mlir.js:12708 — VectorDialect.parseOperation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TorchDialect.parseOperation (cognitive 25) · ×1
  • TorchDialect.parseOperation (cognitive 25) source/mlir.js:13314 — TorchDialect.parseOperation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IREEDialect.parseShapedFunctionType (cognitive 25) · ×1
  • IREEDialect.parseShapedFunctionType (cognitive 25) source/mlir.js:13434 — IREEDialect.parseShapedFunctionType has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 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.
D2 · Cognitive Complexity · QuantDialect.parseUniformType (cognitive 25) · ×1
  • QuantDialect.parseUniformType (cognitive 25) source/mlir.js:16969 — QuantDialect.parseUniformType has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (5 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 9). Of this number, 18 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XeGPUDialect.parseOptionalDynamicIndexList (cognitive 25) · ×1
  • XeGPUDialect.parseOptionalDynamicIndexList (cognitive 25) source/mlir.js:17410 — XeGPUDialect.parseOptionalDynamicIndexList has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · EmitCDialect.parseOperation (cognitive 25) · ×1
  • EmitCDialect.parseOperation (cognitive 25) source/mlir.js:19153 — EmitCDialect.parseOperation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TFExecutorDialect.parseOperation (cognitive 25) · ×1
  • TFExecutorDialect.parseOperation (cognitive 25) source/mlir.js:24175 — TFExecutorDialect.parseOperation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelFactory.match (cognitive 25) · ×1
  • ModelFactory.match (cognitive 25) source/tnn.js:6 — ModelFactory.match has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _parseModel (cognitive 25) · ×1
  • _parseModel (cognitive 25) source/onnx.js:2127 — _parseModel has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 3 (7 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · constructor (cognitive 25) · ×1
  • constructor (cognitive 25) source/xmodel.js:41 — constructor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (7 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 12). Of this number, 24 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tensor._decodeValues (cognitive 24) · ×1
  • Tensor._decodeValues (cognitive 24) source/base.js:1209 — Tensor._decodeValues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (7 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Group._decodeGroups (cognitive 24) · ×1
  • Group._decodeGroups (cognitive 24) source/hdf5.js:155 — Group._decodeGroups has cognitive complexity 24 (threshold 15). Drivers by points: loops 3 (12 pts), if/else 5 (11 pts), boolean chains 1 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Graph.scrollTo (cognitive 24) · ×1
  • Graph.scrollTo (cognitive 24) REDACTED:2701 — Graph.scrollTo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelFactoryService._openContext (cognitive 24) · ×1
  • ModelFactoryService._openContext (cognitive 24) REDACTED:7711 — ModelFactoryService._openContext has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, error handling 1 (3 pts), loops 1 (nesting depth added 11). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dialect.parsePropertiesFromKeyValueList (cognitive 24) · ×1
  • Dialect.parsePropertiesFromKeyValueList (cognitive 24) source/mlir.js:9602 — Dialect.parsePropertiesFromKeyValueList has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HLODialect.parseSliceRanges (cognitive 24) · ×1
  • HLODialect.parseSliceRanges (cognitive 24) source/mlir.js:11430 — HLODialect.parseSliceRanges has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (3 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · StreamDialect.parseEncodedShapedResultList (cognitive 24) · ×1
  • StreamDialect.parseEncodedShapedResultList (cognitive 24) source/mlir.js:15509 — StreamDialect.parseEncodedShapedResultList has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MhloDialect.parseOperation (cognitive 24) · ×1
  • MhloDialect.parseOperation (cognitive 24) source/mlir.js:16685 — MhloDialect.parseOperation has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (21 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.
D2 · Cognitive Complexity · TosaDialect.parseOperation (cognitive 24) · ×1
  • TosaDialect.parseOperation (cognitive 24) source/mlir.js:17125 — TosaDialect.parseOperation has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (8 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SparseTensorDialect.parseIterateOp (cognitive 24) · ×1
  • SparseTensorDialect.parseIterateOp (cognitive 24) source/mlir.js:20338 — SparseTensorDialect.parseIterateOp has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LLVMDialect.parseLLVMLoadOp (cognitive 24) · ×1
  • LLVMDialect.parseLLVMLoadOp (cognitive 24) source/mlir.js:22757 — LLVMDialect.parseLLVMLoadOp has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Model.constructor (cognitive 24) · ×1
  • Model.constructor (cognitive 24) source/litertlm.js:94 — Model.constructor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). Of this number, 12 points are the body's own statements and 12 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextReader.open (cognitive 24) · ×1
  • TextReader.open (cognitive 24) source/onnx.js:2060 — TextReader.open has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 1 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Entries.read (cognitive 24) · ×1
  • Entries.read (cognitive 24) source/paddle.js:654 — Entries.read has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _stringify (cognitive 24) · ×1
  • _stringify (cognitive 24) source/base.js:1251 — _stringify has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (6 pts), ternaries 1 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · decodeJson (cognitive 24) · ×1
  • decodeJson (cognitive 24) source/onnx-proto.js:170 — decodeJson has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, ternaries 3 (6 pts) (nesting depth added 3). Of this number, 22 points are the body's own statements and 2 belong to 9 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Execution.import (cognitive 23) · ×1
  • Execution.import (cognitive 23) source/python.js:21843 — Execution.import has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.build (cognitive 23) · ×1
  • Graph.build (cognitive 23) source/grapher.js:106 — Graph.build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, loops 3 (nesting depth added 7). Of this number, 17 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Reader.read (cognitive 23) · ×1
  • Reader.read (cognitive 23) source/gguf.js:793 — Reader.read has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer.lexString (cognitive 23) · ×1
  • Lexer.lexString (cognitive 23) source/mlir.js:2702 — Lexer.lexString has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 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.
D2 · Cognitive Complexity · Parser.parseAttribute (cognitive 23) · ×1
  • Parser.parseAttribute (cognitive 23) source/mlir.js:3735 — Parser.parseAttribute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · HALDialect.parseTargetConditionObjects (cognitive 23) · ×1
  • HALDialect.parseTargetConditionObjects (cognitive 23) source/mlir.js:14219 — HALDialect.parseTargetConditionObjects has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (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.
D2 · Cognitive Complexity · StreamDialect.parseShapedTypeList (cognitive 23) · ×1
  • StreamDialect.parseShapedTypeList (cognitive 23) source/mlir.js:15266 — StreamDialect.parseShapedTypeList has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Context.createType (cognitive 23) · ×1
  • Context.createType (cognitive 23) source/onnx.js:925 — Context.createType has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 8, boolean chains 5 (nesting depth added 6). Of this number, 15 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Container.open (cognitive 23) · ×1
  • Container.open (cognitive 23) source/tensorrt.js:124 — Container.open has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _HTTPRequestHandler.do_GET (cognitive 23) · ×1
  • _HTTPRequestHandler.do_GET (cognitive 23) source/server.py:67 — _HTTPRequestHandler.do_GET has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 1, ternaries 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · getFloat8e5m2 (cognitive 23) · ×1
  • getFloat8e5m2 (cognitive 23) source/base.js:206 — getFloat8e5m2 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 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.
D2 · Cognitive Complexity · scrollTo (cognitive 23) · ×1
  • scrollTo (cognitive 23) REDACTED:878 — scrollTo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (9 pts), boolean chains 4 (nesting depth added 11). Of this number, 15 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _next (cognitive 23) · ×1
  • _next (cognitive 23) source/xml.js:1084 — _next has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 11 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · package.test (cognitive 22) · ×1
  • package.test (cognitive 22) REDACTED:518 — package.test has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (7 pts), boolean chains 6, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Execution.call (cognitive 22) · ×1
  • Execution.call (cognitive 22) source/python.js:22010 — Execution.call has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Execution.target (cognitive 22) · ×1
  • Execution.target (cognitive 22) source/python.js:22393 — Execution.target has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Context.constructor (cognitive 22) · ×1
  • Context.constructor (cognitive 22) source/coreml.js:532 — Context.constructor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dataspace.constructor (cognitive 22) · ×1
  • Dataspace.constructor (cognitive 22) source/hdf5.js:876 — Dataspace.constructor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (10 pts), boolean chains 1, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FindSidebar._update (cognitive 22) · ×1
  • FindSidebar._update (cognitive 22) REDACTED:5079 — FindSidebar._update has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 3 (5 pts), ternaries 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Container._model4 (cognitive 22) · ×1
  • Container._model4 (cognitive 22) source/dlc.js:426 — Container._model4 has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 3 (10 pts), loops 4 (8 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 12). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Context.constructor · ×1
  • Context.constructor::registerSection (cognitive 22) source/gguf.js:1110 — Context.constructor::registerSection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (10 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Utility.valueType (cognitive 22) · ×1
  • Utility.valueType (cognitive 22) source/mlir.js:874 — Utility.valueType has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 8, boolean chains 1 (nesting depth added 7). Of this number, 13 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PropertiesSectionReader.read (cognitive 22) · ×1
  • PropertiesSectionReader.read (cognitive 22) source/mlir.js:7190 — PropertiesSectionReader.read has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (6 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AsukaDialect.parseOperation (cognitive 22) · ×1
  • AsukaDialect.parseOperation (cognitive 22) source/mlir.js:19273 — AsukaDialect.parseOperation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ACCDialect.parseGangClause (cognitive 22) · ×1
  • ACCDialect.parseGangClause (cognitive 22) source/mlir.js:27868 — ACCDialect.parseGangClause has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 3 (5 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.
D2 · Cognitive Complexity · get (cognitive 22) · ×1
  • get (cognitive 22) source/keras.js:1297 — get has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 11). Of this number, 19 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · open (cognitive 22) · ×1
  • open (cognitive 22) source/pytorch.js:1332 — open has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (7 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 10). Of this number, 19 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextReader.skip (cognitive 21) · ×1
  • TextReader.skip (cognitive 21) source/protobuf.js:1073 — TextReader.skip has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CustomOpAsmParser.resolveOperands (cognitive 21) · ×1
  • CustomOpAsmParser.resolveOperands (cognitive 21) source/mlir.js:6274 — CustomOpAsmParser.resolveOperands has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AffineDialect.parseOperation (cognitive 21) · ×1
  • AffineDialect.parseOperation (cognitive 21) source/mlir.js:12092 — AffineDialect.parseOperation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · HALDialect.parseBindings (cognitive 21) · ×1
  • HALDialect.parseBindings (cognitive 21) source/mlir.js:14097 — HALDialect.parseBindings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (7 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtilDialect.parseAssumeIntOp (cognitive 21) · ×1
  • UtilDialect.parseAssumeIntOp (cognitive 21) source/mlir.js:14654 — UtilDialect.parseAssumeIntOp has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · TFExecutorDialect.parseIslandOp (cognitive 21) · ×1
  • TFExecutorDialect.parseIslandOp (cognitive 21) source/mlir.js:24297 — TFExecutorDialect.parseIslandOp has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (9 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TritonGPUDialect.parseOperation (cognitive 21) · ×1
  • TritonGPUDialect.parseOperation (cognitive 21) source/mlir.js:26802 — TritonGPUDialect.parseOperation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Node.constructor (cognitive 21) · ×1
  • Node.constructor (cognitive 21) source/lasagne.js:98 — Node.constructor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelFactory.open (cognitive 21) · ×1
  • ModelFactory.open (cognitive 21) source/litertlm.js:21 — ModelFactory.open has cognitive complexity 21 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (7 pts), boolean chains 2, match/switch 1 (2 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.
D2 · Cognitive Complexity · ModelFactory.match (cognitive 21) · ×1
  • ModelFactory.match (cognitive 21) source/megengine.js:10 — ModelFactory.match has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Container.read (cognitive 21) · ×1
  • Container.read (cognitive 21) source/rknn.js:498 — Container.read has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 1 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Container.signature (cognitive 21) · ×1
  • Container.signature (cognitive 21) source/rknn.js:557 — Container.signature has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _Graph._argument_type (cognitive 21) · ×1
  • _Graph._argument_type (cognitive 21) source/pytorch.py:245 — _Graph._argument_type has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · constructor (cognitive 21) · ×1
  • constructor (cognitive 21) REDACTED:4059 — constructor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, ternaries 3, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · content (cognitive 21) · ×1
  • content (cognitive 21) REDACTED:4252 — content has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). Of this number, 14 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Execution.constructor · ×1
  • Execution.constructor::convertObject (cognitive 20) source/python.js:14175 — Execution.constructor::convertObject has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Execution.constructor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Host._open (cognitive 20) · ×1
  • Host._open (cognitive 20) source/desktop.mjs:470 — Host._open has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (4 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · Container._signature (cognitive 20) · ×1
  • Container._signature (cognitive 20) source/dlc.js:641 — Container._signature has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 1 (3 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · Graph.constructor (cognitive 20) · ×1
  • Graph.constructor (cognitive 20) source/espdl.js:61 — Graph.constructor has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 2 (7 pts), if/else 4 (6 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.
D2 · Cognitive Complexity · Model.constructor (cognitive 20) · ×1
  • Model.constructor (cognitive 20) source/gguf.js:26 — Model.constructor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AffineBinaryOpExpr.printAffineExprInternal (cognitive 20) · ×1
  • AffineBinaryOpExpr.printAffineExprInternal (cognitive 20) source/mlir.js:1421 — AffineBinaryOpExpr.printAffineExprInternal has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (5 pts), boolean chains 4, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BytecodeReader.parseBlockArguments (cognitive 20) · ×1
  • BytecodeReader.parseBlockArguments (cognitive 20) source/mlir.js:7779 — BytecodeReader.parseBlockArguments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Constraint.parseArgumentTokens (cognitive 20) · ×1
  • Constraint.parseArgumentTokens (cognitive 20) source/mlir.js:8335 — Constraint.parseArgumentTokens has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VhloDialect.readAttribute (cognitive 20) · ×1
  • VhloDialect.readAttribute (cognitive 20) source/mlir.js:11956 — VhloDialect.readAttribute has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, loops 2 (4 pts), if/else 2 (3 pts), ternaries 1 (3 pts), match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LinalgDialect.parsePackOp (cognitive 20) · ×1
  • LinalgDialect.parsePackOp (cognitive 20) source/mlir.js:16344 — LinalgDialect.parsePackOp has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 4 (8 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TFGDialect.parseTFGOperation (cognitive 20) · ×1
  • TFGDialect.parseTFGOperation (cognitive 20) source/mlir.js:24106 — TFGDialect.parseTFGOperation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TFRTFallbackAsyncDialect.parseExecuteOpCommon (cognitive 20) · ×1
  • TFRTFallbackAsyncDialect.parseExecuteOpCommon (cognitive 20) source/mlir.js:24634 — TFRTFallbackAsyncDialect.parseExecuteOpCommon has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 3 (5 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.
D2 · Cognitive Complexity · SMTDialect.parseType (cognitive 20) · ×1
  • SMTDialect.parseType (cognitive 20) source/mlir.js:28208 — SMTDialect.parseType has cognitive complexity 20 (threshold 15). Drivers by points: loops 2 (8 pts), if/else 3 (7 pts), ternaries 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NDArray.constructor (cognitive 20) · ×1
  • NDArray.constructor (cognitive 20) source/mxnet.js:698 — NDArray.constructor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (8 pts), match/switch 2 (3 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Metadata.constructor (cognitive 20) · ×1
  • Metadata.constructor (cognitive 20) source/ncnn.js:1161 — Metadata.constructor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ConfigProto.decodeJson (cognitive 20) · ×1
  • ConfigProto.decodeJson (cognitive 20) source/tf-proto.js:8791 — ConfigProto.decodeJson has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · open (cognitive 20) · ×1
  • open (cognitive 20) REDACTED:726 — open has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 4 (6 pts), error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Application._openPath (cognitive 19) · ×1
  • Application._openPath (cognitive 19) source/app.js:208 — Application._openPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Execution.resolve (cognitive 19) · ×1
  • Execution.resolve (cognitive 19) source/python.js:21953 — Execution.resolve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 4 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelFactory.match (cognitive 19) · ×1
  • ModelFactory.match (cognitive 19) source/darknet.js:6 — ModelFactory.match has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 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.
D2 · Cognitive Complexity · TextReader._string (cognitive 19) · ×1
  • TextReader._string (cognitive 19) source/json.js:320 — TextReader._string has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Formatter.tensor (cognitive 19) · ×1
  • Formatter.tensor (cognitive 19) REDACTED:5651 — Formatter.tensor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Package.read (cognitive 19) · ×1
  • Package.read (cognitive 19) source/pytorch.js:1932 — Package.read has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 7). Of this number, 10 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Model.constructor · ×1
  • Model.constructor::collectModules (cognitive 19) source/mlir.js:100 — Model.constructor::collectModules has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (8 pts), if/else 5 (7 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Model.constructor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Model.constructor (cognitive 19) · ×1
  • Model.constructor (cognitive 19) source/mlir.js:91 — Model.constructor has cognitive complexity 19 (threshold 15). Drivers by points: loops 8 (14 pts), if/else 9 (13 pts), boolean chains 9, ternaries 2 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Model.constructor::collectModules) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Parser.parseExtendedSymbol (cognitive 19) · ×1
  • Parser.parseExtendedSymbol (cognitive 19) source/mlir.js:3585 — Parser.parseExtendedSymbol has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.parseCommaSeparatedList (cognitive 19) · ×1
  • Parser.parseCommaSeparatedList (cognitive 19) source/mlir.js:3645 — Parser.parseCommaSeparatedList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TensorLiteralParser.parseList (cognitive 19) · ×1
  • TensorLiteralParser.parseList (cognitive 19) source/mlir.js:6394 — TensorLiteralParser.parseList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts) (nesting depth added 11). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (compareDims). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Dialect.parseEnumFlags (cognitive 19) · ×1
  • Dialect.parseEnumFlags (cognitive 19) source/mlir.js:11086 — Dialect.parseEnumFlags has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HLODialect.parseWindowAttributes (cognitive 19) · ×1
  • HLODialect.parseWindowAttributes (cognitive 19) source/mlir.js:11282 — HLODialect.parseWindowAttributes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, loops 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · StableHLODialect.parseOperation (cognitive 19) · ×1
  • StableHLODialect.parseOperation (cognitive 19) source/mlir.js:11738 — StableHLODialect.parseOperation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AMDGPUDialect.parseMFMAOp (cognitive 19) · ×1
  • AMDGPUDialect.parseMFMAOp (cognitive 19) source/mlir.js:20877 — AMDGPUDialect.parseMFMAOp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 6). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenMPDialect.parseDependVarList (cognitive 19) · ×1
  • OpenMPDialect.parseDependVarList (cognitive 19) source/mlir.js:22128 — OpenMPDialect.parseDependVarList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (6 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SdyDialect.parseTensorShardingAttr (cognitive 19) · ×1
  • SdyDialect.parseTensorShardingAttr (cognitive 19) source/mlir.js:28495 — SdyDialect.parseTensorShardingAttr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Container._openShards (cognitive 19) · ×1
  • Container._openShards (cognitive 19) source/keras.js:1403 — Container._openShards has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (6 pts), ternaries 2 (6 pts), if/else 2 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BinaryParamReader.constructor (cognitive 19) · ×1
  • BinaryParamReader.constructor (cognitive 19) source/ncnn.js:993 — BinaryParamReader.constructor has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 4 (8 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · updateTunnels (cognitive 19) · ×1
  • updateTunnels (cognitive 19) REDACTED:2162 — updateTunnels has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18 (45 pts), boolean chains 16, loops 6 (10 pts), ternaries 2 (3 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _attributeDefinition (cognitive 19) · ×1
  • _attributeDefinition (cognitive 19) source/xml.js:666 — _attributeDefinition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 9 (nesting depth added 6). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Tensor._decodeSparse (cognitive 18) · ×1
  • Tensor._decodeSparse (cognitive 18) source/base.js:970 — Tensor._decodeSparse has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (13 pts), if/else 3 (4 pts), match/switch 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Application._parseCommandLine (cognitive 18) · ×1
  • Application._parseCommandLine (cognitive 18) source/app.js:148 — Application._parseCommandLine has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · dagre.dagre.layout (cognitive 18) · ×1
  • dagre.dagre.layout (cognitive 18) source/dagre.js:8 — dagre.dagre.layout has cognitive complexity 18 (threshold 15). Drivers by points: if/else 195 (520 pts), loops 173 (336 pts), boolean chains 61, ternaries 26 (55 pts), match/switch 4 (14 pts) (nesting depth added 527). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 12 other methods here (dagre.dagre.layout::rank::longestPath, dagre.dagre.layout::rank::networkSimplex::initLowLimValues::dfs, dagre.dagre.layout::removeEmptyRanks, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 13 times rather than 13 independent problems. Splitting this body alone leaves the other 12 exactly as they are. Where these are variations on one operation, the change that clears all 13 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Context.read (cognitive 18) · ×1
  • Context.read (cognitive 18) REDACTED:7028 — Context.read has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelFactoryService._openEntries · ×1
  • ModelFactoryService._openEntries::filter (cognitive 18) REDACTED:7766 — ModelFactoryService._openEntries::filter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Host.view (cognitive 18) · ×1
  • Host.view (cognitive 18) source/desktop.mjs:95 — Host.view has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). None of this is in the body itself: all 18 points belong to 3 function items inside it that branch (consent, telemetry, age). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Host.fetch (cognitive 18) · ×1
  • Host.fetch (cognitive 18) source/desktop.mjs:349 — Host.fetch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 3). None of this is in the body itself: all 18 points belong to 3 function literals inside it that branch (lines 359, 350, 367). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Parser.parseDimensionListRanked (cognitive 18) · ×1
  • Parser.parseDimensionListRanked (cognitive 18) source/mlir.js:3300 — Parser.parseDimensionListRanked has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.parseMemRefType (cognitive 18) · ×1
  • Parser.parseMemRefType (cognitive 18) source/mlir.js:3363 — Parser.parseMemRefType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DialectReader.readAPFloatWithKnownSemantics (cognitive 18) · ×1
  • DialectReader.readAPFloatWithKnownSemantics (cognitive 18) source/mlir.js:6882 — DialectReader.readAPFloatWithKnownSemantics has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 6 (8 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VectorDialect.inferResultTypes (cognitive 18) · ×1
  • VectorDialect.inferResultTypes (cognitive 18) source/mlir.js:12957 — VectorDialect.inferResultTypes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 1 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ValueTensorType.parse (cognitive 18) · ×1
  • ValueTensorType.parse (cognitive 18) source/mlir.js:13052 — ValueTensorType.parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), 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. This shape REPEATS in the file: one other method here (NonValueTensorType.parse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · NonValueTensorType.parse (cognitive 18) · ×1
  • NonValueTensorType.parse (cognitive 18) source/mlir.js:13107 — NonValueTensorType.parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), 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. This shape REPEATS in the file: one other method here (ValueTensorType.parse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · TorchDialect.parseDefaultTorchOp (cognitive 18) · ×1
  • TorchDialect.parseDefaultTorchOp (cognitive 18) source/mlir.js:13383 — TorchDialect.parseDefaultTorchOp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IREEDialect.parseWorkgroupCountRegion (cognitive 18) · ×1
  • IREEDialect.parseWorkgroupCountRegion (cognitive 18) source/mlir.js:13581 — IREEDialect.parseWorkgroupCountRegion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlowDialect.parseDispatchWorkgroupsOp (cognitive 18) · ×1
  • FlowDialect.parseDispatchWorkgroupsOp (cognitive 18) source/mlir.js:14928 — FlowDialect.parseDispatchWorkgroupsOp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (5 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.
D2 · Cognitive Complexity · LinalgDialect.parseUnpackOp (cognitive 18) · ×1
  • LinalgDialect.parseUnpackOp (cognitive 18) source/mlir.js:16417 — LinalgDialect.parseUnpackOp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (8 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WasmSSADialect.inferResultTypes (cognitive 18) · ×1
  • WasmSSADialect.inferResultTypes (cognitive 18) source/mlir.js:18726 — WasmSSADialect.inferResultTypes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TritonNvidiaGPUDialect.parseBarriersAndPreds (cognitive 18) · ×1
  • TritonNvidiaGPUDialect.parseBarriersAndPreds (cognitive 18) source/mlir.js:26946 — TritonNvidiaGPUDialect.parseBarriersAndPreds has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TensorRTDialect.parseForOp (cognitive 18) · ×1
  • TensorRTDialect.parseForOp (cognitive 18) source/mlir.js:27219 — TensorRTDialect.parseForOp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · XtenNNDialect.parseSubgraphOp (cognitive 18) · ×1
  • XtenNNDialect.parseSubgraphOp (cognitive 18) source/mlir.js:29127 — XtenNNDialect.parseSubgraphOp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelFactory.match (cognitive 18) · ×1
  • ModelFactory.match (cognitive 18) source/sklearn.js:8 — ModelFactory.match has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 7). Of this number, 16 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Experimental.decodeJson (cognitive 18) · ×1
  • Experimental.decodeJson (cognitive 18) source/tf-proto.js:8073 — Experimental.decodeJson has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · fetch (cognitive 18) · ×1
  • fetch (cognitive 18) REDACTED:648 — fetch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch ((anonymous)::onload, (anonymous)::onerror, a function literal at line 656). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · entries (cognitive 18) · ×1
  • entries (cognitive 18) source/executorch.js:1055 — entries has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 6 (8 pts), ternaries 1 (nesting depth added 5). Of this number, 12 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · constructor (cognitive 18) · ×1
  • constructor (cognitive 18) source/pytorch.js:2420 — constructor has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 5, if/else 3 (5 pts), loops 3, ternaries 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 9 function items inside it that branch (map, a function literal at line 2449, map::__reduce__, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · decodeJson (cognitive 18) · ×1
  • decodeJson (cognitive 18) source/tf-proto.js:4884 — decodeJson has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _name (cognitive 18) · ×1
  • _name (cognitive 18) source/xml.js:521 — _name has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BinaryReader.string (cognitive 17) · ×1
  • BinaryReader.string (cognitive 17) source/flatbuffers.js:110 — BinaryReader.string has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BinaryReader.signature (cognitive 17) · ×1
  • BinaryReader.signature (cognitive 17) source/protobuf.js:24 — BinaryReader.signature has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelSidebar.render (cognitive 17) · ×1
  • ModelSidebar.render (cognitive 17) REDACTED:4610 — ModelSidebar.render has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 2 (4 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.
D2 · Cognitive Complexity · Container._list (cognitive 17) · ×1
  • Container._list (cognitive 17) REDACTED:6533 — Container._list has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Utility.unpack (cognitive 17) · ×1
  • Utility.unpack (cognitive 17) source/pytorch.js:2061 — Utility.unpack has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Context._classifyTensorGroups (cognitive 17) · ×1
  • Context._classifyTensorGroups (cognitive 17) source/gguf.js:1409 — Context._classifyTensorGroups has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HLODialect.parseDims (cognitive 17) · ×1
  • HLODialect.parseDims (cognitive 17) source/mlir.js:11250 — HLODialect.parseDims has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (3 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FlowDialect.parseShapedOperandList (cognitive 17) · ×1
  • FlowDialect.parseShapedOperandList (cognitive 17) source/mlir.js:15177 — FlowDialect.parseShapedOperandList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StreamDialect.parseWorkgroupCountRegion (cognitive 17) · ×1
  • StreamDialect.parseWorkgroupCountRegion (cognitive 17) source/mlir.js:15595 — StreamDialect.parseWorkgroupCountRegion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PtrDialect.inferResultTypes (cognitive 17) · ×1
  • PtrDialect.inferResultTypes (cognitive 17) source/mlir.js:19093 — PtrDialect.inferResultTypes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoreRTDialect.parseOperation (cognitive 17) · ×1
  • CoreRTDialect.parseOperation (cognitive 17) source/mlir.js:24362 — CoreRTDialect.parseOperation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Metadata.type (cognitive 17) · ×1
  • Metadata.type (cognitive 17) source/onnx.js:1375 — Metadata.type has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 1 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Pickle.constructor · ×1
  • Pickle.constructor::filter (cognitive 17) source/paddle.js:710 — Pickle.constructor::filter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 1 (4 pts), boolean chains 3, loops 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. This shape REPEATS in the file: one other method here (Pickle.constructor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Pickle.constructor (cognitive 17) · ×1
  • Pickle.constructor (cognitive 17) source/paddle.js:697 — Pickle.constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (28 pts), boolean chains 6, ternaries 1 (5 pts), loops 1 (3 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. This shape REPEATS in the file: one other method here (Pickle.constructor::filter) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · IR.block (cognitive 17) · ×1
  • IR.block (cognitive 17) source/paddle.js:976 — IR.block has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (5 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Model.constructor (cognitive 17) · ×1
  • Model.constructor (cognitive 17) source/sklearn.js:49 — Model.constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FunctionDef.decodeJson (cognitive 17) · ×1
  • FunctionDef.decodeJson (cognitive 17) source/tf-proto.js:1231 — FunctionDef.decodeJson has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 7 (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.
D2 · Cognitive Complexity · SavedObject.decodeJson (cognitive 17) · ×1
  • SavedObject.decodeJson (cognitive 17) source/tf-proto.js:3740 — SavedObject.decodeJson has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NodeExecStats.decodeJson (cognitive 17) · ×1
  • NodeExecStats.decodeJson (cognitive 17) source/tf-proto.js:11090 — NodeExecStats.decodeJson has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · server._make_port (cognitive 17) · ×1
  • server._make_port (cognitive 17) source/server.py:206 — server._make_port has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (5 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 17) · ×1
  • constructor (cognitive 17) source/tf.js:858 — constructor has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (6 pts), ternaries 5, boolean chains 4, if/else 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · start (cognitive 17) · ×1
  • start (cognitive 17) source/desktop.mjs:157 — start has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 4, boolean chains 2 (nesting depth added 1). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 24 function literals inside it that branch (lines 229, 187, 260, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MenuService._updateLabel (cognitive 16) · ×1
  • MenuService._updateLabel (cognitive 16) source/app.js:1070 — MenuService._updateLabel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Execution.invoke (cognitive 16) · ×1
  • Execution.invoke (cognitive 16) source/python.js:21985 — Execution.invoke has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graph.program · ×1
  • Graph.program::convertValue (cognitive 16) source/coreml.js:1246 — Graph.program::convertValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (Graph.program) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Tree.constructor (cognitive 16) · ×1
  • Tree.constructor (cognitive 16) source/hdf5.js:1655 — Tree.constructor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (7 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Graph.find (cognitive 16) · ×1
  • Graph.find (cognitive 16) REDACTED:1949 — Graph.find has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Container.open (cognitive 16) · ×1
  • Container.open (cognitive 16) REDACTED:6497 — Container.open has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Utility.dataType (cognitive 16) · ×1
  • Utility.dataType (cognitive 16) source/mlir.js:808 — Utility.dataType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · AssemblyFormatParser.parseParenList · ×1
  • AssemblyFormatParser.parseParenList::parseElement (cognitive 16) source/mlir.js:8715 — AssemblyFormatParser.parseParenList::parseElement has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IREEDialect.parseSymbolAlias (cognitive 16) · ×1
  • IREEDialect.parseSymbolAlias (cognitive 16) source/mlir.js:13538 — IREEDialect.parseSymbolAlias has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StreamDialect.parseExplicitResourceRegion (cognitive 16) · ×1
  • StreamDialect.parseExplicitResourceRegion (cognitive 16) source/mlir.js:15303 — StreamDialect.parseExplicitResourceRegion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (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.
D2 · Cognitive Complexity · LinalgDialect.parseMapOp (cognitive 16) · ×1
  • LinalgDialect.parseMapOp (cognitive 16) source/mlir.js:16289 — LinalgDialect.parseMapOp has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransformDialect.parseApplyRegisteredPassOptions (cognitive 16) · ×1
  • TransformDialect.parseApplyRegisteredPassOptions (cognitive 16) source/mlir.js:25829 — TransformDialect.parseApplyRegisteredPassOptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemDescType.parse (cognitive 16) · ×1
  • MemDescType.parse (cognitive 16) source/mlir.js:26748 — MemDescType.parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (16 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ACCDialect.parseWaitClause (cognitive 16) · ×1
  • ACCDialect.parseWaitClause (cognitive 16) source/mlir.js:27763 — ACCDialect.parseWaitClause has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ModelHeader.constructor (cognitive 16) · ×1
  • ModelHeader.constructor (cognitive 16) source/mlnet.js:393 — ModelHeader.constructor has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (10 pts), if/else 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Model.constructor (cognitive 16) · ×1
  • Model.constructor (cognitive 16) source/mxnet.js:234 — Model.constructor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProtoReader.open · ×1
  • ProtoReader.open::match (cognitive 16) source/onnx.js:1511 — ProtoReader.open::match has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 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. This shape REPEATS in the file: one other method here (ProtoReader.open) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ModelFactory.match (cognitive 16) · ×1
  • ModelFactory.match (cognitive 16) source/paddle.js:11 — ModelFactory.match has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · Node.decodeJson (cognitive 16) · ×1
  • Node.decodeJson (cognitive 16) source/tf-proto.js:10379 — Node.decodeJson has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ModelFactory.match · ×1
  • ModelFactory.match::match (cognitive 16) source/tf.js:48 — ModelFactory.match::match has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 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. This shape REPEATS in the file: one other method here (ModelFactory.match) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · TensorType.constructor (cognitive 16) · ×1
  • TensorType.constructor (cognitive 16) source/xmodel.js:164 — TensorType.constructor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 16) · ×1
  • (anonymous) (cognitive 16) source/index.js:95 — (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 4. Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · decodeJson (cognitive 16) · ×1
  • decodeJson (cognitive 16) source/pytorch-proto.js:521 — decodeJson has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, ternaries 2 (4 pts) (nesting depth added 2). Of this number, 14 points are the body's own statements and 2 belong to 8 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · read (cognitive 16) · ×1
  • read (cognitive 16) source/pytorch.js:1417 — read has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (5 pts), boolean chains 4, loops 3, ternaries 2 (3 pts), error handling 1 (nesting depth added 2). Of this number, 10 points are the body's own statements and 6 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _elementChildren (cognitive 16) · ×1
  • _elementChildren (cognitive 16) source/xml.js:633 — _elementChildren has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · FunctionTooLong · ×1
  • FunctionTooLong: package.publish REDACTED:309 — FunctionTooLong — publish runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× 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.
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: uff-proto.js → caffe-proto.js, caffe2-proto.js, onnx-proto.js, paddle-proto.js, REDACTED source/uff-proto.js — `source/uff-proto.js` changes together with 5 other files — `source/caffe-proto.js`, `source/caffe2-proto.js`, `source/onnx-proto.js`, `source/paddle-proto.js`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: pytorch.py ↔ pytorch_script.py source/pytorch.py:1 — `source/pytorch.py` and `tools/pytorch_script.py` change together 50% of the time (14 of the 28 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `5f466cc7` Update lint rules; `94c2a0e0` Add Ruff; `e97c8a10` Update backend test (#990) — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) tools/onnx_script.py:141 — tools/onnx_script.py:141-171 | tools/onnx_script.py:257-287 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×1
  • Edited copy of a member (16 corresponding lines) tools/onnx_script.py:71 — tools/onnx_script.py:71-86 | tools/onnx_script.py:196-213 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×1
  • Edited copy of a member (5 corresponding lines) tools/onnx_script.py:48 — tools/onnx_script.py:48-53 | tools/onnx_script.py:177-181 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) tools/onnx_script.py:148 — tools/onnx_script.py:148-168 | tools/onnx_script.py:266-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) tools/onnx_script.py:216 — tools/onnx_script.py:216-229 | tools/onnx_script.py:232-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) tools/onnx_script.py:89 — tools/onnx_script.py:89-101 | tools/onnx_script.py:104-116 — 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.
GD1 · Unfinished & placeholder code · Unfinished stub · ×1
  • Unfinished stub — throws a "not implemented" error source/tf-proto.js:13316 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Both branches are identical · ×1
  • Both branches are identical — the condition decides nothing source/flax.js:125 — The `if` and its `else` contain the same statements, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body.
IC1 · Incompleteness & stubs · Unfinished stub · ×1
  • Unfinished stub — throws a "not implemented" exception source/tf-proto.js:13316 — `decodeJson` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking source/grapher.js:275 — `fs.writeFileSync` in `layout` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 144 plain JS — the untyped files are REDACTED, source/acuity.js, source/app.js, source/armnn-schema.js, source/armnn.js, source/barracuda.js (+138 more).
R10 · Code Duplication · Wholesale file copy (328 identical lines × 2 files) · ×1
  • Wholesale file copy (328 identical lines × 2 files) source/circle.js:2 — source/circle.js:2 · source/tflite.js:2 — these 2 files are line-for-line copies of one another — 328 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (137 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (137 matched lines × 2 locations) source/coreml.js:231 — source/coreml.js:231 · source/espresso.js:83 — the two spans are one implementation copied and then locally edited — 1176 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (130 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (130 matched lines × 2 locations) source/mindir.js:51 — source/mindir.js:51 · source/mslite.js:60 — the two spans are one implementation copied and then locally edited — 792 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (120 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (120 matched lines × 2 locations) source/uff-proto.js:64 — source/uff-proto.js:64 · source/uff-proto.js:266 — the two spans are one implementation copied and then locally edited — 599 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (78 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (78 matched lines × 2 locations) source/caffe.js:88 — source/caffe.js:88 · source/caffe2.js:167 — the two spans are one implementation copied and then locally edited — 525 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (76 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (76 matched lines × 2 locations) source/caffe2-proto.js:942 — source/caffe2-proto.js:942 · source/mindir-proto.js:409 — the two spans are one implementation copied and then locally edited — 423 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (60 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (60 matched lines × 2 locations) source/uff-proto.js:10 — source/uff-proto.js:10 · source/xmodel-proto.js:9 — the two spans are one implementation copied and then locally edited — 325 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (59 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (59 matched lines × 2 locations) source/catboost.js:5 — source/catboost.js:5 · source/jax.js:5 — the two spans are one implementation copied and then locally edited — 318 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (58 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (58 matched lines × 2 locations) source/lightgbm.js:44 — source/lightgbm.js:44 · source/xgboost.js:60 — the two spans are one implementation copied and then locally edited — 401 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (58 identical lines × 2 files) · ×1
  • Wholesale file copy (58 identical lines × 2 files) tools/circle-script.js:2 — tools/circle-script.js:2 · tools/tflite-script.js:2 — these 2 files are line-for-line copies of one another — 58 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) source/python.js:264 — source/python.js:264 · source/python.js:404 — the two spans are one implementation copied and then locally edited — 293 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (55 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (55 matched lines × 2 locations) source/dlc.js:149 — source/dlc.js:149 · source/kann.js:62 — the two spans are one implementation copied and then locally edited — 388 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (50 lines × 2 locations) · ×1
  • Duplicated block (50 lines × 2 locations) source/mlir.js:17838 — source/mlir.js:17838 · source/mlir.js:18775 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (49 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (49 matched lines × 2 locations) source/mlnet.js:1608 — source/mlnet.js:1608 · source/mlnet.js:2190 — the two spans are one implementation copied and then locally edited — 328 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (45 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (45 matched lines × 2 locations) source/coreml-proto.js:11754 — source/coreml-proto.js:11754 · source/om-proto.js:985 — the two spans are one implementation copied and then locally edited — 272 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (44 lines × 2 locations) · ×1
  • Duplicated block (44 lines × 2 locations) source/executorch.js:499 — source/executorch.js:499 · source/executorch.js:745 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (44 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (44 matched lines × 2 locations) source/tar.js:89 — source/tar.js:89 · source/zip.js:711 — the two spans are one implementation copied and then locally edited — 290 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (43 lines × 2 locations) · ×1
  • Duplicated block (43 lines × 2 locations) source/python.js:4794 — source/python.js:4794 · source/python.js:4837 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (41 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (41 matched lines × 2 locations) source/coreml-proto.js:10408 — source/coreml-proto.js:10408 · source/mindir-proto.js:900 — the two spans are one implementation copied and then locally edited — 275 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (40 lines × 2 locations) · ×1
  • Duplicated block (40 lines × 2 locations) source/mlir.js:9932 — source/mlir.js:9932 · source/mlir.js:9977 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (34 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (34 matched lines × 2 locations) source/zip.js:595 — source/zip.js:595 · source/zip.js:872 — the two spans are one implementation copied and then locally edited — 188 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) source/mlir.js:16355 — source/mlir.js:16355 · source/mlir.js:16419 — 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 (32 lines × 2 locations) · ×1
  • Duplicated block (32 lines × 2 locations) source/armnn.js:24 — source/armnn.js:24 · source/mnn.js:18 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (31 matched lines × 2 locations) source/pytorch-proto.js:330 — source/pytorch-proto.js:330 · source/pytorch-proto.js:388 — the two spans are one implementation copied and then locally edited — 136 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (30 lines × 2 locations) · ×1
  • Duplicated block (30 lines × 2 locations) source/executorch-schema.js:114 — source/executorch-schema.js:114 · source/executorch-schema.js:1390 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (30 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (30 matched lines × 2 locations) source/tosa.js:363 — source/tosa.js:363 · REDACTED:7962 — the two spans are one implementation copied and then locally edited — 189 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (29 lines × 2 locations) · ×1
  • Duplicated block (29 lines × 2 locations) source/kmodel.js:614 — source/kmodel.js:614 · source/kmodel.js:820 — 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.
R2 · Cyclomatic Complexity · Complex function parseDirective (cyclomatic 315, cognitive 744) · ×1
  • Complex function parseDirective (cyclomatic 315, cognitive 744) source/mlir.js:9649 — parseDirective has cyclomatic complexity 315 and cognitive complexity 744; 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 constructor (cyclomatic 265, cognitive 348) · ×1
  • Complex function constructor (cyclomatic 265, cognitive 348) source/ncnn.js:285 — constructor has cyclomatic complexity 265 and cognitive complexity 348; 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 constructor (cyclomatic 248, cognitive 454) · ×1
  • Complex function constructor (cyclomatic 248, cognitive 454) source/pytorch.js:324 — constructor has cyclomatic complexity 248 and cognitive complexity 454; 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 parseOperation (cyclomatic 206, cognitive 448) · ×1
  • Complex function parseOperation (cyclomatic 206, cognitive 448) source/mlir.js:17902 — parseOperation has cyclomatic complexity 206 and cognitive complexity 448; 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 evaluateValue (cyclomatic 200, cognitive 435) · ×1
  • Complex function evaluateValue (cyclomatic 200, cognitive 435) tools/tablegen.js:979 — evaluateValue has cyclomatic complexity 200 and cognitive complexity 435; 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 constructor (cyclomatic 136, cognitive 256) · ×1
  • Complex function constructor (cyclomatic 136, cognitive 256) source/gguf.js:95 — constructor has cyclomatic complexity 136 and cognitive complexity 256; 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 _parseExpression (cyclomatic 130, cognitive 244) · ×1
  • Complex function _parseExpression (cyclomatic 130, cognitive 244) source/python.js:1078 — _parseExpression has cyclomatic complexity 130 and cognitive complexity 244; 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 next (cyclomatic 124, cognitive 167) · ×1
  • Complex function next (cyclomatic 124, cognitive 167) source/protobuf.js:1124 — next has cyclomatic complexity 124 and cognitive complexity 167; 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 parseOperation (cyclomatic 123, cognitive 81) · ×1
  • Complex function parseOperation (cyclomatic 123, cognitive 81) source/mlir.js:15989 — parseOperation has cyclomatic complexity 123 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function constructor (cyclomatic 121, cognitive 242) · ×1
  • Complex function constructor (cyclomatic 121, cognitive 242) source/darknet.js:81 — constructor has cyclomatic complexity 121 and cognitive complexity 242; 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 constructor (cyclomatic 119, cognitive 243) · ×1
  • Complex function constructor (cyclomatic 119, cognitive 243) source/mlir.js:181 — constructor has cyclomatic complexity 119 and cognitive complexity 243; 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 parseOperation (cyclomatic 116, cognitive 238) · ×1
  • Complex function parseOperation (cyclomatic 116, cognitive 238) source/mlir.js:24920 — parseOperation has cyclomatic complexity 116 and cognitive complexity 238; 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 constructor (cyclomatic 113, cognitive 141) · ×1
  • Complex function constructor (cyclomatic 113, cognitive 141) source/openvino.js:503 — constructor has cyclomatic complexity 113 and cognitive complexity 141; 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 parseOperation (cyclomatic 112, cognitive 266) · ×1
  • Complex function parseOperation (cyclomatic 112, cognitive 266) source/mlir.js:13672 — parseOperation has cyclomatic complexity 112 and cognitive complexity 266; 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 inferResultTypes (cyclomatic 111, cognitive 385) · ×1
  • Complex function inferResultTypes (cyclomatic 111, cognitive 385) source/mlir.js:9360 — inferResultTypes has cyclomatic complexity 111 and cognitive complexity 385; 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 schema (cyclomatic 111, cognitive 270) · ×1
  • Complex function schema (cyclomatic 111, cognitive 270) tools/mlir-script.js:50 — schema has cyclomatic complexity 111 and cognitive complexity 270; 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 getEnumCases (cyclomatic 109, cognitive 318) · ×1
  • Complex function getEnumCases (cyclomatic 109, cognitive 318) tools/tablegen.js:731 — getEnumCases has cyclomatic complexity 109 and cognitive complexity 318; 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 constructor (cyclomatic 106, cognitive 174) · ×1
  • Complex function constructor (cyclomatic 106, cognitive 174) source/keras.js:908 — constructor has cyclomatic complexity 106 and cognitive complexity 174; 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 load (cyclomatic 104, cognitive 98) · ×1
  • Complex function load (cyclomatic 104, cognitive 98) source/python.js:3902 — load has cyclomatic complexity 104 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function read (cyclomatic 99, cognitive 281) · ×1
  • Complex function read (cyclomatic 99, cognitive 281) source/xml.js:33 — read has cyclomatic complexity 99 and cognitive complexity 281; 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 _add (cyclomatic 99, cognitive 100) · ×1
  • Complex function _add (cyclomatic 99, cognitive 100) REDACTED:2825 — _add has cyclomatic complexity 99 and cognitive complexity 100; 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 _parseStatement (cyclomatic 94, cognitive 133) · ×1
  • Complex function _parseStatement (cyclomatic 94, cognitive 133) source/python.js:753 — _parseStatement has cyclomatic complexity 94 and cognitive complexity 133; 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 open (cyclomatic 88, cognitive 208) · ×1
  • Complex function open (cyclomatic 88, cognitive 208) source/keras.js:79 — open has cyclomatic complexity 88 and cognitive complexity 208; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _decodeData (cyclomatic 81, cognitive 111) · ×1
  • Complex function _decodeData (cyclomatic 81, cognitive 111) source/base.js:1006 — _decodeData has cyclomatic complexity 81 and cognitive complexity 111; 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 extractTraitsFromList (cyclomatic 80, cognitive 188) · ×1
  • Complex function extractTraitsFromList (cyclomatic 80, cognitive 188) tools/mlir-script.js:764 — extractTraitsFromList has cyclomatic complexity 80 and cognitive complexity 188; 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 match (cyclomatic 80, cognitive 147) · ×1
  • Complex function match (cyclomatic 80, cognitive 147) source/tf.js:12 — match has cyclomatic complexity 80 and cognitive complexity 147; 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 updateTorchScript (cyclomatic 80, cognitive 100) · ×1
  • Complex function updateTorchScript (cyclomatic 80, cognitive 100) source/tf.js:1907 — updateTorchScript has cyclomatic complexity 80 and cognitive complexity 100; 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 constructor (cyclomatic 78, cognitive 166) · ×1
  • Complex function constructor (cyclomatic 78, cognitive 166) source/pytorch.js:74 — constructor has cyclomatic complexity 78 and cognitive complexity 166; 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 constructor (cyclomatic 75, cognitive 205) · ×1
  • Complex function constructor (cyclomatic 75, cognitive 205) source/keras.js:524 — constructor has cyclomatic complexity 75 and cognitive complexity 205; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 constructor (cyclomatic 73, cognitive 146) · ×1
  • Complex function constructor (cyclomatic 73, cognitive 146) source/mlir.js:490 — constructor has cyclomatic complexity 73 and cognitive complexity 146; 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 constructor (cyclomatic 72, cognitive 100) · ×1
  • Complex function constructor (cyclomatic 72, cognitive 100) source/tnn.js:134 — constructor has cyclomatic complexity 72 and cognitive complexity 100; 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 peek (cyclomatic 71, cognitive 224) · ×1
  • Complex function peek (cyclomatic 71, cognitive 224) REDACTED:6783 — peek has cyclomatic complexity 71 and cognitive complexity 224; 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 _tokenizeInline (cyclomatic 70, cognitive 158) · ×1
  • Complex function _tokenizeInline (cyclomatic 70, cognitive 158) REDACTED:5955 — _tokenizeInline has cyclomatic complexity 70 and cognitive complexity 158; 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 _format (cyclomatic 69, cognitive 74) · ×1
  • Complex function _format (cyclomatic 69, cognitive 74) REDACTED:5526 — _format has cyclomatic complexity 69 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.
R2 · Cyclomatic Complexity · Complex function order (cyclomatic 66, cognitive 194) · ×1
  • Complex function order (cyclomatic 66, cognitive 194) source/dagre.js:895 — order has cyclomatic complexity 66 and cognitive complexity 194; 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 constructor (cyclomatic 63, cognitive 155) · ×1
  • Complex function constructor (cyclomatic 63, cognitive 155) source/mxnet.js:459 — constructor has cyclomatic complexity 63 and cognitive complexity 155; 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 constructor (cyclomatic 63, cognitive 93) · ×1
  • Complex function constructor (cyclomatic 63, cognitive 93) source/onnx.js:440 — constructor has cyclomatic complexity 63 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function read (cyclomatic 62, cognitive 143) · ×1
  • Complex function read (cyclomatic 62, cognitive 143) source/kmodel.js:254 — read has cyclomatic complexity 62 and cognitive complexity 143; 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 weights (cyclomatic 62, cognitive 115) · ×1
  • Complex function weights (cyclomatic 62, cognitive 115) source/pickle.js:317 — weights has cyclomatic complexity 62 and cognitive complexity 115; 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 constructor (cyclomatic 61, cognitive 147) · ×1
  • Complex function constructor (cyclomatic 61, cognitive 147) source/mxnet.js:268 — constructor has cyclomatic complexity 61 and cognitive complexity 147; 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.
R3 · Large Files · source/coreml-proto.js · ×1
  • source/coreml-proto.js: 17014 lines of code source/coreml-proto.js:1 — source/coreml-proto.js has 17014 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/tf-proto.js · ×1
  • source/tf-proto.js: 12514 lines of code source/tf-proto.js:1 — source/tf-proto.js has 12514 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/nnabla-proto.js · ×1
  • source/nnabla-proto.js: 11537 lines of code source/nnabla-proto.js:1 — source/nnabla-proto.js has 11537 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 7634 lines of code REDACTED:1 — REDACTED has 7634 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/caffe-proto.js · ×1
  • source/caffe-proto.js: 4927 lines of code source/caffe-proto.js:1 — source/caffe-proto.js has 4927 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/mslite-schema.js · ×1
  • source/mslite-schema.js: 3884 lines of code source/mslite-schema.js:1 — source/mslite-schema.js has 3884 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/tflite-schema.js · ×1
  • source/tflite-schema.js: 3422 lines of code source/tflite-schema.js:1 — source/tflite-schema.js has 3422 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · tools/tablegen.js · ×1
  • tools/tablegen.js: 3374 lines of code tools/tablegen.js:1 — tools/tablegen.js has 3374 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/circle-schema.js · ×1
  • source/circle-schema.js: 3112 lines of code source/circle-schema.js:1 — source/circle-schema.js has 3112 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/mnn-schema.js · ×1
  • source/mnn-schema.js: 3016 lines of code source/mnn-schema.js:1 — source/mnn-schema.js has 3016 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/onnx.js · ×1
  • source/onnx.js: 2711 lines of code source/onnx.js:1 — source/onnx.js has 2711 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/pytorch.js · ×1
  • source/pytorch.js: 2683 lines of code source/pytorch.js:1 — source/pytorch.js has 2683 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/armnn-schema.js · ×1
  • source/armnn-schema.js: 2643 lines of code source/armnn-schema.js:1 — source/armnn-schema.js has 2643 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/onnx-proto.js · ×1
  • source/onnx-proto.js: 2540 lines of code source/onnx-proto.js:1 — source/onnx-proto.js has 2540 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/dagre.js · ×1
  • source/dagre.js: 2396 lines of code source/dagre.js:1 — source/dagre.js has 2396 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/tf.js · ×1
  • source/tf.js: 2147 lines of code source/tf.js:1 — source/tf.js has 2147 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/kmodel.js · ×1
  • source/kmodel.js: 2136 lines of code source/kmodel.js:1 — source/kmodel.js has 2136 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/megengine-schema.js · ×1
  • source/megengine-schema.js: 2074 lines of code source/megengine-schema.js:1 — source/megengine-schema.js has 2074 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/mlnet.js · ×1
  • source/mlnet.js: 2039 lines of code source/mlnet.js:1 — source/mlnet.js has 2039 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/tosa-schema.js · ×1
  • source/tosa-schema.js: 1923 lines of code source/tosa-schema.js:1 — source/tosa-schema.js has 1923 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/hdf5.js · ×1
  • source/hdf5.js: 1691 lines of code source/hdf5.js:1 — source/hdf5.js has 1691 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/caffe2-proto.js · ×1
  • source/caffe2-proto.js: 1644 lines of code source/caffe2-proto.js:1 — source/caffe2-proto.js has 1644 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/xml.js · ×1
  • source/xml.js: 1583 lines of code source/xml.js:1 — source/xml.js has 1583 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/paddle-proto.js · ×1
  • source/paddle-proto.js: 1548 lines of code source/paddle-proto.js:1 — source/paddle-proto.js has 1548 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/xmodel-proto.js · ×1
  • source/xmodel-proto.js: 1503 lines of code source/xmodel-proto.js:1 — source/xmodel-proto.js has 1503 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/coreml.js · ×1
  • source/coreml.js: 1496 lines of code source/coreml.js:1 — source/coreml.js has 1496 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1481 lines of code REDACTED:1 — REDACTED has 1481 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/keras.js · ×1
  • source/keras.js: 1445 lines of code source/keras.js:1 — source/keras.js has 1445 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/base.js · ×1
  • source/base.js: 1406 lines of code source/base.js:1 — source/base.js has 1406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/gguf.js · ×1
  • source/gguf.js: 1393 lines of code source/gguf.js:1 — source/gguf.js has 1393 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/mindir-proto.js · ×1
  • source/mindir-proto.js: 1384 lines of code source/mindir-proto.js:1 — source/mindir-proto.js has 1384 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/paddle.js · ×1
  • source/paddle.js: 1349 lines of code source/paddle.js:1 — source/paddle.js has 1349 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/protobuf.js · ×1
  • source/protobuf.js: 1300 lines of code source/protobuf.js:1 — source/protobuf.js has 1300 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · tools/flatc.js · ×1
  • tools/flatc.js: 1293 lines of code tools/flatc.js:1 — tools/flatc.js has 1293 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · tools/mlir-script.js · ×1
  • tools/mlir-script.js: 1263 lines of code tools/mlir-script.js:1 — tools/mlir-script.js has 1263 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/executorch-schema.js · ×1
  • source/executorch-schema.js: 1262 lines of code source/executorch-schema.js:1 — source/executorch-schema.js has 1262 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/executorch.js · ×1
  • source/executorch.js: 1202 lines of code source/executorch.js:1 — source/executorch.js has 1202 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/ncnn.js · ×1
  • source/ncnn.js: 1171 lines of code source/ncnn.js:1 — source/ncnn.js has 1171 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/cntk.js · ×1
  • source/cntk.js: 1067 lines of code source/cntk.js:1 — source/cntk.js has 1067 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · source/app.js · ×1
  • source/app.js: 1021 lines of code source/app.js:1 — source/app.js has 1021 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No typecheck script · ×1
  • No typecheck script — test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~18441 LoC) · ×1
  • Dead file (~18441 LoC) source/coreml-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~13369 LoC) · ×1
  • Dead file (~13369 LoC) source/tf-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (tools/tf-script.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~12407 LoC) · ×1
  • Dead file (~12407 LoC) source/nnabla-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~5221 LoC) · ×1
  • Dead file (~5221 LoC) source/caffe-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~4600 LoC) · ×1
  • Dead file (~4600 LoC) source/mslite-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~3675 LoC) · ×1
  • Dead file (~3675 LoC) source/circle-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~3495 LoC) · ×1
  • Dead file (~3495 LoC) tools/tablegen.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (tools/mlir-script.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~3418 LoC) · ×1
  • Dead file (~3418 LoC) source/mnn-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~3085 LoC) · ×1
  • Dead file (~3085 LoC) source/armnn-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~2429 LoC) · ×1
  • Dead file (~2429 LoC) source/megengine-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~2282 LoC) · ×1
  • Dead file (~2282 LoC) source/tosa-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1751 LoC) · ×1
  • Dead file (~1751 LoC) source/caffe2-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1651 LoC) · ×1
  • Dead file (~1651 LoC) source/paddle-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1636 LoC) · ×1
  • Dead file (~1636 LoC) source/xmodel-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1530 LoC) · ×1
  • Dead file (~1530 LoC) source/executorch-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1465 LoC) · ×1
  • Dead file (~1465 LoC) source/mindir-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1275 LoC) · ×1
  • Dead file (~1275 LoC) tools/mlir-script.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1057 LoC) · ×1
  • Dead file (~1057 LoC) source/litertlm-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1055 LoC) · ×1
  • Dead file (~1055 LoC) source/om-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~976 LoC) · ×1
  • Dead file (~976 LoC) source/pytorch-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~958 LoC) · ×1
  • Dead file (~958 LoC) source/uff-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~916 LoC) · ×1
  • Dead file (~916 LoC) REDACTED — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~630 LoC) · ×1
  • Dead file (~630 LoC) source/bigdl-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~572 LoC) · ×1
  • Dead file (~572 LoC) source/sentencepiece-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~522 LoC) · ×1
  • Dead file (~522 LoC) source/paddle-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~366 LoC) · ×1
  • Dead file (~366 LoC) tools/tf-script.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~353 LoC) · ×1
  • Dead file (~353 LoC) source/dnn-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~350 LoC) · ×1
  • Dead file (~350 LoC) source/pytorch-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~346 LoC) · ×1
  • Dead file (~346 LoC) source/cntk-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~329 LoC) · ×1
  • Dead file (~329 LoC) source/espdl-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~310 LoC) · ×1
  • Dead file (~310 LoC) tools/gguf-script.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~283 LoC) · ×1
  • Dead file (~283 LoC) source/dlc-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~266 LoC) · ×1
  • Dead file (~266 LoC) source/catboost-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~258 LoC) · ×1
  • Dead file (~258 LoC) source/rknn-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~227 LoC) · ×1
  • Dead file (~227 LoC) source/jax-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~206 LoC) · ×1
  • Dead file (~206 LoC) source/litertlm-schema.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~187 LoC) · ×1
  • Dead file (~187 LoC) tools/tosa-script.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~174 LoC) · ×1
  • Dead file (~174 LoC) source/keras-proto.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~113 LoC) · ×1
  • Dead file (~113 LoC) tools/megengine-script.js — no import path from any entry point (79 application, 2 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency '@electron/notarize' · ×1
  • Unused dependency '@electron/notarize' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X19 · Unrestored process-global state · Process-global state is restored only on the happy path · ×1
  • Process-global state is restored only on the happy path source/app.js:44 — this arrow function changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process working directory (changed at line 46, put back at line 48) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, child-process launch or config read in ANY module resolves against it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the directory. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd` and `env` options of `child_process.spawn`/`exec`/`execSync` (or `Deno.Command`) scope both to the CHILD — or build absolute paths with `path.resolve`. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Minor — 74 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate source/mxnet.js:451 — `!name && initializer && initializer.name` appears character-identically in 2 files — source/mxnet.js, source/tvm.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/caffe2.js:27 — `!tags.has(key) || tags.get(key) === value` appears character-identically in 2 files — source/caffe2.js, source/onnx.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:807 — `!this._buffer || length !== this._buffer.length` appears character-identically in 2 files — REDACTED, source/node.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:804 — `!this._buffer || this._position < this._offset || this._position + length > this._offset + this._buffer.length` appears character-identically in 3 files — REDACTED, source/node.js, source/protobuf.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/circle.js:462 — `!this._data || this._data.byteLength < 4` appears character-identically in 2 files — source/circle.js, source/tflite.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/armnn.js:279 — `!this.dimensions || this.dimensions.length === 0` appears character-identically in 9 files — source/armnn.js, source/circle.js, source/dnn.js, source/espdl.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/caffe2.js:478 — `Array.isArray(this.dimensions) && this.dimensions.length > 0` appears character-identically in 9 files — source/caffe2.js, source/coreml.js, source/dlc.js, source/espresso.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/dlc.js:166 — `Array.isArray(this.type.outputs) && outputs.length === this.type.outputs.length` appears character-identically in 2 files — source/dlc.js, source/qnn.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/caffe.js:474 — `Array.isArray(value) && Array.isArray(defaultValue)` appears character-identically in 5 files — source/caffe.js, source/cntk.js, source/mxnet.js, source/openvino.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/mlir-script.js:849 — `arg.type === 'def' && typeof arg.value === 'string'` appears character-identically in 2 files — tools/mlir-script.js, tools/tablegen.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/mxnet.js:391 — `arg_node && (!arg_node.inputs || arg_node.inputs.length === 0) && (arg_node.outputs && arg_node.outputs.length === 1)` appears character-identically in 2 files — source/mxnet.js, source/tvm.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/mxnet.js:357 — `arg_node && arg_node.name && (!arg_node.inputs || arg_node.inputs.length === 0) && (arg_node.outputs && arg_node.outputs.length === 1)` appears character-identically in 2 files — source/mxnet.js, source/tvm.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/circle.js:104 — `buffer && buffer.data && buffer.data.length > 0` appears character-identically in 2 files — source/circle.js, source/tflite.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/circle.js:106 — `buffer && buffer.offset !== 0n && buffer.size !== 0n` appears character-identically in 2 files — source/circle.js, source/tflite.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/json.js:25 — `c !== ' ' && c !== '\n' && c !== '\r' && c !== '\t'` appears character-identically in 2 files — source/json.js, source/xml.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/circle.js:467 — `count < 0 || count > Math.floor((data.byteLength - 4) / 4)` appears character-identically in 2 files — source/circle.js, source/tflite.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/flax.js:165 — `dataType === 'string' || dataType === 'object'` appears character-identically in 2 files — source/flax.js, source/keras.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/cntk.js:418 — `defaultValue.length > 1 && defaultValue[defaultValue.length - 1] === null` appears character-identically in 3 files — source/cntk.js, source/mxnet.js, source/openvino.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/mlnet.js:12 — `entries instanceof Map && entries.size > 0` appears character-identically in 3 files — source/mlnet.js, source/numpy.js, source/pytorch.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/pickle.js:286 — `entries.length !== 1 && entries[0] !== 'version' && entries[1] !== 1` appears character-identically in 2 files — source/pickle.js, source/pytorch.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:96 — `event instanceof window.ErrorEvent && event.error && event.error instanceof Error` appears character-identically in 2 files — REDACTED, source/index.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/caffe2.js:400 — `id !== '' || inputDef.option !== 'optional'` appears character-identically in 3 files — source/caffe2.js, source/tengine.js, source/tnn.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/onnx.js:1525 — `inner === 2 && !Array.isArray(value) && Object(value) === (value) && Object.keys(value).length === 0` appears character-identically in 2 files — source/onnx.js, source/tf.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/caffe.js:421 — `inputIndex < inputs.length || inputDef.option !== 'optional'` appears character-identically in 4 files — source/caffe.js, source/caffe2.js, source/tengine.js, source/tnn.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate source/circle.js:200 — `is_variable || (buffer && buffer.data && buffer.data.length > 0) || (buffer && buffer.offset !== 0n && buffer.size !== 0n)` appears character-identically in 2 files — source/circle.js, source/tflite.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×8
  • redundant comment source/dagre.js:33 — "Adds a dummy node to the graph and return v." repeats the code it sits on: 4 of its 5 words (adds, dummy, node, return) are already in `const addDummyNode = (g, type, label, name) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment source/mlir.js:9417 — 19 comments in this file only repeat the code they sit on (lines 9417, 10245, 10601, 10739, 11004, 11211, 11228, 11235, 11466, 12678, 19564, 19565, 19566, 19567, 19568, 19569, 26343, 28973, 28993), for example "SameOperandsAndResultType: result type = first operand type". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment source/mlnet.js:2186 — "RankSelectionMethod" repeats the code it sits on: 3 of its 3 words (rank, selection, method) are already in `this._rankSelectionMethod = reader.byte();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment test/browser.spec.js:30 — "Set up file chooser promise before clicking" repeats the code it sits on: 4 of its 5 words (set, file, chooser, promise) are already in `const fileChooserPromise = page.waitForEvent('filechooser');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tools/tablegen.js:746 — "Recursively get cases from the underlying enum" repeats the code it sits on: 4 of its 5 words (get, cases, underlying, enum) are already in `return underlyingEnum.getEnumCases();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tools/tablegen.js:2075 — "Build the full name from prefix + template name" repeats the code it sits on: 4 of its 5 words (full, name, prefix, template) are already in `const fullNameTemplate = [...namePrefix, ...template.nameTemplate];`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tools/tablegen.js:2124 — "Create the def record" repeats the code it sits on: 3 of its 3 words (create, def, record) are already in `const def = new tablegen.Record(name, this);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tools/tablegen.js:2152 — "Resolve the argument value with template bindings" repeats the code it sits on: 4 of its 5 words (resolve, value, template, bindings) are already in `const resolved = this._resolveTemplateValue(argValue, bindings);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D12 · Dependency Hygiene · Deprecated · ×5
  • Deprecated: boolean REDACTED:1244 — boolean 3.2.0 is resolved in REDACTED and is marked deprecated by its publisher: "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:2520 — glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: inflight REDACTED:2836 — inflight 1.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: lodash.isequal REDACTED:3071 — lodash.isequal 4.5.0 is resolved in REDACTED and is marked deprecated by its publisher: "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: rimraf REDACTED:3842 — rimraf 2.6.3 is resolved in REDACTED and is marked deprecated by its publisher: "Rimraf versions prior to v4 are no longer supported". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
IC1 · Incompleteness & stubs · Empty method body · ×3
  • Empty method body source/grapher.js:598 — `layout` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body source/mlir.js:4397 — `emitWarning` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body REDACTED:3075 — `layout` has an empty body — confirm it's an intentional no-op and not an unfinished method.
IC1 · Incompleteness & stubs · Blanket warning suppression · ×2
  • Blanket warning suppression source/xml.js:39 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression source/xml.js:978 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
X4 · Structured logging · Interpolated log message defeats structured logging · ×2
  • Interpolated log message defeats structured logging source/__init__.py:36 — `error` at line 36 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging source/server.py:300 — `info` at line 300 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×2
  • Hand-rolled JSON/XML parsing via regex source/keras.js:58 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex source/message.js:13 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found package.json:17 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `package.json` makes this repository a deployable product (line 17).
D21 · Naming Consistency · `GenOP` spells `OP` where 134 names in the project spell it `Op` · ×1
  • `GenOP` spells `OP` where 134 names in the project spell it `Op` source/mslite-schema.js:3830 — 134 of 135 names in project netron spell the token `Op` (134 of 135; unit: names in project netron containing `Op`). Peers: source.mindir-proto.PreprocessOpProto (source/mindir-proto.js:669); source.mlir.AffineBinaryOpExpr (source/mlir.js:1409); AffineParser.parseAffineLowPrecOpExpr (source/mlir.js:4671); AffineParser.parseAffineLowPrecOpExpr(llhsOp) (source/mlir.js:4671); AffineParser.parseAffineHighPrecOpExpr (source/mlir.js:4703). Rename to `GenOp`. [rule N6]
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation package.json:32 — `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×1
  • Diagnostic log message is built whether or not it is wanted source/server.py:111 — `debug` at line 111 is called with an argument built by `"…".join(args)` (line 111), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-6ecba9273f7e4f5eafa3ceaf3011c7cc/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-6ecba9273f7e4f5eafa3ceaf3011c7cc/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .21artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .5artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 4 file(s) — `source/coreml-proto.js`, `source/nnabla-proto.js`, `source/tf-proto.js`, `REDACTED` — so the PII/GDPR sweep did not cover them at all.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1d665-72a4-7b0f-bdb3-99095500f3e2 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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