Public report of getcadcraft/detailcraft, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 05:41 UTC · Survey ID cd_53fd7b50db944212a2aad816384f9bb3
getcadcraft/detailcraft
Measured 17 November 2026, 05:35 UTC, at code version ddda90f
Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 97,184 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 3.0 person-years · Weakest lens: Production Readiness, 30.4
Findings by how serious they are
32 critical2587 serious125 minor
10 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 05:35 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 ▸
72of 72 dimensions measured by tools.
2731of 2744 findings point to an exact file and line, so you can open each one in the code. The other 13 concern the repository as a whole, such as missing documentation.
72dimensions across 7 lenses, read from 97,184 lines of product code in 2 projects.
getcadcraft/detailcraft falls short of our standard for a preview release because six passwords or keys sit in the current code and we found no automated security scanning of the code, its secrets or its dependencies. It scores 35.4 out of 100 and is rated Weak, and ten of its 32 critical findings are security problems.
Production Readiness, at 30.4, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step is replacing the six exposed passwords or keys and switching the old ones off, worth about 4.6 points. Adding tests for untested code comes next, worth about 3.6 points.
Six passwords or keys are open to anyone who can read the repository. Four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and fourteen buttons or links have no name a screen reader can say. Replacing each exposed password or key, pinning each tool to an exact version and naming the buttons and links would close these risks. The three form fields without a label need a label.
The product code is 97,184 lines, about €440,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe 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.
The weakest lenses score close to each other, so improving any of them moves the score.
Code composition: what the lines of code are
Product code 19%Tests 81%
Rebuild cost: about €440,000 · Estimate
Cost to rebuild
€150,000 to €730,000, for 2,424 to 7,690 hours of work, about 3.0 person-years for 1 to 6 engineers
Difficulty of the problem
Standard, 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 35. 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.
Size
Medium: 97,184 lines of product code
What it is not
Not 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 6 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2), REDACTED, REDACTED.
Raises the score by about 4.6 points · Low effort · Secret Scanning
2
Resolve the 445 Low coverage finding(s) in Code Coverage — start with index.js (14), model.js (6), check.js (3).
Raises the score by about 3.6 points · High effort · Code Coverage
3
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Raises the score by about 3.5 points · Medium effort · Access Controls
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.
Files that change often carry extra risk · Combined risk
27 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (35 files) · Code Coverage (404 files under half tested) · The files: detailcraft.js, app-workspace.js and write.js
What to do: Add tests to these files and have a second person review every change to them, starting with detailcraft.js, app-workspace.js and write.js.
Where the investment is most exposed · Value at risk
This code would cost about €440,000 to build again, about 3.0 person-years of work. Its weakest lens is Production Readiness, at 30.4 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 6 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 4.6 points for low effort, because it clears the 6 Secret Scanning 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 1,361,254 lines over the last 90 days, which is about 5,520,641 lines a year. At that pace, the extra work comes to an estimated 703.2 to 4219 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
109 modules, with 3 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; 69 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.
app.dwg.objects-write uses app.dwg.bits-write, so a change to app.dwg.bits-write can break app.dwg.objects-write, while a change to app.dwg.objects-write can't break app.dwg.bits-write.
Position
Below the diagonal: app.dwg.objects-write uses a module listed above it, which is the healthy direction.
app.dwg.r2007-write uses app.dwg.crc, so a change to app.dwg.crc can break app.dwg.r2007-write, while a change to app.dwg.r2007-write can't break app.dwg.crc.
Position
Below the diagonal: app.dwg.r2007-write uses a module listed above it, which is the healthy direction.
devshell.site.assets.js.engines.des.engine uses app.ifc.geo-tri, so a change to app.ifc.geo-tri can break devshell.site.assets.js.engines.des.engine, while a change to devshell.site.assets.js.engines.des.engine can't break app.ifc.geo-tri.
Position
Below the diagonal: devshell.site.assets.js.engines.des.engine uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 31.0 · Weak · gated by D1, D2, R1, X5 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
21
High / Critical
A07:2025 — Authentication Failures
6
High / Critical
Roadmap
Top priorities: Resolve the 6 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2), REDACTED, REDACTED; Resolve the 445 Low coverage finding(s) in Code Coverage — start with index.js (14), model.js (6), check.js (3); Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 6 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2), REDACTED, REDACTED.
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Add a SAST step to CI running what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
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.
Bring the 378 bodies over 30 down to 30 or less in Cognitive Complexity — start with constructability.constructability (cognitive 340), extendWriter::finish (cognitive 283), writeDwg (cognitive 256).
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 — 32
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 — 2587
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 — 125
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 10
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 72 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, 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 — 72 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 2731 of 2744 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 105 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 86 test source file(s) (.py, .php) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.py, .php, .mjs). The reliability runner drives the JavaScript/TypeScript half of this repository's ecosystem, but no runner of ours re-runs its .php test suite(s), so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, 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 package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — 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. Git history depth insufficient — this repository has 26 commit(s), too few for a reliable trend signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
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. Too few commits for a meaningful bus factor (26 commit(s) sampled, fewer than the 50 this dimension needs before a bus factor means anything).
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. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — 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 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
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.
D26 Project Cohesion — 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. `(repository root)` (97053 LoC, 496 module-visible types across 40 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D28 Secrets (history) — 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. `gitleaks` TIMED OUT after 75.1s against a 75s budget, so we killed its process tree. The budget is ours; the work may simply be larger than it allows. Nothing about this repository is asserted by the absence of a result; the budget is ours to raise, and raising it is our backlog item, not an action for this repository's owner.
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. `app/frame/frame-design.js`, `devshell/site/assets/js/engines/motion/urdf.js` 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.
D34 Knowledge Freshness — 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. Too few commits to judge knowledge freshness (26 commit(s) sampled).
D35 Change Coupling — measured, with a gap in what it reached — 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. Git history depth insufficient — this repository has 26 commit(s), too few for a reliable change-coupling signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
D44 Platform End-of-Life — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
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 kept running but no port it opened served a page in the time allowed. (rule: no-answer). The renderer reported: the dev server (`npm run start`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "> start / > node devshell/serve.mjs / DetailCraft dev shell: http://127.0.0.1:8000/ (Ctrl+C to stop)" 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`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "> start / > node devshell/serve.mjs / DetailCraft dev shell: http://127.0.0.1:8000/ (Ctrl+C to stop)" No runtime evidence was gathered.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
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. 76 further occurrence(s) are not listed individually; the score already reflects all 116.
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. 3786 further occurrence(s) are not listed individually; the score already reflects all 3826.
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. 63 further occurrence(s) are not listed individually; the score already reflects all 103.
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. 600 further occurrence(s) are not listed individually; the score already reflects all 640.
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. 25 further occurrence(s) are not listed individually; the score already reflects all 65.
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. 89 further occurrence(s) are not listed individually; the score already reflects all 129.
X4 Structured logging — 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 JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, 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.
X7 Silent fallback defaults — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 17 further occurrence(s) are not listed individually; the score already reflects all 57.
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.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 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.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
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.
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.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
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.
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.
925 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was nongraphic-write.extendWriter at 312. A further 10 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 Geometry.leaf at 46 — they are counted neither in the figure above nor in this dimension's score. 4 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: app/ifc/geometry.js (Geometry.leaf at 46), app/frame/spectrum-asce7.js (spectrum-asce7.designSpectrum at 21), app/dwg/header-vars.js (header-vars.readOne at 18), app/ifc/open-async.js (open-async.startWorker at 17). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 716 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 61 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with nongraphic-write.extendWriter (cyclomatic 312), host.createDispatcher (cyclomatic 223), writeDwg::convert (cyclomatic 197). — 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 61 together lifts Cyclomatic Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 890 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 378 bodies over 30 down to 30 or less in Cognitive Complexity — start with constructability.constructability (cognitive 340), extendWriter::finish (cognitive 283), writeDwg (cognitive 256). — 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 378 together lifts Cognitive Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.0 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 32 FunctionTooLong finding(s) in God Classes — start with ifc43.js (2), write.js, frame-panel.js. — One of this dimension's main actionable groups (32 warning-level).
Resolve the 23 FileTooLong finding(s) in God Classes — start with detailcraft.js, REDACTED, app-panels.js. — One of this dimension's main actionable groups (23 warning-level).
Resolve the 8 TooManyMethods finding(s) in God Classes — start with REDACTED, api.js, model.js. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
2 duplicated block group(s) detected. 0.0 % of the production lines (48 of 97,184) are in a reported copy. One further row reports members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .js (92% 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 (24 corresponding lines)devshell/site/tools/lang/help-locales.php:96
Resolve the 1 Edited copy of a member (24 corresponding lines) finding(s) in Code Duplication — start with help-locales.php. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with help-locales.php. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with help-locales.php. — 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.
Do you agree with this assessment?
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.
2 production modules (source-import), 0 dependency cycle(s), 0 unstable depended-on module(s). No manifest declares this repository's modules, so the modules are its top-level source directories and the edges the imports between them; 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).
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.
Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with api.js (2), protocol.js. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D8 · Code Coverage5.0 / 10Adequate✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
Line coverage 0.2% — 445 file(s) below 50%. Measured from the JavaScript/TypeScript suite (its `test` script (`node devshell/test.mjs`) under node's V8 coverage via `npm install --ignore-scripts` (no lockfile) in the repository root).
Low coverage: REDACTED · ×445REDACTED:1
What to do
Resolve the 445 Low coverage finding(s) in Code Coverage — start with index.js (14), model.js (6), check.js (3). — One of this dimension's main actionable groups (445 warning-level).
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 105 tests. Measured on the JavaScript/TypeScript suite only — at least 86 test source file(s) (.py, .php) went unread, so its test quality is unmeasured and is not in these counts.
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.
5 outdated, 0 yanked direct Cargo dependencies. 5 of 11 direct crates were graded against crates.io (0 not published there, 6 not resolved by a committed Cargo.lock). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from Cargo.lock there.
Outdated: monstertruck-io · ×5
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 6 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (6 issue-level).
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 133 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's Cargo.lock closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, 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.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 35 Hotspot finding(s) in Churn × Complexity Hotspots — start with detailcraft.js, app-workspace.js, write.js. — One of this dimension's main actionable groups (35 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
0 deducted task-comment markers across 1890 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.
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.
1 of 1 documentation facets pass in full. 23 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: 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.
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.
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.
7 naming inconsistencies among 343 declarations measured against a convention their peers follow.
`GetMaxExpressID` spells `ID` where 146 names in the project spell it `Id` · ×2app/ifc/api.js:155
`CreateIFCGloballyUniqueId` spells `IFC` where 133 names in the project spell it `Ifc` · ×2app/ifc/api.js:210
`WebIFC` spells `IFC` where 133 names in the project spell it `Ifc`app/ifc-import.js:60
`gravityMM` spells `MM` where 24 names in the project spell it `Mm`tests/lib/env/env.js:71
`tubeSheetSVG` spells `SVG` where 33 names in the project spell it `Svg`tests/lib/process/equip/exchanger.js:109
What to do
Resolve the 2 `GetMaxExpressID` spells `ID` where 146 names in the project spell it… finding(s) in Naming Consistency — start with api.js (2). — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 2 `CreateIFCGloballyUniqueId` spells `IFC` where 133 names in the project… finding(s) in Naming Consistency — start with api.js (2). — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 `WebIFC` spells `IFC` where 133 names in the project spell it `Ifc` finding(s) in Naming Consistency — start with ifc-import.js. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
1 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
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).
21 finding(s): 0 critical, 4 high, 17 medium, 0 low. 4 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 13 file(s) — `app/connections.js`, `app/detailcraft.js`, `app/dwg/objects-read.js`, `app/dwg/objects-write.js`, `app/frame/frame-design.js`, … (+8 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (6 warning-level).
No action in Static Analysis (SAST) — all 4 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 (4 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
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.
No dependency in any ecosystem this repository declares is published as malicious.
✓ On the Gold path — maintain.
Detailed fixes: d43_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives5.2 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — app/live-classroom.js:556
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels6.7 / 10Strong✓ 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. (×3) — app/addons/regs/lib/ui.js:276, app/addons/regs/lib/ui.js:324, app/addons/regs/lib/ui.js:386
This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×3) — app/addons/regs/lib/ui.js:278, app/addons/regs/lib/ui.js:328, app/addons/regs/lib/ui.js:410
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×10) — devshell/index.html:330, devshell/index.html:350, devshell/site/assets/js/app-teamwork.js:62, …
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. (×4) — devshell/site/assets/js/app-ai-activity.js:80, devshell/site/assets/js/app-ai-ask.js:121, devshell/site/assets/js/app-fields.js:62, …
The fieldset's <legend> has no text, so the control group has no name. Put descriptive text in the <legend>. — devshell/site/assets/js/app-ai-suggest.js:106
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.
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.
An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. (×11) — devshell/site/assets/js/app-ai-suggest.js:124, devshell/site/assets/js/app-docinfo.js:92, devshell/site/assets/js/app-docinfo.js:99, …
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
This <section role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — devshell/site/assets/js/app-tools-ui.js:34
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
aria-hidden="true" hides the element from assistive tech but leaves it keyboard-focusable — a confusing dead stop. Remove aria-hidden or make the element non-focusable. — devshell/site/assets/js/app-tabs-scroll.js:59
What to do
Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
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.
`.ws-cmd-pop li[aria-selected="true"], .ws-cmd-pop li:hover` sets color: #fff on background-color: #E6ECF2 — 1.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — devshell/site/assets/css/app-workspace.css:431
`:is(.ws-palettes) button.btn-plot:hover` sets color: #fff on background-color: #E3E9EF — 1.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — devshell/site/assets/css/app-workspace.css:530
`.cc-in-input: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. — devshell/site/assets/css/app-input.css:120
`.shell-palette-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. — devshell/site/assets/css/app-shell.css:781
`.ws-cmdline .ws-cmd-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. — devshell/site/assets/css/app-workspace.css:425
`.help-body: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. — devshell/site/assets/css/help.css:70
`[data-af]::after` moves (`transition: transform .12s`) 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. — devshell/site/assets/css/app-shell.css:1173
`:is(main details, .shell-fold):not([class*="menu"], [class*="more"], .cc-snapkinds, .sp) > summary:not([class*="tool"], [class*="btn"], [class*="linkbtn"], [class*="tab"])::after` moves (`transition: transform .12s`) 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. — devshell/site/assets/css/app-shell.css:1194
`.app-bar-boot-clock` moves (`animation: app-boot-spin 1.6s linear infinite`) 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. — devshell/site/assets/css/app-shell.css:1258
`.nav-dd > summary .dd-caret` moves (`transition: transform .15s ease`) 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. — devshell/site/assets/css/site.css:150
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.
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.
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.
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.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
This repository serves requests — http.createServer (devshell/serve.mjs:102) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — devshell/serve.mjs:102
What to do
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
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.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. (×10) — app/frame/frame-weld.js:305, app/framing.js:325, app/rc/elements.js:345, …
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. — devshell/site/assets/js/engines/plc/runtime.js:213
`delete` has an empty body — confirm it's an intentional no-op and not an unfinished method. — app/ifc/api.js:55
What to do
Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
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.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
No logging call was found in the 452 Python, JavaScript/TypeScript, PHP production file(s) this check read across 3 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; PHP: PSR-3 loggers (Monolog), Laravel's Log facade, error_log()) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
What to do
Adopt pino (or winston) and log at meaningful points in the services you run.
Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add phpstan or psalm (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
`tests/tools/bimcraft-test/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`. — tests/tools/bimcraft-test/package.json:5
What to do
Add a SAST step to CI running what this repository's stack ships: phpstan or psalm — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
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.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×13) — REDACTED:345, REDACTED:1109, app/addons/regs/lib/active.js:51, …
`got(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×4) — app/ifc-import.js:485, app/ifc-import.js:508, app/ifc-import.js:522, …
What to do
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
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.mkdirSync` in `fetchVendor` 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. — devshell/serve.mjs:78
`fs.writeFileSync` in `fetchVendor` 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. — devshell/serve.mjs:79
`fs.renameSync` in `fetchVendor` 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. — devshell/serve.mjs:80
`fs.readFileSync` in `callback to http.createServer` 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. — devshell/serve.mjs:116
`fs.existsSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — devshell/serve.mjs:123, devshell/serve.mjs:124, devshell/serve.mjs:127
`fs.statSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — devshell/serve.mjs:123, devshell/serve.mjs:129
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.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
0 typed · 2584 plain JS — the untyped files are REDACTED, app/addons/regs/lib/active.js, app/addons/regs/lib/adapter.js, app/addons/regs/lib/check.js, app/addons/regs/lib/library.js, app/addons/regs/lib/local.js (+2578 more).
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
devshell/site/assets/js/engines/ and tests/lib/ are near-verbatim copies of each other: 89 files are byte-identical under the same relative paths (~8348 lines; the trees hold 101 and 1406 files). That is one structural fact, not 89 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — devshell/site/assets/js/engines/des/engine.js:1
7 duplicated blocks under app/ have copies in at least two of the sibling directories dwg, fem, frame, ids, ifc, usd — 6 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — app/frame/plate-mesh.js:32
app/frame/frame-design.js:148 · app/frame/frame-design.js:243 — the two spans are one implementation copied and then locally edited — 1050 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. — app/frame/frame-design.js:148
app/ifc/geo-solid.js:157 · app/ifc/geo-solid.js:254 — 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. — app/ifc/geo-solid.js:157
REDACTED:196 · REDACTED:243 — 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. — REDACTED:196
app/dwg/objects-write.js:181 · app/dwg/passthrough.js:148 — the two spans are one implementation copied and then locally edited — 273 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. — app/dwg/objects-write.js:181
app/frame/frame-loads-panel.js:76 · app/frame/frame-loads-panel.js:113 — the two spans are one implementation copied and then locally edited — 170 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. — app/frame/frame-loads-panel.js:76
app/history/history.js:91 · app/history/history.js:117 — the two spans are one implementation copied and then locally edited — 170 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. — app/history/history.js:91
app/frame/frame-concrete-panel.js:69 · app/frame/frame-panel.js:547 — 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. — app/frame/frame-concrete-panel.js:69
app/issuelog/panel.js:27 · app/ui-util.js:8 — the two spans are one implementation copied and then locally edited — 134 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. — app/issuelog/panel.js:27
app/rc/schedule.js:46 · app/rebar.js:277 — 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. — app/rc/schedule.js:46
app/csv.js:20 · app/lib-supply/supply.js:31 — the two spans are one implementation copied and then locally edited — 133 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. — app/csv.js:20
app/usd-detailcraft.js:67 · app/view3d.js:922 — 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. — app/usd-detailcraft.js:67
app/dwg/solid-write.js:101 · app/dwg/surface-write.js:66 — 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. — app/dwg/solid-write.js:101
app/frame/frame-solve.js:379 · app/frame/plate-solve.js:258 — 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. — app/frame/frame-solve.js:379
REDACTED:63 · app/usd/util.js:120 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — REDACTED:63
app/clash.js:113 · app/drawings.js:221 — 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. — app/clash.js:113
app/frame/plate-mesh.js:32 · app/ifc/geo-nurbs.js:657 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — app/frame/plate-mesh.js:32
app/ifc/model.js:173 · app/ifc/model.js:193 — the two spans are one implementation copied and then locally edited — 151 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. — app/ifc/model.js:173
app/detailcraft.js:766 · app/detailcraft.js:775 — 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. — app/detailcraft.js:766
app/drawings.js:110 · app/drawings.js:118 — 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. — app/drawings.js:110
app/dwg/container-write.js:270 · app/dwg/r2007-write.js:284 — 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. — app/dwg/container-write.js:270
app/dwg/container-write.js:155 · app/dwg/container-write.js:177 — the two spans are one implementation copied and then locally edited — 124 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. — app/dwg/container-write.js:155
app/dwg/lz-r2004-write.js:126 · app/dwg/lz-r2004-write.js:136 — the two spans are one implementation copied and then locally edited — 53 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. — app/dwg/lz-r2004-write.js:126
app/dwg/objects-read.js:424 · app/dwg/objects-read.js:431 — 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. — app/dwg/objects-read.js:424
app/dwg/objects-read.js:1053 · app/dwg/objects-read.js:1074 — 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. — app/dwg/objects-read.js:1053
app/dwg/objects-write.js:709 · app/dwg/objects-write.js:721 — 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. — app/dwg/objects-write.js:709
app/dwg/table-read.js:121 · app/dwg/table-read.js:157 — 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. — app/dwg/table-read.js:121
app/fem/frame-push.js:113 · app/fem/model.js:149 — the two spans are one implementation copied and then locally edited — 128 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. — app/fem/frame-push.js:113
app/frame/frame-model.js:213 · app/frame/frame-panel.js:130 — 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. — app/frame/frame-model.js:213
app/frame/frame-solve.js:249 · app/frame/plate-solve.js:118 — 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. — app/frame/frame-solve.js:249
app/geom.js:14 · app/viewcube.js:35 — 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. — app/geom.js:14
app/ifc/api.js:399 · app/ifc/api.js:455 — 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. — app/ifc/api.js:399
app/usd/intcode.js:31 · app/usd/intcode.js:45 — 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. — app/usd/intcode.js:31
app/usd/intcode.js:66 · app/usd/lz4.js:86 — 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. — app/usd/intcode.js:66
app/addons/regs/lib/sections.js:186 · app/addons/regs/lib/sections.js:192 — 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. — app/addons/regs/lib/sections.js:186
app/analysis.js:68 · app/analysis.js:229 — the two spans are one implementation copied and then locally edited — 52 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. — app/analysis.js:68
app/app-autosave.js:420 · app/app-autosave.js:462 — the two spans are one implementation copied and then locally edited — 92 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. — app/app-autosave.js:420
app/clash.js:44 · app/winsel.js:40 — 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. — app/clash.js:44
app/clash.js:28 · app/geom.js:14 — 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. — app/clash.js:28
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
REDACTED:1117 imports tests/lib/process/engines.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — REDACTED:1117
REDACTED:1126 imports tests/lib/process/engines.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — REDACTED:1126
What to do
Fix the listed violations: move the shared test helper into a source directory production code may depend on (2 rows).
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.
resMode has cyclomatic complexity 442 and cognitive complexity 398; 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. — tests/tools/bimcraft-test/res-test.mjs:12
run has cyclomatic complexity 408 and cognitive complexity 341; 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. — tests/tools/modelcraft-test/mesh.mjs:28
draw06Mode has cyclomatic complexity 401 and cognitive complexity 358; 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. — tests/tools/bimcraft-test/draw06-test.mjs:13
famMoreMode has cyclomatic complexity 299 and cognitive complexity 195; 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. — tests/tools/bimcraft-test/families-more-test.mjs:9
pipeSpecsMode has cyclomatic complexity 247 and cognitive complexity 183; 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. — tests/tools/bimcraft-test/pipespecs-test.mjs:14
toolsAMode has cyclomatic complexity 243 and cognitive complexity 178; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — tests/tools/bimcraft-test/tools-a-test.mjs:13
typeSwapMode has cyclomatic complexity 235 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 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. — tests/tools/bimcraft-test/wall-typeswap-test.mjs:10
runIllustrateTests has cyclomatic complexity 234 and cognitive complexity 176; 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. — tests/tools/partcraft-test/test-illustrate.mjs:21
run has cyclomatic complexity 230 and cognitive complexity 253; 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. — tests/tools/modelcraft-test/formats.mjs:16
comfortsMode has cyclomatic complexity 230 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 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. — tests/tools/bimcraft-test/comforts-test.mjs:20
modelMode has cyclomatic complexity 221 and cognitive complexity 184; 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. — tests/tools/bimcraft-test/model-test.mjs:12
familiesMode has cyclomatic complexity 220 and cognitive complexity 217; 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. — tests/tools/bimcraft-test/families-test.mjs:17
runDwgSaveChecks has cyclomatic complexity 212 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 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. — tests/tools/cadcraft-test/dwg-save-check.mjs:26
regsMode has cyclomatic complexity 210 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 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. — tests/tools/bimcraft-test/regs-test.mjs:11
views09Mode has cyclomatic complexity 203 and cognitive complexity 127; 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. — tests/tools/bimcraft-test/views09-test.mjs:18
carbonMode has cyclomatic complexity 202 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — tests/tools/bimcraft-test/eg-carbon-test.mjs:11
convert has cyclomatic complexity 197 and cognitive complexity 216; 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. (×2) — app/dwg/write.js:374, tests/lib/dwg/write.js:374
writeDwg has cyclomatic complexity 194 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. (×2) — app/dwg/write.js:87, tests/lib/dwg/write.js:87
mep07Mode has cyclomatic complexity 193 and cognitive complexity 207; 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. — tests/tools/bimcraft-test/mep07-test.mjs:13
finish has cyclomatic complexity 192 and cognitive complexity 283; 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. (×2) — app/dwg/nongraphic-write.js:236, tests/lib/dwg/nongraphic-write.js:236
views2Mode has cyclomatic complexity 191 and cognitive complexity 170; 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. — tests/tools/bimcraft-test/views2-test.mjs:17
runCamTests has cyclomatic complexity 188 and cognitive complexity 236; 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. — tests/tools/partcraft-test/test-cam.mjs:26
runCraftscriptBTests has cyclomatic complexity 183 and cognitive complexity 213; 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. — tests/tools/partcraft-test/test-craftscript-b.mjs:27
buildModelParts has cyclomatic complexity 182 and cognitive complexity 294; 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. — tests/lib/dwg/read.js:331
toolsBMode has cyclomatic complexity 180 and cognitive complexity 114; 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. — tests/tools/bimcraft-test/tools-b-test.mjs:12
schedulesMode has cyclomatic complexity 180 and cognitive complexity 78; 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. — tests/tools/bimcraft-test/schedules-test.mjs:12
readOasis has cyclomatic complexity 177 and cognitive complexity 388; 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. — tests/lib/chip/fmt/oasis.js:89
egMode has cyclomatic complexity 165 and cognitive complexity 137; 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. — tests/tools/bimcraft-test/eg-mep-test.mjs:11
stagesMode has cyclomatic complexity 162 and cognitive complexity 88; 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. — tests/tools/bimcraft-test/stages-test.mjs:13
validate has cyclomatic complexity 156 and cognitive complexity 240; 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. — tests/tools/dwg-test/structure.mjs:41
bidiClass has cyclomatic complexity 153 and cognitive complexity 136; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/lib/report/bidi.js:116
measureMode has cyclomatic complexity 152 and cognitive complexity 130; 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. — tests/tools/bimcraft-test/measure-test.mjs:45
checkJob has cyclomatic complexity 148 and cognitive complexity 274; 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. — tests/lib/cabinetcraft/lib/checks.js:26
layoutProject has cyclomatic complexity 144 and cognitive complexity 342; 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. — tests/lib/cabinetcraft/lib/project.js:206
run has cyclomatic complexity 143 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. — tests/tools/modelcraft-test/gltf.mjs:101
writeOasis has cyclomatic complexity 137 and cognitive complexity 373; 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. — tests/lib/chip/fmt/oasis.js:284
cmpSpecial has cyclomatic complexity 135 and cognitive complexity 168; 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. — tests/tools/dwg-test/reader-compare.mjs:221
Do you agree with this assessment?
R3 · Large Files4.5 / 10Weak✓ 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.
app/shapes/sections.js has 2624 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/shapes/sections.js:1
REDACTED has 1975 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
app/detailcraft.js has 1900 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/detailcraft.js:1
app/dwg/objects-read.js has 1370 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/dwg/objects-read.js:1
REDACTED has 1136 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
app/dwg/objects-write.js has 1117 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/dwg/objects-write.js:1
REDACTED has 1107 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
app/drawings.js has 1012 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/drawings.js:1
app/view3d.js has 938 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/view3d.js:1
app/dwg/write.js has 874 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/dwg/write.js:1
app/connections.js has 871 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/connections.js:1
app/viewcube.js has 811 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/viewcube.js:1
app/live-classroom.js has 794 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/live-classroom.js:1
app/ifc/geo-nurbs.js has 754 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/ifc/geo-nurbs.js:1
app/model.js has 741 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/model.js:1
app/dwg/table-read.js has 733 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/dwg/table-read.js:1
app/frame/frame-panel.js has 711 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/frame/frame-panel.js:1
app/frame/frame-solve.js has 671 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/frame/frame-solve.js:1
app/addons/regs/lib/ui.js has 652 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/addons/regs/lib/ui.js:1
app/rc/elements.js has 616 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/rc/elements.js:1
app/dwg/table-write.js has 596 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/dwg/table-write.js:1
app/ifc-import.js has 589 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/ifc-import.js:1
app/usd/usda-read.js has 587 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/usd/usda-read.js:1
app/app-autosave.js has 582 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/app-autosave.js:1
app/foundation.js has 558 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/foundation.js:1
app/dwg/nongraphic-write.js has 546 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/dwg/nongraphic-write.js:1
app/ifc/api.js has 501 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/ifc/api.js:1
app/ifc/ifc43.js has 482 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/ifc/ifc43.js:1
app/dwg/r2007-write.js has 445 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/dwg/r2007-write.js:1
app/ids/access.js has 419 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/ids/access.js:1
app/usd/usdc-read.js has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/usd/usdc-read.js:1
app/frame/plate-solve.js has 415 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/frame/plate-solve.js:1
app/fem/frame-push.js has 411 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/fem/frame-push.js:1
app/frame/frame-design.js has 406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/frame/frame-design.js:1
app/dwg/container-write.js has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/dwg/container-write.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage9.2 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
tests/lib/cabinetcraft/hosts/bim.js:14 imports './lib/elements.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/cabinetcraft/hosts/bim.js:14
tests/lib/cabinetcraft/hosts/cad.js:13 imports '../../geom.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/cabinetcraft/hosts/cad.js:13
tests/lib/cabinetcraft/hosts/model.js:12 imports './lib/elements.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/cabinetcraft/hosts/model.js:12
tests/lib/cabinetcraft/hosts/test-part.mjs:8 imports './fake-dom.mjs', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/cabinetcraft/hosts/test-part.mjs:8
tests/lib/cabinetcraft/main.js:28 imports './host.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/cabinetcraft/main.js:28
tests/lib/cabinetcraft/test/t-drill.mjs:125 imports '../../../cam-sheets.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/cabinetcraft/test/t-drill.mjs:125
tests/lib/carve/hosts/cad.js:16 imports '../../laser-cad.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/carve/hosts/cad.js:16
tests/lib/carve/main.js:15 imports './host.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/carve/main.js:15
tests/lib/crs-georef/crs-georef.js:24 imports './crs.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/crs-georef/crs-georef.js:24
tests/lib/crs-pick/crs-pick-dialog.js:74 imports './crs-pick-shared.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/crs-pick/crs-pick-dialog.js:74
tests/lib/crs-pick/crs-pick.js:25 imports './crs.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/crs-pick/crs-pick.js:25
tests/lib/geom2d/test/test.mjs:3 imports '../../../tools/geom2d/sync.mjs', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/geom2d/test/test.mjs:3
tests/lib/lightdesign/hosts/bim.js:35 imports '../../res-elec.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/lightdesign/hosts/bim.js:35
tests/lib/lightdesign/hosts/cad.js:14 imports '../../laser-cad.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/lightdesign/hosts/cad.js:14
tests/lib/lightdesign/main.js:12 imports './host.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/lightdesign/main.js:12
tests/lib/mep-route/test/gravity.mjs:8 imports '../../../public_html/assets/apps/bimcraft/dev/mep/drainage.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/mep-route/test/gravity.mjs:8
tests/lib/pointcloud-hosts/compare-ui.js:14 imports './ui.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/pointcloud-hosts/compare-ui.js:14
tests/lib/pointcloud-hosts/hosts/bim.js:12 imports '../../las.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (5 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/pointcloud-hosts/hosts/bim.js:12
tests/lib/pointcloud-hosts/hosts/cad.js:9 imports '../../las.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (2 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/pointcloud-hosts/hosts/cad.js:9
tests/lib/pointcloud-hosts/main.js:9 imports './lib/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (8 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/pointcloud-hosts/main.js:9
tests/lib/scanbim/hosts/bim.js:15 imports '../../model-walls.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (5 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/scanbim/hosts/bim.js:15
tests/lib/scanbim/main.js:9 imports './host.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/scanbim/main.js:9
tests/lib/trusscraft/hosts/bimcraft/lib/roofs.js:9 imports '../../../model-slabs.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (2 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/trusscraft/hosts/bimcraft/lib/roofs.js:9
tests/lib/trusscraft/hosts/modelcraft/host.js:28 imports '../../print-solid.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/trusscraft/hosts/modelcraft/host.js:28
tests/lib/trusscraft/hosts/partcraft/host.js:10 imports '../../sketch.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/trusscraft/hosts/partcraft/host.js:10
tests/lib/trusscraft/lib/fab.js:16 imports './cutlist/bars.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/trusscraft/lib/fab.js:16
tests/lib/trusscraft/lib/roofs-typed.js:8 imports './bim/res-roofplan.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/trusscraft/lib/roofs-typed.js:8
tests/lib/trusscraft/main.js:6 imports './host.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/trusscraft/main.js:6
tests/lib/zip/test/test.mjs:5 imports '../../../tools/zip/sync.mjs', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/lib/zip/test/test.mjs:5
tests/tools/addons-test/account-client.mjs:4 imports '../../public_html/assets/js/app-addons-account.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/addons-test/account-client.mjs:4
tests/tools/bimcraft-test/browser-main-10.mjs:14 imports '../gpu-remote/browser.mjs', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/bimcraft-test/browser-main-10.mjs:14
tests/tools/bimcraft-test/browser-place-split.mjs:12 imports '../gpu-remote/browser.mjs', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/bimcraft-test/browser-place-split.mjs:12
tests/tools/bimcraft-test/browser-view-buttons.mjs:14 imports '../gpu-remote/browser.mjs', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/bimcraft-test/browser-view-buttons.mjs:14
tests/tools/bimcraft-test/doc-features/f02/contract.test.mjs:6 imports '../../../../public_html/assets/apps/bimcraft/dev/model-walls.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (5 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/bimcraft-test/doc-features/f02/contract.test.mjs:6
tests/tools/bimcraft-test/doc-features/f02/fixtures.mjs:3 imports '../../../../public_html/assets/apps/bimcraft/dev/ifc/api.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (7 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/bimcraft-test/doc-features/f02/fixtures.mjs:3
tests/tools/bimcraft-test/doc-features/f02/review-fixtures.mjs:4 imports '../../../../public_html/assets/apps/bimcraft/dev/model-walls.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (4 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/bimcraft-test/doc-features/f02/review-fixtures.mjs:4
tests/tools/bimcraft-test/doc-features/f04/canvas.mjs:10 imports '../../../../public_html/assets/apps/bimcraft/dev/wall-plan-graphics.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/bimcraft-test/doc-features/f04/canvas.mjs:10
tests/tools/bimcraft-test/doc-features/f04/fixture.mjs:4 imports '../../../../public_html/assets/apps/bimcraft/dev/ifc/api.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (12 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/bimcraft-test/doc-features/f04/fixture.mjs:4
tests/tools/bimcraft-test/doc-features/f04/graphics.test.mjs:6 imports '../../../../public_html/assets/apps/bimcraft/dev/wall-plan-graphics.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (11 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/bimcraft-test/doc-features/f04/graphics.test.mjs:6
tests/tools/bimcraft-test/doc-features/f05/fixture.mjs:4 imports '../../../../public_html/assets/apps/bimcraft/dev/ifc/api.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (13 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/tools/bimcraft-test/doc-features/f05/fixture.mjs:4
What to do
Add tests that import the unreached modules (directly or through their public entry).
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.
Do you agree with this assessment?
R6 · Tooling3.4 / 10Weak✓ 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.
This repository declares test tooling, and the ✓ above records that declaration — but tests/lib/cabinetcraft/hosts/bim.js and 81 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — tests/lib/cabinetcraft/hosts/bim.js:14
What to do
Add eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code6.5 / 10Adequate✓ 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.
111 file(s) (~67713 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/tools/library
20 file(s) (~5006 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/tools/markupcraft-test
2 file(s) (~619 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/tools/markupcraft-test/ocr-spike
19 file(s) (~2706 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/tools/mcp/test
192 file(s) (~30360 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/tools/partcraft-test
52 file(s) (~6243 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/tools/takeoffcraft-test
Unreachable from the 128 application, 822 tooling and 2349 test entry point(s) detected in this repo. Nothing this repository declares compiles or type-checks these files, so a wrong deletion here would raise no compile error — gate removals on `npm test`, which loads the modules, and note that it only covers what it exercises. An undetected custom entry would make these reachable.
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (REDACTED, app/detailcraft.js, app/shell-mount.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 — REDACTED
no import path from any entry point (128 application, 822 tooling, 2349 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 (×3) — app/detailcraft.js, REDACTED, app/ifc/ifc43.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/dwg/objects-write.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 — app/dwg/objects-read.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 7 in-repo import(s) from 7 other file(s) do name it (app/dwg/mleader-write.js, app/dwg/nongraphic-write.js, app/dwg/passthrough.js and 4 more) — 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 — app/dwg/objects-write.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (app/drawings-ui.js, app/kiss.js, app/rc-ui.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 — app/drawings.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/drawings-ui.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 — app/dwg/write.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/ifc/geo-brep.js, app/ifc/geometry.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 — app/ifc/geo-nurbs.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/dwg/objects-read.js, app/dwg/table-write.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 — app/dwg/table-read.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/dwg/write.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 (×2) — app/dwg/table-write.js, app/dwg/r2007-write.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/ifc-import-ui.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 (×2) — app/ifc-import.js, app/ifc/api.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/usd/index.js, app/usd/stage.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 — app/usd/usda-read.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/dwg/table-write.js, app/dwg/write.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 — app/dwg/nongraphic-write.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/ids/check.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 — app/ids/access.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 1 other file(s) do name it (app/dwg/write.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 — app/dwg/container-write.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (app/usd/index.js, app/usd/stage.js, app/usd/usdc-write.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 — app/usd/usdc-read.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/fem/frame-dyn.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 — app/fem/frame-push.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 1 other file(s) do name it (REDACTED) — 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 — app/live-crypto.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/detailcraft.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 — REDACTED
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/bundle/plan.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 — app/bundle/read.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/detailcraft.js, app/export-ui.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 — app/ifc.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (app/dwg/nongraphic-write.js, app/dwg/objects-read.js, app/dwg/passthrough.js and 1 more) — 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 — app/dwg/bits-read.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (app/issuelog/host.js, app/issuelog/panel.js, app/issues-detail.js and 1 more) — 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 — REDACTED
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/unit-prefs.js, app/unit-settings.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 — app/unit-table.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/usd/index.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 (×2) — app/usd/stage.js, app/usd/build.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/usd/build.js, app/usd/index.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 — app/usd/usdc-write.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/ifc/api.js, app/ifc/geometry.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 — app/ifc/geo-bool.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (app/ifc/geo-bool.js, app/ifc/geo-brep.js, app/ifc/geometry.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 — app/ifc/geo-solid.js
no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/usd/index.js, app/usd/scene.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 — app/usd/geom.js
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · 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 tests/tools/mcp/test/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. — tests/tools/mcp/test/package.json:9
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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.
app/ifc/geo-align.js → app/ifc/geo-curve.js → app/ifc/geo-align.js (one verified cycle inside a mutually-dependent group of 3 files) — app/ifc/geo-align.js:22
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository. Its Node HTTP listeners were read for HTTPS enforcement alone — TLS served, a redirect to https:// or HSTS, or a TLS-terminating proxy configuration committed beside the server — each judged per server package.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
`server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) — devshell/serve.mjs:133
What to do
Enforce HTTPS on each listed server: serve TLS itself, or redirect plain requests to `https://` and send `Strict-Transport-Security` (`helmet()` does by default) behind the TLS-terminating proxy — and commit that proxy's configuration beside the service. A server only this machine reaches should bind `127.0.0.1`.
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.
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.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
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.
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.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 0/6 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`worker` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — devshell/fetch-vendor.mjs:39, devshell/edition/sw.js:109
`fetchVendor` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — devshell/serve.mjs:73
`sendToIntake` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — devshell/site/assets/js/app-about.js:53
`getJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — devshell/site/assets/js/app-fields.js:26
`bytesOf` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:1106
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
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.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped7.7 / 10Strong✓ 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.
`esc(c.source.url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — app/addons/regs/lib/ui.js:501
`svg` 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. — app/frame/frame-dynamics-panel.js:115
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.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
`createTotals` accepts `now` from the caller and keeps it in `now` on line 40, where only it can read the value — but nothing ever reads `now`. Setting `now` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `now` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `now` from the accepted options so callers stop setting a knob that does nothing. — devshell/site/assets/js/totals.js:40
`jointMove` accepts `robot.dof` from the caller and keeps it in `n` on line 36, where only it can read the value — but nothing ever reads `n`. Setting `robot.dof` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `n` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `robot.dof` from the accepted options so callers stop setting a knob that does nothing. — devshell/site/assets/js/engines/motion/traj.js:36
`checkWelds` accepts `n` from the caller and keeps it in `n` on line 198, where only it can read the value — but nothing ever reads `n`. Setting `n` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `n` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `n` from the accepted options so callers stop setting a knob that does nothing. — app/frame/frame-weld.js:198
What to do
Each finding names the spans that disagree — the knob the caller supplies and the site that ignores it, whether by re-spelling its default, by falling back under the wrong key, by parsing with no format provider at all, or by printing under whatever culture the host supplies. Confirm from those spans, then decide which of the two the type meant: read the knob at the named site, or drop the knob so the signature stops advertising something the type cannot feel. Leaving both is the one option that cannot be right.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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. (×23) — devshell/edition/sw.js:76, REDACTED:284, REDACTED:366, …
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — REDACTED:95
`.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — app/app-autosave.js:150
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×15) — app/app-autosave.js:229, app/app-autosave.js:246, app/app-autosave.js:277, …
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
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.
Other · Code Health — Whether PHP's static analysis checks null and is not undermined by a nullness baseline — PHPStan from level 8 (`checkNullables`) or Psalm at `errorLevel` 3 or stricter is what makes `?User` a type whose method call is an error, and the null entries of a baseline, `@psalm-suppress PossiblyNull…` and `@phpstan-ignore *.nonObject` are what silence it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This repository commits no PHPStan or Psalm configuration (`phpstan.neon[.dist]`, `phpstan.dist.neon`, `psalm.xml[.dist]`, or one a composer.json script names with `--configuration`), so nothing checks null: a `?Customer` reaches `->name()` silently and throws `Error: Call to a member function name() on null` the first time it is null. If the build passes a level on a command line instead, put it in a committed configuration — this check reads configuration, and configuration is all it can read.
What to do
Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 4 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.
SC1 Supply-chain hygiene — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 51 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's PHP imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — 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. PHP builds its object graph per request and shares none of it between requests. 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 — no interface, protocol or abstract type declares an operation an implementer must write
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
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`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "> start / > node devshell/serve.mjs / DetailCraft dev shell: http://127.0.0.1:8000/ (Ctrl+C to stop)" 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.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
D11 Test Reliability — Test reliability not included — no .php test runner
D16 Bus Factor — too few commits for a meaningful bus factor
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 — The exposed public-API surface could not be collected — no C#/VB projects loaded.
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 — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D28 Secrets (history) — gitleaks killed before it finished — this repository's working tree not scanned
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) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D34 Knowledge Freshness — too few commits to judge knowledge freshness
D36 Supply-chain Provenance & Signing — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
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.
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
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
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage data present for 529 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — 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.
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
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X20 Mistyped argument guard — 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
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. PHP gives a request one thread of its own; the event-loop libraries (ReactPHP, Amp) run callbacks one at a time, and ext-parallel copies every value across its channels, so no array or collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
X27 Collection changed while being enumerated — X27 reached only 2% of this repository's production lines — javascript (95,294 lines), verilog (4,988 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.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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 — 32 finding(s)
AC2 · Forms & labels· <button> with no accessible text · ×10
<button> with no accessible text devshell/index.html:330— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text devshell/index.html:350— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text devshell/site/assets/js/app-teamwork.js:62— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text devshell/site/assets/js/app-teamwork.js:69— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text devshell/site/assets/js/app-teamwork.js:76— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text devshell/site/assets/js/app-teamwork.js:88— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text devshell/site/assets/js/app-teamwork.js:90— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text devshell/site/assets/js/app-teamwork.js:92— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text devshell/site/assets/js/app-teamwork.js:116— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text devshell/site/assets/js/app-teamwork.js:118— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels· Link with no accessible name · ×4
Link with no accessible name devshell/site/assets/js/app-ai-activity.js:80— 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 devshell/site/assets/js/app-ai-ask.js:121— 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 devshell/site/assets/js/app-fields.js:62— 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 devshell/site/assets/js/app-teamwork.js:94— 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.
AC2 · Forms & labels· <input> without a programmatic label · ×3
<input> without a programmatic label app/addons/regs/lib/ui.js:276— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label app/addons/regs/lib/ui.js:324— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label app/addons/regs/lib/ui.js:386— 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· <label> that labels no control · ×3
<label> that labels no control app/addons/regs/lib/ui.js:278— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control app/addons/regs/lib/ui.js:328— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control app/addons/regs/lib/ui.js:410— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC5 · ARIA correctness· aria-hidden on a focusable element · ×1
aria-hidden on a focusable element devshell/site/assets/js/app-tabs-scroll.js:59— aria-hidden="true" hides the element from assistive tech but leaves it keyboard-focusable — a confusing dead stop. Remove aria-hidden or make the element non-focusable.
Low coverage: REDACTED REDACTED:1— 0.0% line coverage (0/796).
Low coverage: app/addons/regs/lib/active.js app/addons/regs/lib/active.js:1— 0.0% line coverage (0/127).
Low coverage: app/addons/regs/lib/adapter.js app/addons/regs/lib/adapter.js:1— 0.0% line coverage (0/50).
Low coverage: app/addons/regs/lib/check.js app/addons/regs/lib/check.js:1— 0.0% line coverage (0/41).
Low coverage: app/addons/regs/lib/library.js app/addons/regs/lib/library.js:1— 0.0% line coverage (0/116).
Low coverage: app/addons/regs/lib/local.js app/addons/regs/lib/local.js:1— 0.0% line coverage (0/39).
Low coverage: app/addons/regs/lib/problems.js app/addons/regs/lib/problems.js:1— 0.0% line coverage (0/24).
Low coverage: app/addons/regs/lib/regs.js app/addons/regs/lib/regs.js:1— 0.0% line coverage (0/219).
Low coverage: app/addons/regs/lib/report.js app/addons/regs/lib/report.js:1— 0.0% line coverage (0/53).
Low coverage: app/addons/regs/lib/rows.js app/addons/regs/lib/rows.js:1— 0.0% line coverage (0/14).
Low coverage: app/addons/regs/lib/sections.js app/addons/regs/lib/sections.js:1— 0.0% line coverage (0/198).
Low coverage: app/addons/regs/lib/ui.js app/addons/regs/lib/ui.js:1— 0.0% line coverage (0/564).
Low coverage: app/addons/regs/main.js app/addons/regs/main.js:1— 0.0% line coverage (0/14).
Low coverage: app/addons/trust.js app/addons/trust.js:1— 0.0% line coverage (0/128).
Low coverage: REDACTED REDACTED:1— 0.0% line coverage (0/259).
Low coverage: app/analysis-ui.js app/analysis-ui.js:1— 0.0% line coverage (0/54).
Low coverage: app/analysis-view.js app/analysis-view.js:1— 0.0% line coverage (0/71).
Low coverage: app/analysis.js app/analysis.js:1— 0.0% line coverage (0/167).
Low coverage: app/app-autosave.js app/app-autosave.js:1— 0.0% line coverage (0/416).
Low coverage: app/areaclip.js app/areaclip.js:1— 0.0% line coverage (0/87).
Low coverage: app/autopilot-ui.js app/autopilot-ui.js:1— 0.0% line coverage (0/41).
Low coverage: app/autopilot.js app/autopilot.js:1— 0.0% line coverage (0/101).
Low coverage: app/build.js app/build.js:1— 0.0% line coverage (0/92).
Low coverage: app/bundle/plan.js app/bundle/plan.js:1— 0.0% line coverage (0/46).
Low coverage: app/bundle/read.js app/bundle/read.js:1— 0.0% line coverage (0/283).
+ 420 more in this group — see findings.md.
R4 · Test Coverage· This test file cannot be loaded · ×40
This test file cannot be loaded tests/lib/cabinetcraft/hosts/bim.js:14— tests/lib/cabinetcraft/hosts/bim.js:14 imports './lib/elements.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/cabinetcraft/hosts/cad.js:13— tests/lib/cabinetcraft/hosts/cad.js:13 imports '../../geom.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/cabinetcraft/hosts/model.js:12— tests/lib/cabinetcraft/hosts/model.js:12 imports './lib/elements.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/cabinetcraft/hosts/test-part.mjs:8— tests/lib/cabinetcraft/hosts/test-part.mjs:8 imports './fake-dom.mjs', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/cabinetcraft/main.js:28— tests/lib/cabinetcraft/main.js:28 imports './host.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/cabinetcraft/test/t-drill.mjs:125— tests/lib/cabinetcraft/test/t-drill.mjs:125 imports '../../../cam-sheets.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/carve/hosts/cad.js:16— tests/lib/carve/hosts/cad.js:16 imports '../../laser-cad.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/carve/main.js:15— tests/lib/carve/main.js:15 imports './host.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/crs-georef/crs-georef.js:24— tests/lib/crs-georef/crs-georef.js:24 imports './crs.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/crs-pick/crs-pick-dialog.js:74— tests/lib/crs-pick/crs-pick-dialog.js:74 imports './crs-pick-shared.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/crs-pick/crs-pick.js:25— tests/lib/crs-pick/crs-pick.js:25 imports './crs.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/geom2d/test/test.mjs:3— tests/lib/geom2d/test/test.mjs:3 imports '../../../tools/geom2d/sync.mjs', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/lightdesign/hosts/bim.js:35— tests/lib/lightdesign/hosts/bim.js:35 imports '../../res-elec.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/lightdesign/hosts/cad.js:14— tests/lib/lightdesign/hosts/cad.js:14 imports '../../laser-cad.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/lightdesign/main.js:12— tests/lib/lightdesign/main.js:12 imports './host.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/mep-route/test/gravity.mjs:8— tests/lib/mep-route/test/gravity.mjs:8 imports '../../../public_html/assets/apps/bimcraft/dev/mep/drainage.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/pointcloud-hosts/compare-ui.js:14— tests/lib/pointcloud-hosts/compare-ui.js:14 imports './ui.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/pointcloud-hosts/hosts/bim.js:12— tests/lib/pointcloud-hosts/hosts/bim.js:12 imports '../../las.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (5 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/pointcloud-hosts/hosts/cad.js:9— tests/lib/pointcloud-hosts/hosts/cad.js:9 imports '../../las.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (2 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/pointcloud-hosts/main.js:9— tests/lib/pointcloud-hosts/main.js:9 imports './lib/index.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (8 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/scanbim/hosts/bim.js:15— tests/lib/scanbim/hosts/bim.js:15 imports '../../model-walls.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (5 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/scanbim/main.js:9— tests/lib/scanbim/main.js:9 imports './host.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/trusscraft/hosts/bimcraft/lib/roofs.js:9— tests/lib/trusscraft/hosts/bimcraft/lib/roofs.js:9 imports '../../../model-slabs.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (2 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/trusscraft/hosts/modelcraft/host.js:28— tests/lib/trusscraft/hosts/modelcraft/host.js:28 imports '../../print-solid.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/lib/trusscraft/hosts/partcraft/host.js:10— tests/lib/trusscraft/hosts/partcraft/host.js:10 imports '../../sketch.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
Swallowed exception (empty catch) devshell/edition/sw.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) REDACTED:284— 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:366— 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:370— 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:462— 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:490— 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:494— 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:495— 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:547— 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:586— 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:590— 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:748— 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:1146— 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:1147— 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) app/app-autosave.js:150— `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) app/app-autosave.js:229— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) app/app-autosave.js:246— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) app/app-autosave.js:277— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) app/app-autosave.js:279— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) app/app-autosave.js:315— 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) app/app-autosave.js:351— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) app/app-autosave.js:352— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) app/app-autosave.js:417— 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) app/app-autosave.js:428— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) app/app-autosave.js:432— 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.
Hotspot: app/detailcraft.js app/detailcraft.js:97— app/detailcraft.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 872 in detailcraft.start at line 97. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- app/detailcraft.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: devshell/site/assets/js/app-workspace.js devshell/site/assets/js/app-workspace.js:96— devshell/site/assets/js/app-workspace.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 808 in app-workspace.mountWorkspaces at line 96. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- devshell/site/assets/js/app-workspace.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: app/dwg/write.js app/dwg/write.js:87— app/dwg/write.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 546 in write.writeDwg at line 87. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- app/dwg/write.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: devshell/site/assets/js/app-input-ui.js devshell/site/assets/js/app-input-ui.js:77— devshell/site/assets/js/app-input-ui.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 448 in app-input-ui.mount at line 77. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- devshell/site/assets/js/app-input-ui.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: tests/tools/bimcraft-test/res-test.mjs tests/tools/bimcraft-test/res-test.mjs:12— tests/tools/bimcraft-test/res-test.mjs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 442 in resMode at line 12. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- tests/tools/bimcraft-test/res-test.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: tests/tools/bimcraft-test/draw06-test.mjs tests/tools/bimcraft-test/draw06-test.mjs:13— tests/tools/bimcraft-test/draw06-test.mjs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 401 in draw06Mode at line 13. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- tests/tools/bimcraft-test/draw06-test.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: app/dwg/nongraphic-write.js app/dwg/nongraphic-write.js:170— app/dwg/nongraphic-write.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 312 in nongraphic-write.extendWriter at line 170. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- app/dwg/nongraphic-write.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:823— REDACTED changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 223 in host.createDispatcher at line 823. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:862— REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 118 in addons.sharedApi at line 862. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: app/model.js app/model.js:665— app/model.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 105 in model.readModel at line 665. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- app/model.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: devshell/site/assets/js/app-input.js devshell/site/assets/js/app-input.js:320— devshell/site/assets/js/app-input.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in app-input.validateProfile at line 320. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- devshell/site/assets/js/app-input.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: devshell/site/assets/js/app-phone.js devshell/site/assets/js/app-phone.js:515— devshell/site/assets/js/app-phone.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 116 in app-phone.penAndTouch at line 515. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- devshell/site/assets/js/app-phone.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: tests/tools/bimcraft-test/model-test.mjs tests/tools/bimcraft-test/model-test.mjs:12— tests/tools/bimcraft-test/model-test.mjs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 221 in modelMode at line 12. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- tests/tools/bimcraft-test/model-test.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: tests/tools/cadcraft-test/dwg-save-check.mjs tests/tools/cadcraft-test/dwg-save-check.mjs:26— tests/tools/cadcraft-test/dwg-save-check.mjs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 212 in runDwgSaveChecks at line 26. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- tests/tools/cadcraft-test/dwg-save-check.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: app/view3d.js app/view3d.js:213— app/view3d.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in View3D.setModel at line 213. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- app/view3d.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: devshell/site/assets/js/app-settings.js devshell/site/assets/js/app-settings.js:76— devshell/site/assets/js/app-settings.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in app-settings.load at line 76. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- devshell/site/assets/js/app-settings.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:90— REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 103 in agents.detailTools at line 90. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: app/shop.js app/shop.js:37— app/shop.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in shop.shopDrawing at line 37. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- app/shop.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: app/analysis.js app/analysis.js:63— app/analysis.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in analysis.frameOf at line 63. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- app/analysis.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: app/frame/frame-model.js app/frame/frame-model.js:76— app/frame/frame-model.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in frame-model.cleanFrame at line 76. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- app/frame/frame-model.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: app/frame/frame-panel.js app/frame/frame-panel.js:80— app/frame/frame-panel.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in frame-panel.cleanAnalysis at line 80. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- app/frame/frame-panel.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: devshell/site/assets/js/app-devices-ui.js devshell/site/assets/js/app-devices-ui.js:303— devshell/site/assets/js/app-devices-ui.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in app-devices-ui.mountSettings at line 303. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- devshell/site/assets/js/app-devices-ui.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: devshell/site/assets/js/app-panels.js devshell/site/assets/js/app-panels.js:1055— devshell/site/assets/js/app-panels.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in app-panels.visibility at line 1055. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- devshell/site/assets/js/app-panels.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: app/ifc.js app/ifc.js:90— app/ifc.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in ifc.writeIfc at line 90. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- app/ifc.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: devshell/site/core/classes/Help.php devshell/site/core/classes/Help.php:556— devshell/site/core/classes/Help.php changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in Help.withScreens at line 556. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 05:20:57 +00:00' --until='2026-11-17 05:20:57 +00:00' --full-history --no-merges -- devshell/site/core/classes/Help.php`: 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.
FunctionTooLong: write.writeDwg app/dwg/write.js:87— FunctionTooLong — writeDwg runs 654 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 554 over it, 6.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: frame-panel.framePanel app/frame/frame-panel.js:163— FunctionTooLong — framePanel runs 494 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 394 over it, 4.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ui.mountRegsUi app/addons/regs/lib/ui.js:129— FunctionTooLong — mountRegsUi runs 467 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 367 over it, 4.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: calc.createCalcs devshell/site/assets/js/calc.js:245— FunctionTooLong — createCalcs runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.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.
FunctionTooLong: frame-dynamics-panel.dynamicsPanel app/frame/frame-dynamics-panel.js:53— FunctionTooLong — dynamicsPanel runs 279 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 179 over it, 2.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: nongraphic-write.extendWriter app/dwg/nongraphic-write.js:170— FunctionTooLong — extendWriter runs 267 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 167 over it, 2.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rc-ui.mountRc app/rc-ui.js:23— FunctionTooLong — mountRc runs 233 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: usdc-write.writeUsdc app/usd/usdc-write.js:23— FunctionTooLong — writeUsdc runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ifc.writeIfc app/ifc.js:90— FunctionTooLong — writeIfc runs 214 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: agents.detailTools REDACTED:90— FunctionTooLong — detailTools runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: frame-loads-panel.loadsPanel app/frame/frame-loads-panel.js:48— FunctionTooLong — loadsPanel runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: live-follow.attachFollow app/live-follow.js:122— FunctionTooLong — attachFollow runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: foundation-ui.mountFoundation app/foundation-ui.js:17— FunctionTooLong — mountFoundation runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: panel.mountIssuePanel app/issuelog/panel.js:60— FunctionTooLong — mountIssuePanel runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: drawings-ui.mountDrawings app/drawings-ui.js:17— FunctionTooLong — mountDrawings runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ai-ask.createAsk devshell/site/assets/js/ai-ask.js:75— FunctionTooLong — createAsk runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: drawings.assemblySheet app/drawings.js:531— FunctionTooLong — assemblySheet runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: read.readManifest app/bundle/read.js:173— FunctionTooLong — readManifest runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: r2007-write.layoutR2007 app/dwg/r2007-write.js:281— FunctionTooLong — layoutR2007 runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.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.
FunctionTooLong: live-presence.attachPresence app/live-presence.js:169— FunctionTooLong — attachPresence runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.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.
FunctionTooLong: shop.shopDrawing app/shop.js:37— FunctionTooLong — shopDrawing runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: app-phone.penAndTouch devshell/site/assets/js/app-phone.js:515— FunctionTooLong — penAndTouch runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: objects-write.ENC.LAYOUT app/dwg/objects-write.js:509— FunctionTooLong — ENC.LAYOUT runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: geo-nurbs.surfaceFace app/ifc/geo-nurbs.js:315— FunctionTooLong — surfaceFace runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ifc43.read43 app/ifc/ifc43.js:108— FunctionTooLong — read43 runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FileTooLong: app/detailcraft.js app/detailcraft.js— FileTooLong — 1590 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 97% of them inside a single declaration: root (90-1950). The bar is 1500 significant lines; this is 90 over it, 1.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1456 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 956 over it, 2.91× 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: js/app-panels.js devshell/site/assets/js/app-panels.js— FileTooLong — 1429 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 929 over it, 2.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: js/app-settings.js devshell/site/assets/js/app-settings.js— FileTooLong — 1231 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 731 over it, 2.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: dwg/objects-read.js app/dwg/objects-read.js— FileTooLong — 1100 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 600 over it, 2.20× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: js/app-workspace.js devshell/site/assets/js/app-workspace.js— FileTooLong — 967 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: layoutName (87-1278). The bar is 500 significant lines; this is 467 over it, 1.93× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: dwg/objects-write.js app/dwg/objects-write.js— FileTooLong — 880 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 380 over it, 1.76× 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 — 857 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 357 over it, 1.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 796 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 296 over it, 1.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: app/drawings.js app/drawings.js— FileTooLong — 772 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 272 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: app/view3d.js app/view3d.js— FileTooLong — 766 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 92% of them inside a single declaration: View3D (52-901). The bar is 500 significant lines; this is 266 over it, 1.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: dwg/write.js app/dwg/write.js— FileTooLong — 714 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 92% of them inside a single declaration: writeDwg (87-882). The bar is 500 significant lines; this is 214 over it, 1.43× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: app/connections.js app/connections.js— FileTooLong — 673 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 173 over it, 1.35× 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: js/app-input-ui.js devshell/site/assets/js/app-input-ui.js— FileTooLong — 666 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 166 over it, 1.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: app/viewcube.js app/viewcube.js— FileTooLong — 637 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 137 over it, 1.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: app/live-classroom.js app/live-classroom.js— FileTooLong — 633 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 133 over it, 1.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: js/app-addons-account.js devshell/site/assets/js/app-addons-account.js— FileTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 110 over it, 1.22× 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: frame/frame-panel.js app/frame/frame-panel.js— FileTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 83% of them inside a single declaration: framePanel (163-735). The bar is 500 significant lines; this is 92 over it, 1.18× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: dwg/table-read.js app/dwg/table-read.js— FileTooLong — 577 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 77 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: app/model.js app/model.js— FileTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 69 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: lib/ui.js app/addons/regs/lib/ui.js— FileTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: mountRegsUi (129-668). The bar is 500 significant lines; this is 64 over it, 1.13× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: ifc/geo-nurbs.js app/ifc/geo-nurbs.js— FileTooLong — 562 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 62 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: classes/Help.php devshell/site/core/classes/Help.php— FileTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 40 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Outbound HTTP without resilience REDACTED:345— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:1109— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience app/addons/regs/lib/active.js:51— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience app/ifc-import.js:485— `got(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience app/ifc-import.js:508— `got(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience app/ifc-import.js:522— `got(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience app/ifc-import.js:536— `got(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience app/ifc/open-async.js:51— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devshell/edition/sw.js:48— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devshell/edition/sw.js:64— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devshell/edition/sw.js:113— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devshell/fetch-vendor.mjs:44— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devshell/serve.mjs:75— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devshell/site/assets/js/app-about.js:60— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devshell/site/assets/js/app-about.js:119— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devshell/site/assets/js/app-fields.js:26— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devshell/site/assets/js/app-offline.js:119— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Duplicated block (7 lines × 2 locations) app/detailcraft.js:766— app/detailcraft.js:766 · app/detailcraft.js:775 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) app/drawings.js:110— app/drawings.js:110 · app/drawings.js:118 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) app/dwg/container-write.js:270— app/dwg/container-write.js:270 · app/dwg/r2007-write.js:284 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (7 lines × 2 locations) app/dwg/objects-read.js:424— app/dwg/objects-read.js:424 · app/dwg/objects-read.js:431 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) app/dwg/objects-read.js:1053— app/dwg/objects-read.js:1053 · app/dwg/objects-read.js:1074 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) app/dwg/objects-write.js:709— app/dwg/objects-write.js:709 · app/dwg/objects-write.js:721 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) app/dwg/table-read.js:121— app/dwg/table-read.js:121 · app/dwg/table-read.js:157 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) app/frame/frame-model.js:213— app/frame/frame-model.js:213 · app/frame/frame-panel.js:130 — 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 (7 lines × 2 locations) app/frame/frame-solve.js:249— app/frame/frame-solve.js:249 · app/frame/plate-solve.js:118 — 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 (7 lines × 2 locations) app/ifc/api.js:399— app/ifc/api.js:399 · app/ifc/api.js:455 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) app/usd/intcode.js:31— app/usd/intcode.js:31 · app/usd/intcode.js:45 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) app/usd/intcode.js:66— app/usd/intcode.js:66 · app/usd/lz4.js:86 — 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.
IC1 · Incompleteness & stubs· Both branches are identical · ×11
Both branches are identical — the condition decides nothing app/frame/frame-weld.js:305— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing app/framing.js:325— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing app/rc/elements.js:345— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing app/rc/elements.js:551— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing devshell/site/assets/js/ai-suggest.js:90— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing devshell/site/assets/js/app-ai-assist.js:177— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing devshell/site/assets/js/engines/pcb/gerber.js:137— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing devshell/site/assets/js/engines/pcb/place.js:61— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing devshell/site/assets/js/engines/plc/runtime.js:213— 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.
Both branches are identical — the condition decides nothing REDACTED:214— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing REDACTED:286— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Empty <h3> heading devshell/site/assets/js/app-ai-suggest.js:124— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h3> heading devshell/site/assets/js/app-docinfo.js:92— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h3> heading devshell/site/assets/js/app-docinfo.js:99— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h3> heading devshell/site/assets/js/app-docinfo.js:122— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h3> heading devshell/site/assets/js/app-fields.js:68— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h3> heading devshell/site/assets/js/app-fields.js:75— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h3> heading devshell/site/assets/js/app-fields.js:82— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h3> heading devshell/site/assets/js/app-lessons.js:68— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h3> heading devshell/site/assets/js/app-reasons.js:101— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
detailcraft.start::connProps (cognitive 64) app/detailcraft.js:1290— detailcraft.start::connProps has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 16 (41 pts), if/else 9 (11 pts), boolean chains 7, loops 5 (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. This shape REPEATS in the file: 9 other methods here (detailcraft.start, detailcraft.start::refresh, detailcraft.start::exists, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 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.
detailcraft.start::placeAt (cognitive 39) app/detailcraft.js:578— detailcraft.start::placeAt has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (33 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (detailcraft.start, detailcraft.start::refresh, detailcraft.start::exists, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 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.
detailcraft.start::deleteSelection (cognitive 25) app/detailcraft.js:724— detailcraft.start::deleteSelection has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (23 pts), if/else 2 (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. This shape REPEATS in the file: 9 other methods here (detailcraft.start, detailcraft.start::refresh, detailcraft.start::exists, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 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.
detailcraft.start::refOfGuid (cognitive 22) app/detailcraft.js:1796— detailcraft.start::refOfGuid has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 2 (4 pts), loops 2 (4 pts), boolean chains 2 (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. This shape REPEATS in the file: 9 other methods here (detailcraft.start, detailcraft.start::refresh, detailcraft.start::exists, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 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.
detailcraft.start::exists (cognitive 21) app/detailcraft.js:410— detailcraft.start::exists has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (21 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. This shape REPEATS in the file: 9 other methods here (detailcraft.start, detailcraft.start::refresh, detailcraft.start::renderBar, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 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.
detailcraft.start::renderBar (cognitive 20) app/detailcraft.js:490— detailcraft.start::renderBar has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (4 pts), ternaries 4, loops 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 9 other methods here (detailcraft.start, detailcraft.start::refresh, detailcraft.start::exists, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 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.
detailcraft.start::describeRef (cognitive 19) app/detailcraft.js:698— detailcraft.start::describeRef has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (detailcraft.start, detailcraft.start::refresh, detailcraft.start::exists, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 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.
detailcraft.start::refresh (cognitive 16) app/detailcraft.js:383— detailcraft.start::refresh has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 9 other methods here (detailcraft.start, detailcraft.start::exists, detailcraft.start::renderBar, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 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.
detailcraft.start::applySimilar (cognitive 16) app/detailcraft.js:816— detailcraft.start::applySimilar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 9 other methods here (detailcraft.start, detailcraft.start::refresh, detailcraft.start::exists, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 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.
Sync-over-async blocking devshell/serve.mjs:78— `fs.mkdirSync` in `fetchVendor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking devshell/serve.mjs:79— `fs.writeFileSync` in `fetchVendor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking devshell/serve.mjs:80— `fs.renameSync` in `fetchVendor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking devshell/serve.mjs:116— `fs.readFileSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking devshell/serve.mjs:123— `fs.existsSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking devshell/serve.mjs:123— `fs.statSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking devshell/serve.mjs:124— `fs.existsSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking devshell/serve.mjs:127— `fs.existsSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking devshell/serve.mjs:129— `fs.statSync` in `callback to http.createServer` 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.
detailcraft.start::connProps (cyclomatic 39) app/detailcraft.js:1290— detailcraft.start::connProps 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. This shape REPEATS in the file: 8 other methods here (detailcraft.start, detailcraft.start::readSettings, detailcraft.start::refresh, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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: detailcraft.start::act (cyclomatic 42) 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.
detailcraft.start::renderReport (cyclomatic 28) app/detailcraft.js:1410— detailcraft.start::renderReport has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 8 other methods here (detailcraft.start, detailcraft.start::readSettings, detailcraft.start::refresh, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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: detailcraft.start::act (cyclomatic 42) 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.
detailcraft.start::renderBar (cyclomatic 24) app/detailcraft.js:490— detailcraft.start::renderBar has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 8 other methods here (detailcraft.start, detailcraft.start::readSettings, detailcraft.start::refresh, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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: detailcraft.start::act (cyclomatic 42) 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.
detailcraft.start::placeAt (cyclomatic 24) app/detailcraft.js:578— detailcraft.start::placeAt 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 shape REPEATS in the file: 8 other methods here (detailcraft.start, detailcraft.start::readSettings, detailcraft.start::refresh, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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: detailcraft.start::act (cyclomatic 42) 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.
detailcraft.start::readSettings (cyclomatic 23) app/detailcraft.js:260— detailcraft.start::readSettings 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 shape REPEATS in the file: 8 other methods here (detailcraft.start, detailcraft.start::refresh, detailcraft.start::renderBar, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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: detailcraft.start::act (cyclomatic 42) 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.
detailcraft.start::renderProps (cyclomatic 23) app/detailcraft.js:977— detailcraft.start::renderProps has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 8 other methods here (detailcraft.start, detailcraft.start::readSettings, detailcraft.start::refresh, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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: detailcraft.start::act (cyclomatic 42) 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.
detailcraft.start::describeRef (cyclomatic 19) app/detailcraft.js:698— detailcraft.start::describeRef has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 8 other methods here (detailcraft.start, detailcraft.start::readSettings, detailcraft.start::refresh, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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: detailcraft.start::act (cyclomatic 42) 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.
detailcraft.start::refresh (cyclomatic 16) app/detailcraft.js:383— detailcraft.start::refresh 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 shape REPEATS in the file: 8 other methods here (detailcraft.start, detailcraft.start::readSettings, detailcraft.start::renderBar, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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: detailcraft.start::act (cyclomatic 42) 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.
TooManyMethods: LiveClient REDACTED:272— TooManyMethods — 82 methods. The bar is 30 methods; this is 52 over it, 2.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: IfcAPI app/ifc/api.js:79— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Tx app/model.js:304— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AddonsAccount devshell/site/assets/js/app-addons-account.js:124— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BitReader app/dwg/bits-read.js:27— 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: Help devshell/site/core/classes/Help.php:22— 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: BitWriter app/dwg/bits-write.js:30— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: View3D app/view3d.js:52— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
app-workspace.mountWorkspaces::mountPalettes (cognitive 27) devshell/site/assets/js/app-workspace.js:682— app-workspace.mountWorkspaces::mountPalettes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9, loops 4 (6 pts), ternaries 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. This shape REPEATS in the file: 7 other methods here (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::edges, app-workspace.mountWorkspaces::refreshPalettes, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
app-workspace.mountWorkspaces::refreshPalettes (cognitive 26) devshell/site/assets/js/app-workspace.js:754— app-workspace.mountWorkspaces::refreshPalettes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::edges, app-workspace.mountWorkspaces::mountPalettes, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
app-workspace.mountWorkspaces::refreshViewtabs (cognitive 23) devshell/site/assets/js/app-workspace.js:801— app-workspace.mountWorkspaces::refreshViewtabs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (5 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. This shape REPEATS in the file: 7 other methods here (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::edges, app-workspace.mountWorkspaces::mountPalettes, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
app-workspace.mountWorkspaces::leave (cognitive 22) devshell/site/assets/js/app-workspace.js:990— app-workspace.mountWorkspaces::leave has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 7 (8 pts), error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: 7 other methods here (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::edges, app-workspace.mountWorkspaces::mountPalettes, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
app-workspace.mountWorkspaces::refresh (cognitive 22) devshell/site/assets/js/app-workspace.js:1035— app-workspace.mountWorkspaces::refresh has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: 7 other methods here (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::edges, app-workspace.mountWorkspaces::mountPalettes, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
app-workspace.mountWorkspaces::edges (cognitive 19) devshell/site/assets/js/app-workspace.js:205— app-workspace.mountWorkspaces::edges has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (7 pts), boolean chains 2, 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. This shape REPEATS in the file: 7 other methods here (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::mountPalettes, app-workspace.mountWorkspaces::refreshPalettes, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
app-workspace.mountWorkspaces::enter (cognitive 17) devshell/site/assets/js/app-workspace.js:963— app-workspace.mountWorkspaces::enter has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (10 pts), boolean chains 4, if/else 2 (3 pts) (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: 7 other methods here (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::edges, app-workspace.mountWorkspaces::mountPalettes, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
start::renderReport (cognitive 39) app/detailcraft.js:1410— start::renderReport has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (25 pts), ternaries 5 (8 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). 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.
start::readSettings (cognitive 35) app/detailcraft.js:260— start::readSettings has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 2 (6 pts), boolean chains 5, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
start::memberProps (cognitive 26) app/detailcraft.js:1194— start::memberProps has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 3 (5 pts), boolean chains 3, other 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
start::renderProps (cognitive 23) app/detailcraft.js:977— start::renderProps has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, boolean chains 5, ternaries 3 (4 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.
start::pickRefOf (cognitive 18) app/detailcraft.js:1831— start::pickRefOf has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (4 pts), boolean chains 2, loops 1, other 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
start::setTool (cognitive 16) app/detailcraft.js:533— start::setTool has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
X2 · Cancellation propagation· Async function without AbortSignal · ×6
Async function without AbortSignal: worker devshell/fetch-vendor.mjs:39— `worker` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchVendor devshell/serve.mjs:73— `fetchVendor` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: sendToIntake devshell/site/assets/js/app-about.js:53— `sendToIntake` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: getJson devshell/site/assets/js/app-fields.js:26— `getJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: worker devshell/edition/sw.js:109— `worker` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: bytesOf REDACTED:1106— `bytesOf` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
app-input-ui.mount::render (cyclomatic 43) devshell/site/assets/js/app-input-ui.js:276— app-input-ui.mount::render 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. This shape REPEATS in the file: 5 other methods here (app-input-ui.mount, app-input-ui.mount::rememberSplit, app-input-ui.mount::renderSettings, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
app-input-ui.mount::describe (cyclomatic 23) devshell/site/assets/js/app-input-ui.js:843— app-input-ui.mount::describe has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 5 other methods here (app-input-ui.mount, app-input-ui.mount::rememberSplit, app-input-ui.mount::render, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
app-input-ui.mount::customize::rows (cyclomatic 17) devshell/site/assets/js/app-input-ui.js:650— app-input-ui.mount::customize::rows 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: 5 other methods here (app-input-ui.mount, app-input-ui.mount::rememberSplit, app-input-ui.mount::render, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
app-input-ui.mount::rememberSplit (cyclomatic 16) devshell/site/assets/js/app-input-ui.js:264— app-input-ui.mount::rememberSplit 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 shape REPEATS in the file: 5 other methods here (app-input-ui.mount, app-input-ui.mount::render, app-input-ui.mount::renderSettings, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
app-input-ui.mount::renderSettings (cyclomatic 16) devshell/site/assets/js/app-input-ui.js:509— app-input-ui.mount::renderSettings 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: 5 other methods here (app-input-ui.mount, app-input-ui.mount::rememberSplit, app-input-ui.mount::render, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
calc.createCalcs::callFn (cyclomatic 40) devshell/site/assets/js/calc.js:368— calc.createCalcs::callFn 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: 4 other methods here (calc.createCalcs::clean, calc.createCalcs::evalTree, calc.createCalcs::setRow, …) 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.
calc.createCalcs::clean (cyclomatic 29) devshell/site/assets/js/calc.js:269— calc.createCalcs::clean 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. This shape REPEATS in the file: 4 other methods here (calc.createCalcs::evalTree, calc.createCalcs::callFn, calc.createCalcs::setRow, …) 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.
calc.createCalcs::evalTree (cyclomatic 28) devshell/site/assets/js/calc.js:321— calc.createCalcs::evalTree has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (calc.createCalcs::clean, calc.createCalcs::callFn, calc.createCalcs::setRow, …) 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.
calc.createCalcs::plan (cyclomatic 25) devshell/site/assets/js/calc.js:548— calc.createCalcs::plan 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: 4 other methods here (calc.createCalcs::clean, calc.createCalcs::evalTree, calc.createCalcs::callFn, …) 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.
calc.createCalcs::setRow (cyclomatic 20) devshell/site/assets/js/calc.js:512— calc.createCalcs::setRow 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 shape REPEATS in the file: 4 other methods here (calc.createCalcs::clean, calc.createCalcs::evalTree, calc.createCalcs::callFn, …) 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.
app-input-ui.mount::render (cognitive 74) devshell/site/assets/js/app-input-ui.js:276— app-input-ui.mount::render has cognitive complexity 74 (threshold 15). Drivers by points: if/else 14 (29 pts), ternaries 8 (23 pts), boolean chains 13, loops 4 (9 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent 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: 5 other methods here (app-input-ui.mount, app-input-ui.mount::rememberSplit, app-input-ui.mount::customize::placeVal, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
app-input-ui.mount::customize::rows (cognitive 34) devshell/site/assets/js/app-input-ui.js:650— app-input-ui.mount::customize::rows has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 7, ternaries 2 (7 pts), loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 5 other methods here (app-input-ui.mount, app-input-ui.mount::rememberSplit, app-input-ui.mount::render, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
app-input-ui.mount::rememberSplit (cognitive 22) devshell/site/assets/js/app-input-ui.js:264— app-input-ui.mount::rememberSplit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 6, loops 3 (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. This shape REPEATS in the file: 5 other methods here (app-input-ui.mount, app-input-ui.mount::render, app-input-ui.mount::customize::placeVal, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
app-input-ui.mount::customize::placeVal (cognitive 18) devshell/site/assets/js/app-input-ui.js:641— app-input-ui.mount::customize::placeVal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 5 other methods here (app-input-ui.mount, app-input-ui.mount::rememberSplit, app-input-ui.mount::render, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
app-input-ui.mount::describe (cognitive 18) devshell/site/assets/js/app-input-ui.js:843— app-input-ui.mount::describe has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, ternaries 3 (4 pts), if/else 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 5 other methods here (app-input-ui.mount, app-input-ui.mount::rememberSplit, app-input-ui.mount::render, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
calc.createCalcs::clean (cognitive 44) devshell/site/assets/js/calc.js:269— calc.createCalcs::clean has cognitive complexity 44 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 6 (11 pts), ternaries 5 (11 pts), boolean chains 10 (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: 4 other methods here (calc.createCalcs::evalTree, calc.createCalcs::callFn, calc.createCalcs::setRow, …) 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.
calc.createCalcs::plan (cognitive 41) devshell/site/assets/js/calc.js:548— calc.createCalcs::plan has cognitive complexity 41 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 6 (15 pts), boolean chains 10, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 4 other methods here (calc.createCalcs::clean, calc.createCalcs::evalTree, calc.createCalcs::callFn, …) 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.
calc.createCalcs::evalTree (cognitive 36) devshell/site/assets/js/calc.js:321— calc.createCalcs::evalTree has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (27 pts), ternaries 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 21). 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: 4 other methods here (calc.createCalcs::clean, calc.createCalcs::callFn, calc.createCalcs::setRow, …) 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.
calc.createCalcs::callFn (cognitive 35) devshell/site/assets/js/calc.js:368— calc.createCalcs::callFn has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 4 (9 pts), boolean chains 3, 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. This shape REPEATS in the file: 4 other methods here (calc.createCalcs::clean, calc.createCalcs::evalTree, calc.createCalcs::setRow, …) 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.
calc.createCalcs::setRow (cognitive 21) devshell/site/assets/js/calc.js:512— calc.createCalcs::setRow has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 3 (4 pts), loops 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. This shape REPEATS in the file: 4 other methods here (calc.createCalcs::clean, calc.createCalcs::evalTree, calc.createCalcs::callFn, …) 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.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×4
Focus outline removed in CSS without a :focus replacement devshell/site/assets/css/app-input.css:120— `.cc-in-input: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 devshell/site/assets/css/app-shell.css:781— `.shell-palette-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 devshell/site/assets/css/app-workspace.css:425— `.ws-cmdline .ws-cmd-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 devshell/site/assets/css/help.css:70— `.help-body: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.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×4
Animation without a prefers-reduced-motion guard devshell/site/assets/css/app-shell.css:1173— `[data-af]::after` moves (`transition: transform .12s`) 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.
Animation without a prefers-reduced-motion guard devshell/site/assets/css/app-shell.css:1194— `:is(main details, .shell-fold):not([class*="menu"], [class*="more"], .cc-snapkinds, .sp) > summary:not([class*="tool"], [class*="btn"], [class*="linkbtn"], [class*="tab"])::after` moves (`transition: transform .12s`) 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.
Animation without a prefers-reduced-motion guard devshell/site/assets/css/app-shell.css:1258— `.app-bar-boot-clock` moves (`animation: app-boot-spin 1.6s linear infinite`) 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.
Animation without a prefers-reduced-motion guard devshell/site/assets/css/site.css:150— `.nav-dd > summary .dd-caret` moves (`transition: transform .15s ease`) 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.
app-workspace.mountWorkspaces::mountPalettes (cyclomatic 29) devshell/site/assets/js/app-workspace.js:682— app-workspace.mountWorkspaces::mountPalettes has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 4 other methods here (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::refreshPalettes, app-workspace.mountWorkspaces::leave, …) 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.
app-workspace.mountWorkspaces::refresh (cyclomatic 24) devshell/site/assets/js/app-workspace.js:1035— app-workspace.mountWorkspaces::refresh 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 shape REPEATS in the file: 4 other methods here (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::mountPalettes, app-workspace.mountWorkspaces::refreshPalettes, …) 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.
app-workspace.mountWorkspaces::refreshPalettes (cyclomatic 22) devshell/site/assets/js/app-workspace.js:754— app-workspace.mountWorkspaces::refreshPalettes 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 (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::mountPalettes, app-workspace.mountWorkspaces::leave, …) 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.
app-workspace.mountWorkspaces::leave (cyclomatic 19) devshell/site/assets/js/app-workspace.js:990— app-workspace.mountWorkspaces::leave has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 4 other methods here (app-workspace.mountWorkspaces, app-workspace.mountWorkspaces::mountPalettes, app-workspace.mountWorkspaces::refreshPalettes, …) 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.
live-classroom.attachClassroom::publish (cyclomatic 18) app/live-classroom.js:491— live-classroom.attachClassroom::publish has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 4 other methods here (live-classroom.attachClassroom, live-classroom.attachClassroom::ingest, live-classroom.attachClassroom::roster, …) 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.
live-classroom.attachClassroom::lookIn (cyclomatic 18) app/live-classroom.js:613— live-classroom.attachClassroom::lookIn 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 shape REPEATS in the file: 4 other methods here (live-classroom.attachClassroom, live-classroom.attachClassroom::ingest, live-classroom.attachClassroom::publish, …) 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.
live-classroom.attachClassroom::ingest (cyclomatic 16) app/live-classroom.js:443— live-classroom.attachClassroom::ingest 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 (live-classroom.attachClassroom, live-classroom.attachClassroom::publish, live-classroom.attachClassroom::roster, …) 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.
live-classroom.attachClassroom::roster (cyclomatic 16) app/live-classroom.js:597— live-classroom.attachClassroom::roster 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 (live-classroom.attachClassroom, live-classroom.attachClassroom::ingest, live-classroom.attachClassroom::publish, …) 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.
route.route::search (cognitive 49) devshell/site/assets/js/engines/pcb/route.js:111— route.route::search has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 5 (9 pts), boolean chains 8 (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: 4 other methods here (route.route, route.route::raster, route.route::routeNet, …) 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.
route.route::routeNet::access (cognitive 27) devshell/site/assets/js/engines/pcb/route.js:72— route.route::routeNet::access has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 3 (10 pts), boolean chains 2 (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. This shape REPEATS in the file: 4 other methods here (route.route, route.route::raster, route.route::routeNet, …) 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.
route.route::routeNet (cognitive 25) devshell/site/assets/js/engines/pcb/route.js:70— route.route::routeNet has cognitive complexity 25 (threshold 15). Drivers by points: loops 9 (14 pts), if/else 6 (11 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. This shape REPEATS in the file: 4 other methods here (route.route, route.route::raster, route.route::routeNet::access, …) 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.
route.route::raster (cognitive 19) devshell/site/assets/js/engines/pcb/route.js:31— route.route::raster has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (8 pts), ternaries 1 (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: 4 other methods here (route.route, route.route::routeNet, route.route::routeNet::access, …) 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.
ui.mountRegsUi::packRow (cognitive 35) app/addons/regs/lib/ui.js:243— ui.mountRegsUi::packRow has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 18 (21 pts), boolean chains 12, if/else 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: 3 other methods here (ui.mountRegsUi::fmt, ui.mountRegsUi::sheetHtml::fmtV, ui.mountRegsUi::fmtAny) 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.
ui.mountRegsUi::sheetHtml::fmtV (cognitive 29) app/addons/regs/lib/ui.js:496— ui.mountRegsUi::sheetHtml::fmtV has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 7 (28 pts), boolean chains 1 (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. This shape REPEATS in the file: 3 other methods here (ui.mountRegsUi::fmt, ui.mountRegsUi::packRow, ui.mountRegsUi::fmtAny) 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.
ui.mountRegsUi::fmt (cognitive 21) app/addons/regs/lib/ui.js:226— ui.mountRegsUi::fmt has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (21 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. This shape REPEATS in the file: 3 other methods here (ui.mountRegsUi::packRow, ui.mountRegsUi::sheetHtml::fmtV, ui.mountRegsUi::fmtAny) 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.
ui.mountRegsUi::fmtAny (cognitive 21) app/addons/regs/lib/ui.js:663— ui.mountRegsUi::fmtAny has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (21 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. This shape REPEATS in the file: 3 other methods here (ui.mountRegsUi::fmt, ui.mountRegsUi::packRow, ui.mountRegsUi::sheetHtml::fmtV) 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.
R10 · Code Duplication· Duplicated block with local edits (7 matched lines × 2 locations) · ×4
Duplicated block with local edits (7 matched lines × 2 locations) app/dwg/container-write.js:155— app/dwg/container-write.js:155 · app/dwg/container-write.js:177 — the two spans are one implementation copied and then locally edited — 124 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 (7 matched lines × 2 locations) app/dwg/lz-r2004-write.js:126— app/dwg/lz-r2004-write.js:126 · app/dwg/lz-r2004-write.js:136 — the two spans are one implementation copied and then locally edited — 53 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 (7 matched lines × 2 locations) app/fem/frame-push.js:113— app/fem/frame-push.js:113 · app/fem/model.js:149 — the two spans are one implementation copied and then locally edited — 128 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 (7 matched lines × 2 locations) app/geom.js:14— app/geom.js:14 · app/viewcube.js:35 — 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.
usdc-write.writeUsdc::packScalar (cyclomatic 37) app/usd/usdc-write.js:129— usdc-write.writeUsdc::packScalar 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. This shape REPEATS in the file: 2 other methods here (usdc-write.writeUsdc::pack, usdc-write.writeUsdc::packListOp) 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.
usdc-write.writeUsdc::pack (cyclomatic 27) app/usd/usdc-write.js:76— usdc-write.writeUsdc::pack has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: 2 other methods here (usdc-write.writeUsdc::packScalar, usdc-write.writeUsdc::packListOp) 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.
usdc-write.writeUsdc::packListOp (cyclomatic 17) app/usd/usdc-write.js:192— usdc-write.writeUsdc::packListOp 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. This shape REPEATS in the file: 2 other methods here (usdc-write.writeUsdc::pack, usdc-write.writeUsdc::packScalar) 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.
ai-ask.createAsk::runEngine (cyclomatic 33) devshell/site/assets/js/ai-ask.js:228— ai-ask.createAsk::runEngine 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 shape REPEATS in the file: 3 other methods here (ai-ask.createAsk, ai-ask.createAsk::runAskEngine, ai-ask.createAsk::runAskEngine::callTool) 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.
ai-ask.createAsk::runAskEngine (cyclomatic 27) devshell/site/assets/js/ai-ask.js:185— ai-ask.createAsk::runAskEngine has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 3 other methods here (ai-ask.createAsk, ai-ask.createAsk::runAskEngine::callTool, ai-ask.createAsk::runEngine) 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.
ai-ask.createAsk::runAskEngine::callTool (cyclomatic 17) devshell/site/assets/js/ai-ask.js:192— ai-ask.createAsk::runAskEngine::callTool 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. This shape REPEATS in the file: 3 other methods here (ai-ask.createAsk, ai-ask.createAsk::runAskEngine, ai-ask.createAsk::runEngine) 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.
app-access.boot::mount::onKey (cognitive 81) REDACTED:436— app-access.boot::mount::onKey has cognitive complexity 81 (threshold 15). Drivers by points: if/else 36 (47 pts), ternaries 9 (18 pts), boolean chains 16 (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. This shape REPEATS in the file: 2 other methods here (app-access.boot::set, app-access.boot::h) 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.
app-access.boot::set (cognitive 23) REDACTED:346— app-access.boot::set has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (app-access.boot::h, app-access.boot::mount::onKey) 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.
app-access.boot::h (cognitive 19) REDACTED:366— app-access.boot::h has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (6 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (app-access.boot::set, app-access.boot::mount::onKey) 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.
ai-ask.createAsk::runEngine (cognitive 50) devshell/site/assets/js/ai-ask.js:228— ai-ask.createAsk::runEngine has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 10, ternaries 4 (8 pts), error handling 2 (4 pts), loops 3 (4 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. This shape REPEATS in the file: 3 other methods here (ai-ask.createAsk, ai-ask.createAsk::runAskEngine, ai-ask.createAsk::runAskEngine::callTool) 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.
ai-ask.createAsk::runAskEngine (cognitive 24) devshell/site/assets/js/ai-ask.js:185— ai-ask.createAsk::runAskEngine has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (9 pts), error handling 1, ternaries 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 3 other methods here (ai-ask.createAsk, ai-ask.createAsk::runAskEngine::callTool, ai-ask.createAsk::runEngine) 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.
ai-ask.createAsk::runAskEngine::callTool (cognitive 18) devshell/site/assets/js/ai-ask.js:192— ai-ask.createAsk::runAskEngine::callTool has cognitive complexity 18 (threshold 15). Drivers by points: error handling 4 (7 pts), boolean chains 6, if/else 4, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (ai-ask.createAsk, ai-ask.createAsk::runAskEngine, ai-ask.createAsk::runEngine) 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.
usdc-write.writeUsdc::packScalar (cognitive 42) app/usd/usdc-write.js:129— usdc-write.writeUsdc::packScalar has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (10 pts), ternaries 2 (6 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (usdc-write.writeUsdc::pack, usdc-write.writeUsdc::packListOp) 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.
usdc-write.writeUsdc::packListOp (cognitive 23) app/usd/usdc-write.js:192— usdc-write.writeUsdc::packListOp has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, loops 3 (6 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (usdc-write.writeUsdc::pack, usdc-write.writeUsdc::packScalar) 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.
usdc-write.writeUsdc::pack (cognitive 17) app/usd/usdc-write.js:76— usdc-write.writeUsdc::pack has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4 (5 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (usdc-write.writeUsdc::packScalar, usdc-write.writeUsdc::packListOp) 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.
live-classroom.attachClassroom::ingest (cognitive 22) app/live-classroom.js:443— live-classroom.attachClassroom::ingest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (live-classroom.attachClassroom, live-classroom.attachClassroom::roster, live-classroom.attachClassroom::lookIn) 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.
live-classroom.attachClassroom::roster (cognitive 21) app/live-classroom.js:597— live-classroom.attachClassroom::roster has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 9, 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. This shape REPEATS in the file: 3 other methods here (live-classroom.attachClassroom, live-classroom.attachClassroom::ingest, live-classroom.attachClassroom::lookIn) 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.
live-classroom.attachClassroom::lookIn (cognitive 21) app/live-classroom.js:613— live-classroom.attachClassroom::lookIn has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 3 (6 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (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. This shape REPEATS in the file: 3 other methods here (live-classroom.attachClassroom, live-classroom.attachClassroom::ingest, live-classroom.attachClassroom::roster) 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.
Low cohesion: IfcAPI (LCOM4 4) app/ifc/api.js:79— IfcAPI'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: IfcAPI (LCOM4 4) tests/lib/ifc/api.js:79— IfcAPI'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: PeerBase (LCOM4 4) tests/lib/process/capeopen/protocol.js:37— PeerBase'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.
Duplicated block (9 lines × 2 locations) app/dwg/solid-write.js:101— app/dwg/solid-write.js:101 · app/dwg/surface-write.js:66 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (9 lines × 2 locations) app/frame/frame-solve.js:379— app/frame/frame-solve.js:379 · app/frame/plate-solve.js:258 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (9 lines × 2 locations) REDACTED:63— REDACTED:63 · app/usd/util.js:120 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication· Duplicated block with local edits (6 matched lines × 2 locations) · ×3
Duplicated block with local edits (6 matched lines × 2 locations) app/analysis.js:68— app/analysis.js:68 · app/analysis.js:229 — the two spans are one implementation copied and then locally edited — 52 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 (6 matched lines × 2 locations) app/app-autosave.js:420— app/app-autosave.js:420 · app/app-autosave.js:462 — the two spans are one implementation copied and then locally edited — 92 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 (6 matched lines × 2 locations) app/clash.js:28— app/clash.js:28 · app/geom.js:14 — 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.
X25 · Inert configuration knob· Option is kept and never read · ×3
Option is kept and never read devshell/site/assets/js/totals.js:40— `createTotals` accepts `now` from the caller and keeps it in `now` on line 40, where only it can read the value — but nothing ever reads `now`. Setting `now` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `now` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `now` from the accepted options so callers stop setting a knob that does nothing.
Option is kept and never read devshell/site/assets/js/engines/motion/traj.js:36— `jointMove` accepts `robot.dof` from the caller and keeps it in `n` on line 36, where only it can read the value — but nothing ever reads `n`. Setting `robot.dof` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `n` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `robot.dof` from the accepted options so callers stop setting a knob that does nothing.
Option is kept and never read app/frame/frame-weld.js:198— `checkWelds` accepts `n` from the caller and keeps it in `n` on line 198, where only it can read the value — but nothing ever reads `n`. Setting `n` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `n` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `n` from the accepted options so callers stop setting a knob that does nothing.
Empty <h2> heading devshell/site/assets/js/app-tools-ui.js:33— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Empty <h2> heading devshell/site/assets/js/app-totals.js:74— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
Low contrast colour pair in CSS (1.2:1) devshell/site/assets/css/app-workspace.css:431— `.ws-cmd-pop li[aria-selected="true"], .ws-cmd-pop li:hover` sets color: #fff on background-color: #E6ECF2 — 1.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.2:1) devshell/site/assets/css/app-workspace.css:530— `:is(.ws-palettes) button.btn-plot:hover` sets color: #fff on background-color: #E3E9EF — 1.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
writeDwg::convert (cyclomatic 197) app/dwg/write.js:374— writeDwg::convert has cyclomatic complexity 197 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
writeDwg::addLayer (cyclomatic 30) app/dwg/write.js:175— writeDwg::addLayer has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
extendWriter::finish (cyclomatic 192) app/dwg/nongraphic-write.js:236— extendWriter::finish has cyclomatic complexity 192 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
extendWriter::convert (cyclomatic 17) app/dwg/nongraphic-write.js:213— extendWriter::convert 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.
createDispatcher::handle (cyclomatic 77) REDACTED:960— createDispatcher::handle has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
createDispatcher::call (cyclomatic 59) REDACTED:874— createDispatcher::call has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
runtime.analyze::ty (cyclomatic 63) devshell/site/assets/js/engines/plc/runtime.js:44— runtime.analyze::ty has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (runtime.analyze, runtime.analyze::walk) 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.
runtime.analyze::walk (cyclomatic 47) devshell/site/assets/js/engines/plc/runtime.js:94— runtime.analyze::walk 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. This shape REPEATS in the file: 2 other methods here (runtime.analyze, runtime.analyze::ty) 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.
app-devices-ui.boot::tick (cyclomatic 35) devshell/site/assets/js/app-devices-ui.js:180— app-devices-ui.boot::tick has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (app-devices-ui.boot, app-devices-ui.boot::viewAt) 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.
app-devices-ui.boot::viewAt (cyclomatic 17) devshell/site/assets/js/app-devices-ui.js:75— app-devices-ui.boot::viewAt 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: 2 other methods here (app-devices-ui.boot, app-devices-ui.boot::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.
mountRegsUi::render::packRow (cyclomatic 35) app/addons/regs/lib/ui.js:243— mountRegsUi::render::packRow has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mountRegsUi::render::paint (cyclomatic 19) app/addons/regs/lib/ui.js:595— mountRegsUi::render::paint 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.
live-follow.attachFollow::track (cyclomatic 31) app/live-follow.js:192— live-follow.attachFollow::track has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (live-follow.attachFollow::row) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
live-follow.attachFollow::row (cyclomatic 19) app/live-follow.js:266— live-follow.attachFollow::row has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (live-follow.attachFollow::track) 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.
live-presence.attachPresence::frame (cyclomatic 29) app/live-presence.js:247— live-presence.attachPresence::frame 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. This shape REPEATS in the file: one other method here (live-presence.attachPresence::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.
live-presence.attachPresence::tick (cyclomatic 16) app/live-presence.js:212— live-presence.attachPresence::tick 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 (live-presence.attachPresence::frame) 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.
app-ai-ask.boot::render (cyclomatic 27) devshell/site/assets/js/app-ai-ask.js:65— app-ai-ask.boot::render has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (app-ai-ask.boot::qEl) 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.
app-ai-ask.boot::qEl (cyclomatic 23) devshell/site/assets/js/app-ai-ask.js:47— app-ai-ask.boot::qEl has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (app-ai-ask.boot::render) 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.
textin.parseJsonParts::value (cyclomatic 22) app/textin.js:176— textin.parseJsonParts::value 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 (textin.parseJsonParts::str) 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.
textin.parseJsonParts::str (cyclomatic 16) app/textin.js:148— textin.parseJsonParts::str 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 (textin.parseJsonParts::value) 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.
app-ai-assist.mountAssist::workspace (cyclomatic 18) devshell/site/assets/js/app-ai-assist.js:72— app-ai-assist.mountAssist::workspace 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 shape REPEATS in the file: one other method here (app-ai-assist.mountAssist::drawGuide) 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.
app-ai-assist.mountAssist::drawGuide (cyclomatic 17) devshell/site/assets/js/app-ai-assist.js:138— app-ai-assist.mountAssist::drawGuide 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 (app-ai-assist.mountAssist::workspace) 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.
makeRecent::add (cyclomatic 17) REDACTED:277— makeRecent::add 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.
makeRecent::open (cyclomatic 16) REDACTED:314— makeRecent::open 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.
extendWriter::finish (cognitive 283) app/dwg/nongraphic-write.js:236— extendWriter::finish has cognitive complexity 283 (threshold 15). Drivers by points: if/else 69 (152 pts), boolean chains 66, loops 32 (52 pts), ternaries 4 (11 pts), other 2 (nesting depth added 110). 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.
extendWriter::convert (cognitive 22) app/dwg/nongraphic-write.js:213— extendWriter::convert has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), ternaries 3 (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.
runtime.analyze::ty (cognitive 87) devshell/site/assets/js/engines/plc/runtime.js:44— runtime.analyze::ty has cognitive complexity 87 (threshold 15). Drivers by points: if/else 27 (64 pts), boolean chains 19, ternaries 1 (3 pts), match/switch 1 (nesting depth added 39). 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: 2 other methods here (runtime.analyze, runtime.analyze::walk) 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.
runtime.analyze::walk (cognitive 82) devshell/site/assets/js/engines/plc/runtime.js:94— runtime.analyze::walk has cognitive complexity 82 (threshold 15). Drivers by points: if/else 19 (53 pts), boolean chains 11, loops 4 (11 pts), ternaries 1 (5 pts), match/switch 1 (2 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (runtime.analyze, runtime.analyze::ty) 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.
createDispatcher::handle (cognitive 81) REDACTED:960— createDispatcher::handle has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 15 (28 pts), boolean chains 27, if/else 13 (24 pts), error handling 1, match/switch 1 (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.
createDispatcher::call (cognitive 73) REDACTED:874— createDispatcher::call has cognitive complexity 73 (threshold 15). Drivers by points: if/else 26 (31 pts), boolean chains 20, ternaries 10 (19 pts), error handling 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-devices-ui.boot::tick (cognitive 47) devshell/site/assets/js/app-devices-ui.js:180— app-devices-ui.boot::tick has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 13, loops 3 (8 pts), ternaries 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. This shape REPEATS in the file: 2 other methods here (app-devices-ui.boot, app-devices-ui.boot::viewAt) 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.
app-devices-ui.boot::viewAt (cognitive 17) devshell/site/assets/js/app-devices-ui.js:75— app-devices-ui.boot::viewAt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (app-devices-ui.boot, app-devices-ui.boot::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.
makeControl::configure (cognitive 42) REDACTED:1201— makeControl::configure has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (19 pts), ternaries 9 (18 pts), boolean chains 5 (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.
makeControl::handle (cognitive 41) REDACTED:1110— makeControl::handle has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 20, if/else 9 (12 pts), ternaries 5 (7 pts), loops 1 (2 pts) (nesting depth added 6). 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.
textin.parseJsonParts::value (cognitive 40) app/textin.js:176— textin.parseJsonParts::value has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (33 pts), loops 2 (4 pts), boolean chains 2, 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: one other method here (textin.parseJsonParts::str) 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.
textin.parseJsonParts::str (cognitive 31) app/textin.js:148— textin.parseJsonParts::str has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (textin.parseJsonParts::value) 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.
gds.flatten::walk (cognitive 37) devshell/site/assets/js/engines/pcb/gds.js:108— gds.flatten::walk has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 3 (10 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (gds.flatten::pathPoly) 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.
gds.flatten::pathPoly (cognitive 18) devshell/site/assets/js/engines/pcb/gds.js:97— gds.flatten::pathPoly has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (5 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (gds.flatten::walk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
live-follow.attachFollow::track (cognitive 34) app/live-follow.js:192— live-follow.attachFollow::track has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 12, ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (live-follow.attachFollow::row) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
live-follow.attachFollow::row (cognitive 20) app/live-follow.js:266— live-follow.attachFollow::row has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (live-follow.attachFollow::track) 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.
mountRegsUi::render::packRow (cognitive 33) app/addons/regs/lib/ui.js:243— mountRegsUi::render::packRow has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 19, boolean chains 12, if/else 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.
mountRegsUi::render::paint (cognitive 20) app/addons/regs/lib/ui.js:595— mountRegsUi::render::paint has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 7, boolean chains 4, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
app-ai-ask.boot::render (cognitive 30) devshell/site/assets/js/app-ai-ask.js:65— app-ai-ask.boot::render has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 10, 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. This shape REPEATS in the file: one other method here (app-ai-ask.boot::qEl) 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.
app-ai-ask.boot::qEl (cognitive 20) devshell/site/assets/js/app-ai-ask.js:47— app-ai-ask.boot::qEl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 2 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (app-ai-ask.boot::render) 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.
m3d.writeM3d::writeMesh (cognitive 27) app/usd/m3d.js:105— m3d.writeM3d::writeMesh has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, loops 3 (5 pts), ternaries 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. This shape REPEATS in the file: one other method here (m3d.writeM3d::writeGeometry) 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.
m3d.writeM3d::writeGeometry (cognitive 23) app/usd/m3d.js:68— m3d.writeM3d::writeGeometry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 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 (m3d.writeM3d::writeMesh) 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.
write.writeDwg::addLayer (cognitive 26) app/dwg/write.js:175— write.writeDwg::addLayer has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (8 pts), if/else 7 (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. This shape REPEATS in the file: one other method here (write.writeDwg::extAdd) 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.
write.writeDwg::extAdd (cognitive 26) app/dwg/write.js:629— write.writeDwg::extAdd has cognitive complexity 26 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 3 (8 pts), ternaries 1 (3 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. This shape REPEATS in the file: one other method here (write.writeDwg::addLayer) 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.
makeRecent::open (cognitive 26) REDACTED:314— makeRecent::open has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, ternaries 2 (5 pts), error handling 2 (4 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.
makeRecent::add (cognitive 23) REDACTED:277— makeRecent::add has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 3 (6 pts), boolean chains 4, loops 2, other 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-ai-assist.mountAssist::drawGuide (cognitive 23) devshell/site/assets/js/app-ai-assist.js:138— app-ai-assist.mountAssist::drawGuide has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 4 (5 pts), error handling 2 (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: one other method here (app-ai-assist.mountAssist::workspace) 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.
app-ai-assist.mountAssist::workspace (cognitive 18) devshell/site/assets/js/app-ai-assist.js:72— app-ai-assist.mountAssist::workspace has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (10 pts), boolean chains 7, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (app-ai-assist.mountAssist::drawGuide) 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.
attachClassroom::publish (cognitive 18) app/live-classroom.js:491— attachClassroom::publish has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, ternaries 3 (5 pts), if/else 3, error handling 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
attachClassroom::apply (cognitive 17) app/live-classroom.js:390— attachClassroom::apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MethodTooLong: View3D.setModel app/view3d.js:213— MethodTooLong — setModel runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: View3D.bindPointer app/view3d.js:737— MethodTooLong — bindPointer runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
R10 · Code Duplication· Duplicated block with local edits (12 matched lines × 2 locations) · ×2
Duplicated block with local edits (12 matched lines × 2 locations) app/frame/frame-loads-panel.js:76— app/frame/frame-loads-panel.js:76 · app/frame/frame-loads-panel.js:113 — the two spans are one implementation copied and then locally edited — 170 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 (12 matched lines × 2 locations) app/history/history.js:91— app/history/history.js:91 · app/history/history.js:117 — the two spans are one implementation copied and then locally edited — 170 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 (11 lines × 2 locations) app/frame/frame-concrete-panel.js:69— app/frame/frame-concrete-panel.js:69 · app/frame/frame-panel.js:547 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (11 lines × 2 locations) app/rc/schedule.js:46— app/rc/schedule.js:46 · app/rebar.js:277 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) app/clash.js:113— app/clash.js:113 · app/drawings.js:221 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (8 lines × 2 locations) app/frame/plate-mesh.js:32— app/frame/plate-mesh.js:32 · app/ifc/geo-nurbs.js:657 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (6 lines × 2 locations) app/addons/regs/lib/sections.js:186— app/addons/regs/lib/sections.js:186 · app/addons/regs/lib/sections.js:192 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (6 lines × 2 locations) app/clash.js:44— app/clash.js:44 · app/winsel.js:40 — 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.
Boundary violation [package:test-suite-dependency] REDACTED:1117— REDACTED:1117 imports tests/lib/process/engines.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] REDACTED:1126— REDACTED:1126 imports tests/lib/process/engines.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Complex function convert (cyclomatic 197, cognitive 216) app/dwg/write.js:374— convert has cyclomatic complexity 197 and cognitive complexity 216; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function convert (cyclomatic 197, cognitive 216) tests/lib/dwg/write.js:374— convert has cyclomatic complexity 197 and cognitive complexity 216; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function writeDwg (cyclomatic 194, cognitive 256) app/dwg/write.js:87— writeDwg has cyclomatic complexity 194 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.
Complex function writeDwg (cyclomatic 194, cognitive 256) tests/lib/dwg/write.js:87— writeDwg has cyclomatic complexity 194 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.
Complex function finish (cyclomatic 192, cognitive 283) app/dwg/nongraphic-write.js:236— finish has cyclomatic complexity 192 and cognitive complexity 283; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function finish (cyclomatic 192, cognitive 283) tests/lib/dwg/nongraphic-write.js:236— finish has cyclomatic complexity 192 and cognitive complexity 283; 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.
Dead file (~427 LoC) app/dwg/container-write.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 1 other file(s) do name it (app/dwg/write.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
Dead file (~427 LoC) app/usd/usdc-read.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (app/usd/index.js, app/usd/stage.js, app/usd/usdc-write.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
Dead file (~354 LoC) app/bundle/read.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/bundle/plan.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
Dead file (~354 LoC) app/ifc.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/detailcraft.js, app/export-ui.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
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×2
JavaScript dependencies are not locked tests/tools/library/package.json:6— tests/tools/library/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked tests/tools/mcp/package.json:14— tests/tools/mcp/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×2
Untrusted text written into markup unescaped app/addons/regs/lib/ui.js:501— `esc(c.source.url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
Untrusted text written into markup unescaped app/frame/frame-dynamics-panel.js:115— `svg` 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.
AC1 · Text alternatives· <canvas> without a text alternative · ×1
<canvas> without a text alternative app/live-classroom.js:556— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC2 · Forms & labels· <fieldset> with an empty <legend> · ×1
<fieldset> with an empty <legend> devshell/site/assets/js/app-ai-suggest.js:106— The fieldset's <legend> has no text, so the control group has no name. Put descriptive text in the <legend>.
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×1
Modal dialog does not manage focus devshell/site/assets/js/app-tools-ui.js:34— This <section role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
No authorization devshell/serve.mjs:102— This repository serves requests — http.createServer (devshell/serve.mjs:102) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected.
nongraphic-write.extendWriter (cyclomatic 312) app/dwg/nongraphic-write.js:170— nongraphic-write.extendWriter has cyclomatic complexity 312 (threshold 15). Of this number, 144 points are the body's own statements and 168 belong to 18 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.
host.createDispatcher (cyclomatic 223) REDACTED:823— host.createDispatcher has cyclomatic complexity 223 (threshold 15). Of this number, 145 points are the body's own statements and 78 belong to 19 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.
write.writeDwg (cyclomatic 194) app/dwg/write.js:87— write.writeDwg has cyclomatic complexity 194 (threshold 15). To reduce it, separate the cases: extract each independent 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 (write.writeDwg::extAdd) 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.
constructability.constructability (cyclomatic 148) app/constructability.js:58— constructability.constructability has cyclomatic complexity 148 (threshold 15). Of this number, 126 points are the body's own statements and 22 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
regs.cleanPack (cyclomatic 126) app/addons/regs/lib/regs.js:127— regs.cleanPack has cyclomatic complexity 126 (threshold 15). Of this number, 98 points are the body's own statements and 28 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.
fields.readPack (cyclomatic 123) devshell/site/assets/js/fields.js:41— fields.readPack has cyclomatic complexity 123 (threshold 15). Of this number, 111 points are the body's own statements and 12 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.
sharedApi (cyclomatic 119) REDACTED:862— sharedApi has cyclomatic complexity 119 (threshold 15). Most of this is not in the body itself: 2 of the 119 points are its own statements and the rest belongs to 62 function items inside it that branch (toolbarGroup, toolbarGroup::makeBtn, settingsSection, …). 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.
app-phone.penAndTouch (cyclomatic 116) devshell/site/assets/js/app-phone.js:515— app-phone.penAndTouch has cyclomatic complexity 116 (threshold 15). Most of this is not in the body itself: 7 of the 116 points are its own statements and the rest belongs to 27 function items inside it that branch (a function literal at line 585, tapUp, setPref, …). 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.
read43 (cyclomatic 113) app/ifc/ifc43.js:108— read43 has cyclomatic complexity 113 (threshold 15). Of this number, 79 points are the body's own statements and 34 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ifc-import.convert (cyclomatic 112) app/ifc-import.js:67— ifc-import.convert has cyclomatic complexity 112 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
detailTools (cyclomatic 112) REDACTED:90— detailTools has cyclomatic complexity 112 (threshold 15). Most of this is not in the body itself: 1 of the 112 points is its own statement and the rest belongs to 86 function items inside it that branch (run, run, a function literal at line 299, …). 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.
model.readModel (cyclomatic 105) app/model.js:665— model.readModel has cyclomatic complexity 105 (threshold 15). Of this number, 98 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.
ai-activity.createActivityLog (cyclomatic 105) devshell/site/assets/js/ai-activity.js:85— ai-activity.createActivityLog has cyclomatic complexity 105 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (ai-activity.createActivityLog::normalise) 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.
ai-suggest.createSuggestions (cyclomatic 103) devshell/site/assets/js/ai-suggest.js:71— ai-suggest.createSuggestions has cyclomatic complexity 103 (threshold 15). Of this number, 58 points are the body's own statements and 45 belong to 15 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.
shop.shopDrawing (cyclomatic 100) app/shop.js:37— shop.shopDrawing has cyclomatic complexity 100 (threshold 15). Of this number, 83 points are the body's own statements and 17 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
live.createLive (cyclomatic 99) app/live.js:214— live.createLive has cyclomatic complexity 99 (threshold 15). Of this number, 30 points are the body's own statements and 69 belong to 19 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.
cleanElement (cyclomatic 99) app/rc/elements.js:88— cleanElement has cyclomatic complexity 99 (threshold 15). Of this number, 97 points are the body's own statements and 2 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.
analysis.frameOf (cyclomatic 97) app/analysis.js:63— analysis.frameOf has cyclomatic complexity 97 (threshold 15). Of this number, 76 points are the body's own statements and 21 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
addons.checkManifest (cyclomatic 94) REDACTED:108— addons.checkManifest has cyclomatic complexity 94 (threshold 15). Of this number, 88 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Model.compile (cyclomatic 94) devshell/site/assets/js/engines/sys/model.js:56— Model.compile has cyclomatic complexity 94 (threshold 15). Of this number, 82 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.
oldTable (cyclomatic 93) app/dwg/table-write.js:279— oldTable has cyclomatic complexity 93 (threshold 15). Of this number, 86 points are the body's own statements and 7 belong to 11 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.
plate-solve.prepareShell (cyclomatic 92) app/frame/plate-solve.js:36— plate-solve.prepareShell has cyclomatic complexity 92 (threshold 15). Of this number, 78 points are the body's own statements and 14 belong to 5 function literals 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.
drawings.assemblySheet (cyclomatic 92) app/drawings.js:531— drawings.assemblySheet has cyclomatic complexity 92 (threshold 15). Of this number, 69 points are the body's own statements and 23 belong to 13 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.
View3D.bindPointer (cyclomatic 92) app/view3d.js:737— View3D.bindPointer has cyclomatic complexity 92 (threshold 15). Most of this is not in the body itself: 1 of the 92 points is its own statement and the rest belongs to 14 function items inside it that branch (a function literal at line 777, a function literal at line 819, a function literal at line 875, …). 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.
app-teamwork.boot (cyclomatic 91) devshell/site/assets/js/app-teamwork.js:29— app-teamwork.boot has cyclomatic complexity 91 (threshold 15). Most of this is not in the body itself: 10 of the 91 points are its own statements and the rest belongs to 21 function items inside it that branch (threadView, render, render::modelBody, …). 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.
board.readBoard (cyclomatic 90) devshell/site/assets/js/engines/pcb/board.js:68— board.readBoard has cyclomatic complexity 90 (threshold 15). Of this number, 73 points are the body's own statements and 17 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.
ai-history.createHistory (cyclomatic 87) devshell/site/assets/js/ai-history.js:32— ai-history.createHistory has cyclomatic complexity 87 (threshold 15). Of this number, 64 points are the body's own statements and 23 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
table-write.tableWriter (cyclomatic 84) app/dwg/table-write.js:486— table-write.tableWriter has cyclomatic complexity 84 (threshold 15). Of this number, 33 points are the body's own statements and 51 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.
app-ai-suggest.boot (cyclomatic 84) devshell/site/assets/js/app-ai-suggest.js:32— app-ai-suggest.boot has cyclomatic complexity 84 (threshold 15). Most of this is not in the body itself: 13 of the 84 points are its own statements and the rest belongs to 15 function items inside it that branch (render, projectBox, badge, …). 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.
geo-nurbs.surfaceFace (cyclomatic 82) app/ifc/geo-nurbs.js:315— geo-nurbs.surfaceFace has cyclomatic complexity 82 (threshold 15). Of this number, 65 points are the body's own statements and 17 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundation.checkFooting (cyclomatic 79) app/foundation.js:152— foundation.checkFooting has cyclomatic complexity 79 (threshold 15). Of this number, 46 points are the body's own statements and 33 belong to 18 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rc-design.checkRcFrame (cyclomatic 79) app/frame/rc-design.js:121— rc-design.checkRcFrame has cyclomatic complexity 79 (threshold 15). Most of this is not in the body itself: 4 of the 79 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 155, 131, 161, …). 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.
read.readManifest (cyclomatic 78) app/bundle/read.js:173— read.readManifest has cyclomatic complexity 78 (threshold 15). Of this number, 32 points are the body's own statements and 46 belong to 20 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.
build (cyclomatic 77) app/steelstair/steelstair.js:168— build has cyclomatic complexity 77 (threshold 15). Of this number, 36 points are the body's own statements and 41 belong to 11 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-docinfo.boot (cyclomatic 76) devshell/site/assets/js/app-docinfo.js:30— app-docinfo.boot has cyclomatic complexity 76 (threshold 15). Most of this is not in the body itself: 10 of the 76 points are its own statements and the rest belongs to 21 function items inside it that branch (facts, unverifiedBlock, who, …). 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.
ifc.writeIfc (cyclomatic 74) app/ifc.js:90— ifc.writeIfc has cyclomatic complexity 74 (threshold 15). Of this number, 40 points are the body's own statements and 34 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-workspace-format.validateLayout (cyclomatic 74) devshell/site/assets/js/app-workspace-format.js:223— app-workspace-format.validateLayout 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.
prepare (cyclomatic 74) app/frame/frame-solve.js:195— prepare has cyclomatic complexity 74 (threshold 15). Of this number, 69 points are the body's own statements and 5 belong to 12 function literals 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.
calc.parse (cyclomatic 73) devshell/site/assets/js/calc.js:101— calc.parse has cyclomatic complexity 73 (threshold 15). Most of this is not in the body itself: 3 of the 73 points are its own statements and the rest belongs to 13 function items inside it that branch (unitTail, unitTail::one, atom, …). 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.
newTableModel (cyclomatic 73) app/dwg/table-read.js:627— newTableModel has cyclomatic complexity 73 (threshold 15). Of this number, 18 points are the body's own statements and 55 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.
fields.createFields (cyclomatic 69) devshell/site/assets/js/fields.js:149— fields.createFields has cyclomatic complexity 69 (threshold 15). Of this number, 50 points are the body's own statements and 19 belong to 8 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.
drc.drc (cyclomatic 69) devshell/site/assets/js/engines/pcb/drc.js:21— drc.drc has cyclomatic complexity 69 (threshold 15). Of this number, 49 points are the body's own statements and 20 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.
elements.elementBars (cyclomatic 68) app/rc/elements.js:256— elements.elementBars has cyclomatic complexity 68 (threshold 15). Of this number, 21 points are the body's own statements and 47 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-access.boot::mount::onKey (cyclomatic 68) REDACTED:436— app-access.boot::mount::onKey has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-pen.boot (cyclomatic 67) devshell/site/assets/js/app-pen.js:139— app-pen.boot has cyclomatic complexity 67 (threshold 15). Most of this is not in the body itself: 2 of the 67 points are its own statements and the rest belongs to 14 function items inside it that branch (down, up, move, …). 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.
engine.validate (cyclomatic 66) devshell/site/assets/js/engines/des/engine.js:317— engine.validate has cyclomatic complexity 66 (threshold 15). Of this number, 61 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.
st.lex (cyclomatic 66) devshell/site/assets/js/engines/plc/st.js:27— st.lex has cyclomatic complexity 66 (threshold 15). Of this number, 64 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.
build.build (cyclomatic 65) app/build.js:33— build.build has cyclomatic complexity 65 (threshold 15). Of this number, 63 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.
objects-read.groupType (cyclomatic 65) app/dwg/objects-read.js:1290— objects-read.groupType has cyclomatic complexity 65 (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.
pipes.readPipes (cyclomatic 65) app/ifc/pipes.js:29— pipes.readPipes has cyclomatic complexity 65 (threshold 15). Of this number, 55 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.
gds.readGds (cyclomatic 65) devshell/site/assets/js/engines/pcb/gds.js:23— gds.readGds has cyclomatic complexity 65 (threshold 15). Of this number, 61 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.
gerber.readGerber (cyclomatic 65) devshell/site/assets/js/engines/pcb/gerber.js:142— gerber.readGerber has cyclomatic complexity 65 (threshold 15). Of this number, 62 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.
reasons.createReasons (cyclomatic 63) devshell/site/assets/js/reasons.js:52— reasons.createReasons has cyclomatic complexity 63 (threshold 15). Most of this is not in the body itself: 8 of the 63 points are its own statements and the rest belongs to 10 function items inside it that branch (set, problems, view, …). 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.
mountViewCube (cyclomatic 63) app/viewcube.js:463— mountViewCube has cyclomatic complexity 63 (threshold 15). Of this number, 21 points are the body's own statements and 42 belong to 16 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.
write43 (cyclomatic 63) app/ifc/ifc43.js:380— write43 has cyclomatic complexity 63 (threshold 15). Of this number, 57 points are the body's own statements and 6 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.
frame-model.cleanFrame (cyclomatic 62) app/frame/frame-model.js:76— frame-model.cleanFrame has cyclomatic complexity 62 (threshold 15). Of this number, 26 points are the body's own statements and 36 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
elements.checkElement (cyclomatic 62) app/rc/elements.js:517— elements.checkElement has cyclomatic complexity 62 (threshold 15). Of this number, 53 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.
connections.buildGusset (cyclomatic 60) app/connections.js:590— connections.buildGusset has cyclomatic complexity 60 (threshold 15). Of this number, 57 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ipc2581.writeIpc2581 (cyclomatic 60) devshell/site/assets/js/engines/pcb/ipc2581.js:13— ipc2581.writeIpc2581 has cyclomatic complexity 60 (threshold 15). Of this number, 27 points are the body's own statements and 33 belong to 12 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
reqif.readReqif (cyclomatic 59) devshell/site/assets/js/engines/trace/reqif.js:20— reqif.readReqif has cyclomatic complexity 59 (threshold 15). Of this number, 52 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.
frame-push.pushoverOfFrame (cyclomatic 58) app/fem/frame-push.js:247— frame-push.pushoverOfFrame has cyclomatic complexity 58 (threshold 15). Of this number, 44 points are the body's own statements and 14 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.
sheets.elementSheet (cyclomatic 58) app/rc/sheets.js:76— sheets.elementSheet has cyclomatic complexity 58 (threshold 15). Of this number, 56 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.
plcopen.readLd (cyclomatic 58) REDACTED:106— plcopen.readLd has cyclomatic complexity 58 (threshold 15). Of this number, 47 points are the body's own statements and 11 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
elements.panelBars (cyclomatic 57) app/rc/elements.js:382— elements.panelBars has cyclomatic complexity 57 (threshold 15). Of this number, 32 points are the body's own statements and 25 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
power.loadFlow (cyclomatic 57) devshell/site/assets/js/engines/network/power.js:51— power.loadFlow has cyclomatic complexity 57 (threshold 15). Of this number, 33 points are the body's own statements and 24 belong to 9 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.
connections.buildMitre (cyclomatic 56) app/connections.js:752— connections.buildMitre has cyclomatic complexity 56 (threshold 15). Of this number, 54 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundation.flexibleMat (cyclomatic 56) app/foundation.js:351— foundation.flexibleMat has cyclomatic complexity 56 (threshold 15). Of this number, 37 points are the body's own statements and 19 belong to 7 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.
host.createControlRelay.handle (cyclomatic 56) REDACTED:1774— host.createControlRelay.handle has cyclomatic complexity 56 (threshold 15). Of this number, 54 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.
frame-members.buildFrame (cyclomatic 56) app/frame/frame-members.js:41— frame-members.buildFrame has cyclomatic complexity 56 (threshold 15). Of this number, 37 points are the body's own statements and 19 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
live-classroom.attachClassroom (cyclomatic 56) app/live-classroom.js:250— live-classroom.attachClassroom has cyclomatic complexity 56 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 4 other methods here (live-classroom.attachClassroom::ingest, live-classroom.attachClassroom::publish, live-classroom.attachClassroom::roster, …) 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.
app-input.validateProfile (cyclomatic 56) devshell/site/assets/js/app-input.js:320— app-input.validateProfile has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (app-input.validateProfile::panelItems) 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.
createControlRelay.handle (cyclomatic 56) REDACTED:1774— createControlRelay.handle has cyclomatic complexity 56 (threshold 15). Of this number, 54 points are the body's own statements and 2 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.
frame-solve.runSet (cyclomatic 55) app/frame/frame-solve.js:367— frame-solve.runSet has cyclomatic complexity 55 (threshold 15). Of this number, 36 points are the body's own statements and 19 belong to 5 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.
geo-nurbs.closingUV (cyclomatic 55) app/ifc/geo-nurbs.js:481— geo-nurbs.closingUV has cyclomatic complexity 55 (threshold 15). Of this number, 49 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.
View3D.setModel (cyclomatic 55) app/view3d.js:213— View3D.setModel has cyclomatic complexity 55 (threshold 15). Of this number, 47 points are the body's own statements and 8 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.
rng.distProblem (cyclomatic 55) devshell/site/assets/js/engines/des/rng.js:24— rng.distProblem has cyclomatic complexity 55 (threshold 15). Of this number, 50 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
message (cyclomatic 55) REDACTED:560— message has cyclomatic complexity 55 (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.
usda-read.tokenize (cyclomatic 54) app/usd/usda-read.js:30— usda-read.tokenize has cyclomatic complexity 54 (threshold 15). Of this number, 51 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
solve.simulate (cyclomatic 54) devshell/site/assets/js/engines/sys/solve.js:92— solve.simulate has cyclomatic complexity 54 (threshold 15). Of this number, 43 points are the body's own statements and 11 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
oldTableModel (cyclomatic 53) app/dwg/table-read.js:527— oldTableModel has cyclomatic complexity 53 (threshold 15). Of this number, 49 points are the body's own statements and 4 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nlTimeHistoryOfFrame (cyclomatic 53) app/fem/frame-push.js:351— nlTimeHistoryOfFrame has cyclomatic complexity 53 (threshold 15). Of this number, 38 points are the body's own statements and 15 belong to 22 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.
study.readStudy (cyclomatic 52) app/study/study.js:33— study.readStudy has cyclomatic complexity 52 (threshold 15). Of this number, 33 points are the body's own statements and 19 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.
app-panels.load (cyclomatic 52) devshell/site/assets/js/app-panels.js:113— app-panels.load has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 7 of the 52 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 117, 135, 145, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
check.checkSchematic (cyclomatic 52) devshell/site/assets/js/engines/schematic/check.js:25— check.checkSchematic has cyclomatic complexity 52 (threshold 15). Of this number, 46 points are the body's own statements and 6 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.
plant.layout (cyclomatic 52) REDACTED:246— plant.layout has cyclomatic complexity 52 (threshold 15). Of this number, 24 points are the body's own statements and 28 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
xml.parseXml (cyclomatic 51) app/ids/xml.js:42— xml.parseXml has cyclomatic complexity 51 (threshold 15). Of this number, 45 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ai-ask.createAsk (cyclomatic 51) devshell/site/assets/js/ai-ask.js:75— ai-ask.createAsk has cyclomatic complexity 51 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 3 other methods here (ai-ask.createAsk::runAskEngine, ai-ask.createAsk::runAskEngine::callTool, ai-ask.createAsk::runEngine) 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.
app-propgrid.create.control (cyclomatic 51) devshell/site/assets/js/app-propgrid.js:153— app-propgrid.create.control has cyclomatic complexity 51 (threshold 15). Of this number, 28 points are the body's own statements and 23 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HATCH (cyclomatic 51) app/dwg/objects-write.js:799— HATCH has cyclomatic complexity 51 (threshold 15). Of this number, 50 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plate-solve.runShellSet (cyclomatic 50) app/frame/plate-solve.js:236— plate-solve.runShellSet has cyclomatic complexity 50 (threshold 15). Of this number, 29 points are the body's own statements and 21 belong to 8 function literals 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.
cleanAnalysis (cyclomatic 50) app/frame/frame-panel.js:80— cleanAnalysis has cyclomatic complexity 50 (threshold 15). Of this number, 46 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.
nc1.writeNc1 (cyclomatic 49) app/nc1.js:89— nc1.writeNc1 has cyclomatic complexity 49 (threshold 15). Of this number, 34 points are the body's own statements and 15 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.
app-addons-account.installFromFile (cyclomatic 49) devshell/site/assets/js/app-addons-account.js:704— app-addons-account.installFromFile has cyclomatic complexity 49 (threshold 15). Of this number, 48 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
app-ai-activity.boot (cyclomatic 49) devshell/site/assets/js/app-ai-activity.js:31— app-ai-activity.boot has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 12 of the 49 points are its own statements and the rest belongs to 12 function items inside it that branch (rowEl, render, docName, …). 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.
model.read (cyclomatic 49) devshell/site/assets/js/engines/schematic/model.js:74— model.read has cyclomatic complexity 49 (threshold 15). Of this number, 40 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.
host.checkSchema (cyclomatic 48) REDACTED:768— host.checkSchema has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-cmdline.dockedCommandLine (cyclomatic 48) devshell/site/assets/js/app-cmdline.js:85— app-cmdline.dockedCommandLine has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 1 of the 48 points is its own statement and the rest belongs to 15 function items inside it that branch (a function literal at line 137, fill, run, …). 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.
std.runStdFb (cyclomatic 48) devshell/site/assets/js/engines/plc/std.js:33— std.runStdFb has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
framePanel.loadsBlock (cyclomatic 48) app/frame/frame-panel.js:321— framePanel.loadsBlock has cyclomatic complexity 48 (threshold 15). Of this number, 23 points are the body's own statements and 25 belong to 18 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
encodeHeader (cyclomatic 48) app/dwg/objects-write.js:1109— encodeHeader has cyclomatic complexity 48 (threshold 15). Of this number, 42 points are the body's own statements and 6 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.
solve (cyclomatic 48) app/steelstair/steelstair.js:125— solve has cyclomatic complexity 48 (threshold 15). Of this number, 39 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
connections.buildSplice (cyclomatic 47) app/connections.js:512— connections.buildSplice has cyclomatic complexity 47 (threshold 15). Of this number, 45 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lencalc.tokenize (cyclomatic 47) app/lencalc.js:60— lencalc.tokenize 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.
marks.markParts (cyclomatic 47) app/marks.js:94— marks.markParts has cyclomatic complexity 47 (threshold 15). Of this number, 34 points are the body's own statements and 13 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.
circuit.parseDeck (cyclomatic 47) devshell/site/assets/js/engines/em/circuit.js:322— circuit.parseDeck has cyclomatic complexity 47 (threshold 15). Of this number, 40 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.
AddonLoader.activate (cyclomatic 45) REDACTED:534— AddonLoader.activate has cyclomatic complexity 45 (threshold 15). Of this number, 36 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
loose.readRebar.curve (cyclomatic 45) app/rc/loose.js:110— loose.readRebar.curve has cyclomatic complexity 45 (threshold 15). Of this number, 43 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.
app-panels.menuItems (cyclomatic 45) devshell/site/assets/js/app-panels.js:783— app-panels.menuItems has cyclomatic complexity 45 (threshold 15). Of this number, 35 points are the body's own statements and 10 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.
host.makeControl (cyclomatic 44) REDACTED:1075— host.makeControl has cyclomatic complexity 44 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (host.makeControl::handle) 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.
teamwork.createTeamwork (cyclomatic 44) devshell/site/assets/js/teamwork.js:46— teamwork.createTeamwork has cyclomatic complexity 44 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (teamwork.createTeamwork::call) 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.
place.place (cyclomatic 44) devshell/site/assets/js/engines/pcb/place.js:26— place.place has cyclomatic complexity 44 (threshold 15). Of this number, 31 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tx.addConnection (cyclomatic 43) app/model.js:439— Tx.addConnection has cyclomatic complexity 43 (threshold 15). Of this number, 40 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.
kiss.kissFile (cyclomatic 43) app/kiss.js:77— kiss.kissFile has cyclomatic complexity 43 (threshold 15). Of this number, 20 points are the body's own statements and 23 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.
app-workspace-format.resolveLayout (cyclomatic 43) devshell/site/assets/js/app-workspace-format.js:302— app-workspace-format.resolveLayout has cyclomatic complexity 43 (threshold 15). Of this number, 35 points are the body's own statements and 8 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
fluid.solveNetwork (cyclomatic 43) devshell/site/assets/js/engines/network/fluid.js:85— fluid.solveNetwork has cyclomatic complexity 43 (threshold 15). Of this number, 22 points are the body's own statements and 21 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Help.renderBody (cyclomatic 43) devshell/site/core/classes/Help.php:235— Help.renderBody 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.
newTable (cyclomatic 43) app/dwg/table-write.js:402— newTable 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.
nlSystem (cyclomatic 43) app/fem/frame-push.js:51— nlSystem has cyclomatic complexity 43 (threshold 15). Of this number, 19 points are the body's own statements and 24 belong to 18 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.
frame-breakit.breakFrame (cyclomatic 42) app/frame/frame-breakit.js:31— frame-breakit.breakFrame has cyclomatic complexity 42 (threshold 15). Of this number, 28 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.
ids.audit (cyclomatic 42) app/ids/ids.js:157— ids.audit has cyclomatic complexity 42 (threshold 15). Of this number, 32 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.
Composer.compose (cyclomatic 42) app/usd/stage.js:233— Composer.compose has cyclomatic complexity 42 (threshold 15). Of this number, 37 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.
Circuit.check (cyclomatic 42) devshell/site/assets/js/engines/em/circuit.js:60— Circuit.check has cyclomatic complexity 42 (threshold 15). Of this number, 39 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.
Antenna._build (cyclomatic 42) devshell/site/assets/js/engines/em/wire.js:45— Antenna._build has cyclomatic complexity 42 (threshold 15). Of this number, 36 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.
Reader.any (cyclomatic 41) REDACTED:177— Reader.any 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.
r2007-write.compressR2007 (cyclomatic 41) app/dwg/r2007-write.js:120— r2007-write.compressR2007 has cyclomatic complexity 41 (threshold 15). Of this number, 35 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.
app-propgrid.cleanRow (cyclomatic 41) devshell/site/assets/js/app-propgrid.js:62— app-propgrid.cleanRow has cyclomatic complexity 41 (threshold 15). Of this number, 39 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.
Runtime.exec (cyclomatic 41) devshell/site/assets/js/engines/plc/runtime.js:270— Runtime.exec 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.
model.build (cyclomatic 40) app/fem/model.js:112— model.build has cyclomatic complexity 40 (threshold 15). Of this number, 36 points are the body's own statements and 4 belong to 2 function literals 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.
interfaces.openingRules (cyclomatic 40) app/modelaudit/interfaces.js:60— interfaces.openingRules 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.
drawings.anchorSheet (cyclomatic 40) app/drawings.js:822— drawings.anchorSheet has cyclomatic complexity 40 (threshold 15). Of this number, 32 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
usdc-read.readUsdc (cyclomatic 40) app/usd/usdc-read.js:29— usdc-read.readUsdc has cyclomatic complexity 40 (threshold 15). Of this number, 36 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.
app-shell.setup (cyclomatic 40) devshell/site/assets/js/app-shell.js:350— app-shell.setup has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 9 of the 40 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 383, a function literal at line 358, a function literal at line 379, …). 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.
app-state.parse (cyclomatic 40) devshell/site/assets/js/app-state.js:63— app-state.parse has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 4 of the 40 points are its own statements and the rest belongs to 9 function items inside it that branch (cmp, value, a function literal at line 80, …). 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.
ik.ik (cyclomatic 40) devshell/site/assets/js/engines/motion/ik.js:22— ik.ik has cyclomatic complexity 40 (threshold 15). Of this number, 34 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.
connections.buildEndPlate (cyclomatic 39) app/connections.js:281— connections.buildEndPlate has cyclomatic complexity 39 (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.
host.makeControl::handle (cyclomatic 39) REDACTED:1110— host.makeControl::handle has cyclomatic complexity 39 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (host.makeControl) 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.
host.makeLive.run (cyclomatic 39) REDACTED:1970— host.makeLive.run has cyclomatic complexity 39 (threshold 15). Of this number, 32 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
frame-panel.framePanel.loadsBlock (cyclomatic 39) app/frame/frame-panel.js:321— frame-panel.framePanel.loadsBlock has cyclomatic complexity 39 (threshold 15). Of this number, 20 points are the body's own statements and 19 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
scene.readMaterial (cyclomatic 39) app/usd/scene.js:158— scene.readMaterial has cyclomatic complexity 39 (threshold 15). Of this number, 32 points are the body's own statements and 7 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.
app-totals.boot (cyclomatic 39) devshell/site/assets/js/app-totals.js:29— app-totals.boot has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 9 of the 39 points are its own statements and the rest belongs to 6 function items inside it that branch (ensureHost, a function literal at line 63, why, …). 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.
Circuit._assemble (cyclomatic 39) devshell/site/assets/js/engines/em/circuit.js:134— Circuit._assemble has cyclomatic complexity 39 (threshold 15). Of this number, 30 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
makeLive.run (cyclomatic 39) REDACTED:1970— makeLive.run has cyclomatic complexity 39 (threshold 15). Of this number, 32 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
sheetBuilder (cyclomatic 39) app/drawings.js:70— sheetBuilder has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 18 function items inside it that branch (dimH, dimV, chainH, …). 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.
frame-combos.generateCombos (cyclomatic 38) app/frame/frame-combos.js:58— frame-combos.generateCombos has cyclomatic complexity 38 (threshold 15). Of this number, 33 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.
table-read.oldTable (cyclomatic 38) app/dwg/table-read.js:198— table-read.oldTable has cyclomatic complexity 38 (threshold 15). Of this number, 29 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
geo-profile.profileShapes (cyclomatic 38) app/ifc/geo-profile.js:18— geo-profile.profileShapes has cyclomatic complexity 38 (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.
loops.prepare (cyclomatic 38) devshell/site/assets/js/engines/motion/loops.js:31— loops.prepare has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 15 of the 38 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 44, a function literal at line 52, has). 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.
modelica.readModelica (cyclomatic 38) devshell/site/assets/js/engines/sys/modelica.js:56— modelica.readModelica has cyclomatic complexity 38 (threshold 15). Of this number, 34 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.
plc.runScene (cyclomatic 38) devshell/site/assets/js/engines/ui/plc.js:68— plc.runScene has cyclomatic complexity 38 (threshold 15). Of this number, 30 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
connections.buildBasePlate (cyclomatic 37) app/connections.js:438— connections.buildBasePlate has cyclomatic complexity 37 (threshold 15). Of this number, 34 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.
frame-push.beamResponse (cyclomatic 37) app/fem/frame-push.js:135— frame-push.beamResponse has cyclomatic complexity 37 (threshold 15). Of this number, 17 points are the body's own statements and 20 belong to 7 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.
usd-detailcraft.partMesh (cyclomatic 37) app/usd-detailcraft.js:59— usd-detailcraft.partMesh has cyclomatic complexity 37 (threshold 15). Of this number, 25 points are the body's own statements and 12 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.
detailcraft.start (cyclomatic 37) app/detailcraft.js:97— detailcraft.start 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. This shape REPEATS in the file: 8 other methods here (detailcraft.start::readSettings, detailcraft.start::refresh, detailcraft.start::renderBar, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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: detailcraft.start::act (cyclomatic 42) 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.
ai-teacher.stepsOf (cyclomatic 37) devshell/site/assets/js/ai-teacher.js:69— ai-teacher.stepsOf 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.
app-devices-studio.studioMidi.requestMIDIAccess (cyclomatic 37) devshell/site/assets/js/app-devices-studio.js:169— app-devices-studio.studioMidi.requestMIDIAccess has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 8 of the 37 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 208, a function literal at line 184, input, …). 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.
app-input.readState (cyclomatic 37) devshell/site/assets/js/app-input.js:533— app-input.readState has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 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.
app-panels.visibility (cyclomatic 37) devshell/site/assets/js/app-panels.js:1055— app-panels.visibility has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 3 of the 37 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1059, 1105). 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.
app-workspace-tools.editTools (cyclomatic 37) devshell/site/assets/js/app-workspace-tools.js:120— app-workspace-tools.editTools 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.
plant.snapshotFrom3d (cyclomatic 37) REDACTED:199— plant.snapshotFrom3d has cyclomatic complexity 37 (threshold 15). Of this number, 28 points are the body's own statements and 9 belong to 3 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.
entityCommon (cyclomatic 37) app/dwg/objects-write.js:180— entityCommon has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity· save (cyclomatic 37) · ×1
save (cyclomatic 37) app/app-autosave.js:403— save has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 5 of the 37 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 408, 428). 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.
host.createControlRelay (cyclomatic 36) REDACTED:1637— host.createControlRelay has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 6 of the 36 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 1644, 1651, 1662, …). 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.
panel.mountIssuePanel.render (cyclomatic 36) app/issuelog/panel.js:192— panel.mountIssuePanel.render 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 8 function literals inside it that branch (lines 223, 202, 204, …). 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.
ValueReader.decode (cyclomatic 36) app/usd/usdc-read.js:195— ValueReader.decode has cyclomatic complexity 36 (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.
ai-activity.createActivityLog::normalise (cyclomatic 36) devshell/site/assets/js/ai-activity.js:95— ai-activity.createActivityLog::normalise has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (ai-activity.createActivityLog) 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.
xml.parseXml (cyclomatic 36) devshell/site/assets/js/engines/trace/xml.js:17— xml.parseXml 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.
ui.mountRegsUi::packRow (cyclomatic 35) app/addons/regs/lib/ui.js:243— ui.mountRegsUi::packRow has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
profiles.cleanCustom (cyclomatic 35) app/profiles.js:87— profiles.cleanCustom has cyclomatic complexity 35 (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.
chunks.apply (cyclomatic 35) app/history/chunks.js:128— chunks.apply has cyclomatic complexity 35 (threshold 15). Of this number, 31 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.
mleader-write.writeContext (cyclomatic 35) app/dwg/mleader-write.js:98— mleader-write.writeContext has cyclomatic complexity 35 (threshold 15). Of this number, 23 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mleader-write.ensureMleaderStyle (cyclomatic 35) app/dwg/mleader-write.js:193— mleader-write.ensureMleaderStyle has cyclomatic complexity 35 (threshold 15). Of this number, 22 points are the body's own statements and 13 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
docinfo.createDocInfo (cyclomatic 35) devshell/site/assets/js/docinfo.js:39— docinfo.createDocInfo has cyclomatic complexity 35 (threshold 15). Of this number, 28 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-panels.layoutGrid (cyclomatic 35) devshell/site/assets/js/app-panels.js:318— app-panels.layoutGrid has cyclomatic complexity 35 (threshold 15). Of this number, 22 points are the body's own statements and 13 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-settings.load (cyclomatic 35) devshell/site/assets/js/app-settings.js:76— app-settings.load has cyclomatic complexity 35 (threshold 15). Of this number, 30 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
gerber.writeGerber (cyclomatic 35) devshell/site/assets/js/engines/pcb/gerber.js:61— gerber.writeGerber has cyclomatic complexity 35 (threshold 15). Of this number, 16 points are the body's own statements and 19 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.
plcopen.readPlcopen (cyclomatic 35) REDACTED:157— plcopen.readPlcopen has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
checkFrame (cyclomatic 35) app/frame/frame-design.js:307— checkFrame has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 15 of the 35 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 320, 312, 314, …). 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.
host.makeRecent (cyclomatic 34) REDACTED:273— host.makeRecent has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
xsd-regex.xsdRegExp (cyclomatic 34) REDACTED:77— xsd-regex.xsdRegExp 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 shape REPEATS in the file: one other method here (xsd-regex.xsdRegExp::charClass) 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.
lasso-core.lassoSelect (cyclomatic 34) app/lasso-core.js:58— lasso-core.lassoSelect 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.
drawings.gaContent (cyclomatic 34) app/drawings.js:307— drawings.gaContent 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.
IfcAPI.fromApi (cyclomatic 34) app/ifc/api.js:232— IfcAPI.fromApi 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 shape REPEATS in the file: one other method here (IfcAPI.fromApi::asRaw) 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.
app-addons-account.renderYourAddons::draw (cyclomatic 34) devshell/site/assets/js/app-addons-account.js:772— app-addons-account.renderYourAddons::draw 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.
app-engines.boot (cyclomatic 34) devshell/site/assets/js/app-engines.js:26— app-engines.boot has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 11 function items inside it that branch (render, run, sendProblems, …). 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.
people.egress (cyclomatic 34) devshell/site/assets/js/engines/des/people.js:27— people.egress 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 shape REPEATS in the file: one other method here (people.egress::run) 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.
makeControl::configure (cyclomatic 34) REDACTED:1201— makeControl::configure 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.
decodeObject (cyclomatic 34) app/dwg/objects-read.js:52— decodeObject 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.
framePanel.resultsBlock (cyclomatic 34) app/frame/frame-panel.js:662— framePanel.resultsBlock has cyclomatic complexity 34 (threshold 15). Of this number, 24 points are the body's own statements and 10 belong to 18 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.
writeValue (cyclomatic 34) app/dwg/table-write.js:85— writeValue has cyclomatic complexity 34 (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.
AddonLoader.loadStrings (cyclomatic 33) REDACTED:443— AddonLoader.loadStrings has cyclomatic complexity 33 (threshold 15). Of this number, 22 points are the body's own statements and 11 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.
sections.cleanConventions (cyclomatic 33) app/addons/regs/lib/sections.js:177— sections.cleanConventions has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 181, 196, 190). 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.
connections.buildShearTab (cyclomatic 33) app/connections.js:363— connections.buildShearTab has cyclomatic complexity 33 (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.
framing.wallPanel (cyclomatic 33) app/framing.js:47— framing.wallPanel has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
framing.placePanel (cyclomatic 33) app/framing.js:279— framing.placePanel has cyclomatic complexity 33 (threshold 15). Of this number, 28 points are the body's own statements and 5 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.
congestion.congestion (cyclomatic 33) app/congestion.js:38— congestion.congestion has cyclomatic complexity 33 (threshold 15). Of this number, 28 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.
frame-panel.framePanel.resultsBlock (cyclomatic 33) app/frame/frame-panel.js:662— frame-panel.framePanel.resultsBlock has cyclomatic complexity 33 (threshold 15). Of this number, 23 points are the body's own statements and 10 belong to 5 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.
frame-dyn.timeHistory (cyclomatic 33) app/fem/frame-dyn.js:100— frame-dyn.timeHistory has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
frame-draw.resultGeometry (cyclomatic 33) app/frame/frame-draw.js:28— frame-draw.resultGeometry has cyclomatic complexity 33 (threshold 15). Of this number, 18 points are the body's own statements and 15 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.
ValueReader.array (cyclomatic 33) app/usd/usdc-read.js:359— ValueReader.array 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.
r2007-write.layoutR2007 (cyclomatic 33) app/dwg/r2007-write.js:281— r2007-write.layoutR2007 has cyclomatic complexity 33 (threshold 15). Of this number, 30 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.
workspace-detailcraft.mountDetailcraftWorkspace (cyclomatic 33) app/workspace-detailcraft.js:48— workspace-detailcraft.mountDetailcraftWorkspace has cyclomatic complexity 33 (threshold 15). Of this number, 21 points are the body's own statements and 12 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.
calc.calcTools (cyclomatic 33) devshell/site/assets/js/calc.js:615— calc.calcTools has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 10 function items inside it that branch (a function literal at line 650, a function literal at line 644, a function literal at line 632, …). 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.
app-input.moveCommand (cyclomatic 33) devshell/site/assets/js/app-input.js:257— app-input.moveCommand has cyclomatic complexity 33 (threshold 15). Of this number, 25 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Circuit.ac (cyclomatic 33) devshell/site/assets/js/engines/em/circuit.js:230— Circuit.ac has cyclomatic complexity 33 (threshold 15). Of this number, 29 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.
sections.cleanFormat (cyclomatic 32) app/addons/regs/lib/sections.js:121— sections.cleanFormat 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.
frame-model.cleanLoad (cyclomatic 32) app/frame/frame-model.js:198— frame-model.cleanLoad 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.
Model.value (cyclomatic 32) app/ids/access.js:64— Model.value has cyclomatic complexity 32 (threshold 15). Of this number, 28 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.
mitre-ui.mountMitre.openMitre (cyclomatic 32) app/mitre-ui.js:17— mitre-ui.mountMitre.openMitre has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 4 of the 32 points are its own statements and the rest belongs to 8 function items inside it that branch (update, a function literal at line 81, a function literal at line 27, …). 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.
lz-r2004-write.compressR2004 (cyclomatic 32) app/dwg/lz-r2004-write.js:32— lz-r2004-write.compressR2004 has cyclomatic complexity 32 (threshold 15). Of this number, 17 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.
geo-curve.trimmedCurve (cyclomatic 32) app/ifc/geo-curve.js:166— geo-curve.trimmedCurve has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 15 of the 32 points are its own statements and the rest belongs to 4 function items inside it that branch (pick, ang, p, …). 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.
app-devices-studio.studioHid (cyclomatic 32) devshell/site/assets/js/app-devices-studio.js:59— app-devices-studio.studioHid has cyclomatic complexity 32 (threshold 15). Of this number, 16 points are the body's own statements and 16 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.
app-fields.boot (cyclomatic 32) devshell/site/assets/js/app-fields.js:23— app-fields.boot has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 16 function items inside it that branch (render, a function literal at line 106, listAll, …). 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.
bacnet.values (cyclomatic 32) devshell/site/assets/js/engines/live/bacnet.js:69— bacnet.values 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.
xml.parseXml::element (cyclomatic 32) devshell/site/assets/js/engines/plc/xml.js:23— xml.parseXml::element 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.
mountRecent (cyclomatic 32) REDACTED:1860— mountRecent has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 7 of the 32 points are its own statements and the rest belongs to 7 function items inside it that branch (render, el, a function literal at line 1887, …). 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.
makeSet (cyclomatic 32) app/drawings.js:1029— makeSet has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 11 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1041, 1032, 1032, …). 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.
logEdit (cyclomatic 32) REDACTED:758— logEdit 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.
autopilot.propose (cyclomatic 31) app/autopilot.js:98— autopilot.propose 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 cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LiveClient.welcome (cyclomatic 31) REDACTED:610— LiveClient.welcome has cyclomatic complexity 31 (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.
LiveClient.flush (cyclomatic 31) REDACTED:691— LiveClient.flush 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.
LiveClient.reverse (cyclomatic 31) REDACTED:918— LiveClient.reverse 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.
frame-pdf.reportPdf (cyclomatic 31) app/frame/frame-pdf.js:42— frame-pdf.reportPdf has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (wrap, text, a function literal at line 79, …). 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.
combos-asce7.asce7Combos (cyclomatic 31) app/frame/combos-asce7.js:19— combos-asce7.asce7Combos 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.
supply.readSupplyCsv (cyclomatic 31) app/lib-supply/supply.js:80— supply.readSupplyCsv has cyclomatic complexity 31 (threshold 15). Of this number, 26 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.
values.matchValue (cyclomatic 31) app/ids/values.js:72— values.matchValue has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
session.idsSession (cyclomatic 31) app/ids/session.js:25— session.idsSession has cyclomatic complexity 31 (threshold 15). Of this number, 22 points are the body's own statements and 9 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.
usd-detailcraft.steelUsd (cyclomatic 31) app/usd-detailcraft.js:22— usd-detailcraft.steelUsd has cyclomatic complexity 31 (threshold 15). Of this number, 27 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.
passthrough.rawEntityCommon (cyclomatic 31) app/dwg/passthrough.js:142— passthrough.rawEntityCommon has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
geo-nurbs.recoverEdges (cyclomatic 31) app/ifc/geo-nurbs.js:683— geo-nurbs.recoverEdges has cyclomatic complexity 31 (threshold 15). Of this number, 26 points are the body's own statements and 5 belong to 3 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.
geo-nurbs.delaunay (cyclomatic 31) app/ifc/geo-nurbs.js:723— geo-nurbs.delaunay has cyclomatic complexity 31 (threshold 15). Of this number, 23 points are the body's own statements and 8 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.
geo-bool.capLoops (cyclomatic 31) app/ifc/geo-bool.js:206— geo-bool.capLoops has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 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.
app-input.validateProfile::panelItems (cyclomatic 31) devshell/site/assets/js/app-input.js:350— app-input.validateProfile::panelItems 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: one other method here (app-input.validateProfile) 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.
app-settings.form.addEventListener("change") (cyclomatic 31) devshell/site/assets/js/app-settings.js:1387— app-settings.form.addEventListener("change") has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-workspace.mountWorkspaces (cyclomatic 31) devshell/site/assets/js/app-workspace.js:96— app-workspace.mountWorkspaces has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 4 other methods here (app-workspace.mountWorkspaces::mountPalettes, app-workspace.mountWorkspaces::refreshPalettes, app-workspace.mountWorkspaces::leave, …) 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.
LiveStore.define (cyclomatic 31) devshell/site/assets/js/engines/live/store.js:20— LiveStore.define 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.
route.route::search (cyclomatic 31) devshell/site/assets/js/engines/pcb/route.js:111— route.route::search 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: one other method here (route.route) 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.
cpm.cpm (cyclomatic 31) devshell/site/assets/js/engines/schedule/cpm.js:52— cpm.cpm 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 cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TABLESTYLE (cyclomatic 31) app/dwg/table-write.js:197— TABLESTYLE has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plate-draw.plateGeometry (cyclomatic 30) app/frame/plate-draw.js:19— plate-draw.plateGeometry has cyclomatic complexity 30 (threshold 15). Of this number, 22 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
frame-concrete-panel.concretePanel.seismicBlock (cyclomatic 30) app/frame/frame-concrete-panel.js:212— frame-concrete-panel.concretePanel.seismicBlock has cyclomatic complexity 30 (threshold 15). Of this number, 15 points are the body's own statements and 15 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
frame-fem.modalOfFrame (cyclomatic 30) app/fem/frame-fem.js:24— frame-fem.modalOfFrame has cyclomatic complexity 30 (threshold 15). Of this number, 26 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.
ids.readIds (cyclomatic 30) app/ids/ids.js:121— ids.readIds 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.
objects-write.ENC.LWPOLYLINE (cyclomatic 30) app/dwg/objects-write.js:746— objects-write.ENC.LWPOLYLINE has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
solid-write.solidWriter.convert (cyclomatic 30) app/dwg/solid-write.js:137— solid-write.solidWriter.convert has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
surface-write.surfaceWriter.convert (cyclomatic 30) app/dwg/surface-write.js:108— surface-write.surfaceWriter.convert has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
write.writeDwg::extAdd (cyclomatic 30) app/dwg/write.js:629— write.writeDwg::extAdd 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 (write.writeDwg) 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.
Circuit.tran (cyclomatic 30) devshell/site/assets/js/engines/em/circuit.js:268— Circuit.tran has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 12 of the 30 points are its own statements and the rest belongs to 5 function items inside it that branch (pull, commit, record, …). 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.
tagmap.check (cyclomatic 30) devshell/site/assets/js/engines/live/tagmap.js:51— tagmap.check 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.
Runtime.binary (cyclomatic 30) devshell/site/assets/js/engines/plc/runtime.js:211— Runtime.binary has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 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.
eedBytes (cyclomatic 30) app/dwg/objects-write.js:144— eedBytes 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.
BLOCK_HEADER (cyclomatic 30) app/dwg/objects-write.js:252— BLOCK_HEADER has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
recoverDialog (cyclomatic 30) app/app-autosave.js:547— recoverDialog has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 9 of the 30 points are its own statements and the rest belongs to 13 function items inside it that branch (el, a function literal at line 571, a function literal at line 596, …). 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.
frame-design.checkEN (cyclomatic 29) app/frame/frame-design.js:162— frame-design.checkEN has cyclomatic complexity 29 (threshold 15). Of this number, 22 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.
frame-concrete.cleanConcrete (cyclomatic 29) app/frame/frame-concrete.js:56— frame-concrete.cleanConcrete 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.
frame-panel.cleanLoad (cyclomatic 29) app/frame/frame-panel.js:118— frame-panel.cleanLoad 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.
plate-bim.addPlates (cyclomatic 29) app/frame/plate-bim.js:19— plate-bim.addPlates 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 5 function items inside it that branch (take, a function literal at line 37, a function literal at line 50, …). 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.
breakit.findingProblems (cyclomatic 29) app/study/breakit.js:143— breakit.findingProblems has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to one function literal inside it that branches (line 146). 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.
xsd-regex.xsdRegExp::charClass (cyclomatic 29) REDACTED:110— xsd-regex.xsdRegExp::charClass 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. This shape REPEATS in the file: one other method here (xsd-regex.xsdRegExp) 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.
drawings-ui.mountDrawings (cyclomatic 29) app/drawings-ui.js:17— drawings-ui.mountDrawings has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 6 of the 29 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 65, 177, 37, …). 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.
geo-tri.bridgeHole (cyclomatic 29) app/ifc/geo-tri.js:71— geo-tri.bridgeHole 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.
app-calc.boot::render (cyclomatic 29) devshell/site/assets/js/app-calc.js:74— app-calc.boot::render 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.
urdf.readUrdf (cyclomatic 29) devshell/site/assets/js/engines/motion/urdf.js:51— urdf.readUrdf 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.
route.route (cyclomatic 29) devshell/site/assets/js/engines/pcb/route.js:19— route.route 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. This shape REPEATS in the file: one other method here (route.route::search) 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.
ladder.ladderToST (cyclomatic 29) devshell/site/assets/js/engines/plc/ladder.js:68— ladder.ladderToST has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 73, 70, 86). 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.
Help.withScreens (cyclomatic 29) devshell/site/core/classes/Help.php:556— Help.withScreens 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.
frame-loads-panel.cleanLoads (cyclomatic 28) app/frame/frame-loads-panel.js:31— frame-loads-panel.cleanLoads 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, 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.
frame-weld.checkWelds (cyclomatic 28) app/frame/frame-weld.js:198— frame-weld.checkWelds has cyclomatic complexity 28 (threshold 15). Of this number, 20 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
objects-write.xrecordBytes (cyclomatic 28) app/dwg/objects-write.js:470— objects-write.xrecordBytes has cyclomatic complexity 28 (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.
ai-teacher.rankTopics (cyclomatic 28) devshell/site/assets/js/ai-teacher.js:39— ai-teacher.rankTopics has cyclomatic complexity 28 (threshold 15). Of this number, 25 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.
app-lessons.boot (cyclomatic 28) devshell/site/assets/js/app-lessons.js:27— app-lessons.boot has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (render, a function literal at line 35, a function literal at line 62, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
app-panels.makeHandle (cyclomatic 28) devshell/site/assets/js/app-panels.js:589— app-panels.makeHandle has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 637, a function literal at line 611, a function literal at line 604, …). 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.
app-workspace-arrange.arrangeDialog.build (cyclomatic 28) devshell/site/assets/js/app-workspace-arrange.js:45— app-workspace-arrange.arrangeDialog.build 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.
LiveStore.apply (cyclomatic 28) devshell/site/assets/js/engines/live/store.js:36— LiveStore.apply has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.stmt (cyclomatic 28) devshell/site/assets/js/engines/plc/st.js:145— Parser.stmt 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.
PlantGraph.fromJSON (cyclomatic 28) REDACTED:155— PlantGraph.fromJSON has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LAYOUT (cyclomatic 28) app/dwg/objects-write.js:509— LAYOUT has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AddonLoader.constructor (cyclomatic 27) REDACTED:328— AddonLoader.constructor has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
supply.check (cyclomatic 27) app/lib-supply/supply.js:173— supply.check has cyclomatic complexity 27 (threshold 15). Of this number, 24 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.
problems-detailcraft.anchorOf (cyclomatic 27) app/problems-detailcraft.js:95— problems-detailcraft.anchorOf has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
loose.readRebar (cyclomatic 27) app/rc/loose.js:88— loose.readRebar 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.
ids.readParam (cyclomatic 27) app/ids/ids.js:45— ids.readParam has cyclomatic complexity 27 (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.
Parser.property (cyclomatic 27) app/usd/usda-read.js:372— Parser.property has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
geom.meshOf (cyclomatic 27) app/usd/geom.js:184— geom.meshOf 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.
objects-read.readEED (cyclomatic 27) app/dwg/objects-read.js:143— objects-read.readEED has cyclomatic complexity 27 (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.
objects-read.DECODERS.HATCH (cyclomatic 27) app/dwg/objects-read.js:954— objects-read.DECODERS.HATCH 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.
step.scanStep (cyclomatic 27) app/ifc/step.js:112— step.scanStep 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.
GeoCtx.gridPlacement (cyclomatic 27) app/ifc/geo-ctx.js:211— GeoCtx.gridPlacement has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
live-classroom.mountUi::render (cyclomatic 27) app/live-classroom.js:776— live-classroom.mountUi::render 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.
sw.self.addEventListener("message") (cyclomatic 27) devshell/edition/sw.js:73— sw.self.addEventListener("message") 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 6 function items inside it that branch (a function literal at line 109, a function literal at line 81, reply, …). 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.
app-propgrid.create.build (cyclomatic 27) devshell/site/assets/js/app-propgrid.js:247— app-propgrid.create.build 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 4 function items inside it that branch (a function literal at line 284, a function literal at line 276, a function literal at line 275, …). 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.
wireAccount (cyclomatic 27) REDACTED:376— wireAccount has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
linkPackage (cyclomatic 27) REDACTED:243— linkPackage has cyclomatic complexity 27 (threshold 15). Of this number, 20 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
row (cyclomatic 27) REDACTED:673— row has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
panelSvg (cyclomatic 27) app/framing.js:202— panelSvg has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundation.cleanFoundation (cyclomatic 26) app/foundation.js:544— foundation.cleanFoundation 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.
frame-design.checkENHollow (cyclomatic 26) app/frame/frame-design.js:258— frame-design.checkENHollow has cyclomatic complexity 26 (threshold 15). Of this number, 19 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.
transform.transformRefs (cyclomatic 26) app/transform.js:131— transform.transformRefs 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.
Model.readProp (cyclomatic 26) app/ids/access.js:227— Model.readProp has cyclomatic complexity 26 (threshold 15). Of this number, 23 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.
Model.materials (cyclomatic 26) app/ids/access.js:379— Model.materials has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 4 function items inside it that branch (read::walk, read, read::walk::push, …). 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.
check.candidates (cyclomatic 26) app/ids/check.js:165— check.candidates has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 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.
history.changesSince (cyclomatic 26) REDACTED:203— history.changesSince has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
panel.mountIssuePanel.recordForm (cyclomatic 26) app/issuelog/panel.js:170— panel.mountIssuePanel.recordForm has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 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.
drawings.drawPrims (cyclomatic 26) app/drawings.js:370— drawings.drawPrims has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 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.
table-write.cellStyleFor (cyclomatic 26) app/dwg/table-write.js:373— table-write.cellStyleFor has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-addons-account.stampFile (cyclomatic 26) devshell/site/assets/js/app-addons-account.js:656— app-addons-account.stampFile has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 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.
gds.writeGds (cyclomatic 26) devshell/site/assets/js/engines/pcb/gds.js:63— gds.writeGds has cyclomatic complexity 26 (threshold 15). Of this number, 22 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.
mountAssistants (cyclomatic 26) REDACTED:1506— mountAssistants has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 17 function items inside it that branch (render, a function literal at line 1568, persist, …). 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.
framePanel.designBlock (cyclomatic 26) app/frame/frame-panel.js:559— framePanel.designBlock 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 43 function items inside it that branch (a function literal at line 600, a function literal at line 598, idOf, …). 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.
SPLINE (cyclomatic 26) app/dwg/objects-write.js:772— SPLINE has cyclomatic complexity 26 (threshold 15). Of this number, 23 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.
convert::catalogMatch::fit (cyclomatic 26) app/ifc-import.js:221— convert::catalogMatch::fit has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
sections.mergeSections (cyclomatic 25) app/addons/regs/lib/sections.js:241— sections.mergeSections has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 3 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.
library.install (cyclomatic 25) app/addons/regs/lib/library.js:107— library.install has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 112). 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.
check.boltDistances (cyclomatic 25) app/addons/regs/lib/check.js:22— check.boltDistances has cyclomatic complexity 25 (threshold 15). Of this number, 24 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.
plate.plateStiffness (cyclomatic 25) app/frame/plate.js:90— plate.plateStiffness has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LiveClient.dropped (cyclomatic 25) REDACTED:490— LiveClient.dropped 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.
LiveClient.localChange (cyclomatic 25) REDACTED:867— LiveClient.localChange 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.
frame-concrete.rayleighPeriods (cyclomatic 25) app/frame/frame-concrete.js:169— frame-concrete.rayleighPeriods 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.
loose.cleanLoose (cyclomatic 25) app/rc/loose.js:221— loose.cleanLoose has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
Model.unitFactor (cyclomatic 25) app/ids/access.js:295— Model.unitFactor 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.
earcut.findHoleBridge (cyclomatic 25) app/usd/earcut.js:155— earcut.findHoleBridge 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.
unit-table.format (cyclomatic 25) app/unit-table.js:300— unit-table.format 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.
unit-settings.mountUnitSettings (cyclomatic 25) app/unit-settings.js:18— unit-settings.mountUnitSettings 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 5 function items inside it that branch (a function literal at line 28, el, render, …). 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.
ifc.writeIfcElement (cyclomatic 25) app/usd/ifc.js:78— ifc.writeIfcElement has cyclomatic complexity 25 (threshold 15). Of this number, 21 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.
ai-model-only.scrub::walk (cyclomatic 25) devshell/site/assets/js/ai-model-only.js:92— ai-model-only.scrub::walk 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.
AddonsAccount.gc (cyclomatic 25) devshell/site/assets/js/app-addons-account.js:593— AddonsAccount.gc 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 branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
app-devices.classifyWheel (cyclomatic 25) devshell/site/assets/js/app-devices.js:211— app-devices.classifyWheel has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
docinfo.summarize (cyclomatic 25) devshell/site/assets/js/docinfo.js:129— docinfo.summarize has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-input.eventCombo (cyclomatic 25) devshell/site/assets/js/app-input.js:116— app-input.eventCombo 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.
app-panels.onDragMove (cyclomatic 25) devshell/site/assets/js/app-panels.js:1248— app-panels.onDragMove 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.
fluid.linkLaw (cyclomatic 25) devshell/site/assets/js/engines/network/fluid.js:48— fluid.linkLaw has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plcopen.ldXml (cyclomatic 25) REDACTED:32— plcopen.ldXml has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 35, 37, 38). 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.
cost.earnedValue (cyclomatic 25) devshell/site/assets/js/engines/schedule/cost.js:29— cost.earnedValue 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.
resources.level (cyclomatic 25) devshell/site/assets/js/engines/schedule/resources.js:21— resources.level has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nets.buildNets (cyclomatic 25) devshell/site/assets/js/engines/schematic/nets.js:15— nets.buildNets has cyclomatic complexity 25 (threshold 15). Of this number, 21 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.
panelPage (cyclomatic 25) app/framing.js:340— panelPage has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 11 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.
sections.checklistFromSections (cyclomatic 24) app/addons/regs/lib/sections.js:274— sections.checklistFromSections has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
sections.build (cyclomatic 24) app/shapes/sections.js:2481— sections.build has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to 3 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.
trust.readPackageJson (cyclomatic 24) app/addons/trust.js:98— trust.readPackageJson has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
Writer.any (cyclomatic 24) REDACTED:76— Writer.any 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.
frame-design.cleanDesign (cyclomatic 24) app/frame/frame-design.js:44— frame-design.cleanDesign has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
frame-panel.framePanel.designBlock (cyclomatic 24) app/frame/frame-panel.js:559— frame-panel.framePanel.designBlock has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
model.elements (cyclomatic 24) app/fem/model.js:79— model.elements has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to 8 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.
problems-detailcraft.dcProblems (cyclomatic 24) app/problems-detailcraft.js:66— problems-detailcraft.dcProblems 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.
intcode.encodeInts (cyclomatic 24) app/usd/intcode.js:78— intcode.encodeInts has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
usdz.readUsdz (cyclomatic 24) app/usd/usdz.js:20— usdz.readUsdz 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.
UsdBuilder.mesh (cyclomatic 24) app/usd/build.js:131— UsdBuilder.mesh has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
scene.sceneOf::build (cyclomatic 24) app/usd/scene.js:41— scene.sceneOf::build 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.
geo-bool.clipPlane (cyclomatic 24) app/ifc/geo-bool.js:165— geo-bool.clipPlane has cyclomatic complexity 24 (threshold 15). Of this number, 22 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.
live.stateCore.applyOne (cyclomatic 24) app/live.js:116— live.stateCore.applyOne 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.
serve.start (cyclomatic 24) devshell/serve.mjs:97— serve.start has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 102, 99). 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.
app-tools-ui.makePanel (cyclomatic 24) devshell/site/assets/js/app-tools-ui.js:27— app-tools-ui.makePanel has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-input-ui.mount (cyclomatic 24) devshell/site/assets/js/app-input-ui.js:77— app-input-ui.mount 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 shape REPEATS in the file: 5 other methods here (app-input-ui.mount::rememberSplit, app-input-ui.mount::render, app-input-ui.mount::renderSettings, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
app-panels.toWindow (cyclomatic 24) devshell/site/assets/js/app-panels.js:1375— app-panels.toWindow has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-settings.openCtx (cyclomatic 24) devshell/site/assets/js/app-settings.js:1525— app-settings.openCtx has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1539, 1532, 1549, …). 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.
teamwork.createTeamwork::call (cyclomatic 24) devshell/site/assets/js/teamwork.js:58— teamwork.createTeamwork::call has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (teamwork.createTeamwork) 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.
totals.createTotals.compute (cyclomatic 24) devshell/site/assets/js/totals.js:54— totals.createTotals.compute 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.
app-workspace-vector.menubar.mount (cyclomatic 24) devshell/site/assets/js/app-workspace-vector.js:241— app-workspace-vector.menubar.mount has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 250, 259, 258, …). 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.
circuit.waveAt (cyclomatic 24) devshell/site/assets/js/engines/em/circuit.js:22— circuit.waveAt 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.
Parser.primary (cyclomatic 24) devshell/site/assets/js/engines/plc/st.js:215— Parser.primary 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.
checks.check (cyclomatic 24) devshell/site/assets/js/engines/trace/checks.js:49— checks.check has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cleanDyn (cyclomatic 24) app/frame/frame-dynamics-panel.js:25— cleanDyn has cyclomatic complexity 24 (threshold 15). Of this number, 19 points are the body's own statements and 5 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.
library.load (cyclomatic 23) app/addons/regs/lib/library.js:72— library.load has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, 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.
clash.clashCheck (cyclomatic 23) app/clash.js:221— clash.clashCheck 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.
erection.plan (cyclomatic 23) app/erection.js:161— erection.plan has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dyn-core.parseGroundMotion (cyclomatic 23) app/fem/dyn-core.js:105— dyn-core.parseGroundMotion 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.
breakit.routes (cyclomatic 23) app/study/breakit.js:62— breakit.routes 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.
Model.typed (cyclomatic 23) app/ids/access.js:87— Model.typed 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.
usda-write.formatValue (cyclomatic 23) app/usd/usda-write.js:183— usda-write.formatValue has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
geom.valueAt (cyclomatic 23) app/usd/geom.js:82— geom.valueAt has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
geom.shapeMesh (cyclomatic 23) app/usd/geom.js:227— geom.shapeMesh 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, 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.
acds.readAcds (cyclomatic 23) app/dwg/acds.js:25— acds.readAcds has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 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.
objects-write.dimVars (cyclomatic 23) app/dwg/objects-write.js:407— objects-write.dimVars has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Styles.materialColor (cyclomatic 23) app/ifc/geo-style.js:87— Styles.materialColor 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.
geo-brep.faceSet (cyclomatic 23) app/ifc/geo-brep.js:96— geo-brep.faceSet has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IfcAPI.fromApi::asRaw (cyclomatic 23) app/ifc/api.js:245— IfcAPI.fromApi::asRaw 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 shape REPEATS in the file: one other method here (IfcAPI.fromApi) 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.
ai-teach.cleanStep (cyclomatic 23) devshell/site/assets/js/ai-teach.js:26— ai-teach.cleanStep 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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AddonsAccount.constructor (cyclomatic 23) devshell/site/assets/js/app-addons-account.js:140— AddonsAccount.constructor has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AddonsAccount.deviceSignIn (cyclomatic 23) devshell/site/assets/js/app-addons-account.js:275— AddonsAccount.deviceSignIn 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.
app-ai-ownkey.addOwnKey (cyclomatic 23) devshell/site/assets/js/app-ai-ownkey.js:64— app-ai-ownkey.addOwnKey has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
probe.tierOf (cyclomatic 23) devshell/site/assets/js/compute/probe.js:134— probe.tierOf has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-input.conflicts (cyclomatic 23) devshell/site/assets/js/app-input.js:192— app-input.conflicts 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 branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
lessons.cleanLesson (cyclomatic 23) devshell/site/assets/js/lessons.js:27— lessons.cleanLesson has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-tooltips.hover (cyclomatic 23) devshell/site/assets/js/app-tooltips.js:202— app-tooltips.hover has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (move, off, a function literal at line 216, …). 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.
shortcircuit.fault (cyclomatic 23) devshell/site/assets/js/engines/network/shortcircuit.js:50— shortcircuit.fault 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.
matrix.riskFile.rows (cyclomatic 23) devshell/site/assets/js/engines/risk/matrix.js:25— matrix.riskFile.rows has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 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.
host.createControlRelay.noteClient (cyclomatic 22) REDACTED:1760— host.createControlRelay.noteClient has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
host.makeLive.assistant (cyclomatic 22) REDACTED:1945— host.makeLive.assistant has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
slab-design.slabDesign (cyclomatic 22) app/frame/slab-design.js:50— slab-design.slabDesign has cyclomatic complexity 22 (threshold 15). Of this number, 18 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.
frame-panel.framePanel.runBreak (cyclomatic 22) app/frame/frame-panel.js:489— frame-panel.framePanel.runBreak 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.
linalg.pcg (cyclomatic 22) app/fem/linalg.js:112— linalg.pcg has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, 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.
stair.stairGeometry (cyclomatic 22) app/stair.js:54— stair.stairGeometry 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.
chunks.serializeKeys (cyclomatic 22) app/history/chunks.js:76— chunks.serializeKeys has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check.propertyCheck (cyclomatic 22) app/ids/check.js:103— check.propertyCheck has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
kiss.readKiss (cyclomatic 22) app/kiss.js:140— kiss.readKiss has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 145, 151). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Parser.component (cyclomatic 22) app/usd/usda-read.js:506— Parser.component has cyclomatic complexity 22 (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.
Parser.untyped (cyclomatic 22) app/usd/usda-read.js:548— Parser.untyped 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.
usda-write.primText (cyclomatic 22) app/usd/usda-write.js:51— usda-write.primText has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
usda-write.propText (cyclomatic 22) app/usd/usda-write.js:92— usda-write.propText has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mitre-preview.mitrePreview (cyclomatic 22) app/mitre-preview.js:33— mitre-preview.mitrePreview has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, 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.
r2007-write.decompressR2007ForTest (cyclomatic 22) app/dwg/r2007-write.js:195— r2007-write.decompressR2007ForTest has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.value (cyclomatic 22) app/ifc/step.js:250— Parser.value has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
geo-curve.sampleBSpline (cyclomatic 22) app/ifc/geo-curve.js:219— geo-curve.sampleBSpline has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent 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: geo-curve.curvePoints (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.
api.typedApi::unwrap (cyclomatic 22) app/ifc/api.js:534— api.typedApi::unwrap 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.
live.stateCore.diff (cyclomatic 22) app/live.js:58— live.stateCore.diff 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 cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
live.stateCore.invert (cyclomatic 22) app/live.js:147— live.stateCore.invert has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ifc.typed (cyclomatic 22) app/usd/ifc.js:54— ifc.typed 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.
app-access.spokenNumber (cyclomatic 22) REDACTED:104— app-access.spokenNumber 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.
app-block-ribbonx.enhance.decorate (cyclomatic 22) devshell/site/assets/js/app-block-ribbonx.js:39— app-block-ribbonx.enhance.decorate has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 43, 50, 72). 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.
app-input-ui.el (cyclomatic 22) devshell/site/assets/js/app-input-ui.js:52— app-input-ui.el 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.
app-panels.tabStrip (cyclomatic 22) devshell/site/assets/js/app-panels.js:924— app-panels.tabStrip 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 4 function literals inside it that branch (lines 925, 947, 937, …). 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.
linalg.cgSolve (cyclomatic 22) devshell/site/assets/js/engines/em/linalg.js:49— linalg.cgSolve has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
circuit.waveFrom (cyclomatic 22) devshell/site/assets/js/engines/em/circuit.js:311— circuit.waveFrom has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
mqtt.decode (cyclomatic 22) devshell/site/assets/js/engines/live/mqtt.js:42— mqtt.decode has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
gds.layoutDrc (cyclomatic 22) devshell/site/assets/js/engines/pcb/gds.js:152— gds.layoutDrc has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plans.terminalPlan (cyclomatic 22) devshell/site/assets/js/engines/schematic/plans.js:33— plans.terminalPlan has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (side, a function literal at line 49, a function literal at line 38, …). 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.
plc.runBound (cyclomatic 22) devshell/site/assets/js/engines/ui/plc.js:32— plc.runBound has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
createControlRelay.noteClient (cyclomatic 22) REDACTED:1760— createControlRelay.noteClient has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
makeLive.assistant (cyclomatic 22) REDACTED:1945— makeLive.assistant has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
framePanel.runBreak (cyclomatic 22) app/frame/frame-panel.js:489— framePanel.runBreak 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.
regs.strictest (cyclomatic 21) app/addons/regs/lib/regs.js:263— regs.strictest 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.
frame-model.cleanShape (cyclomatic 21) app/frame/frame-model.js:177— frame-model.cleanShape has cyclomatic complexity 21 (threshold 15). Of this number, 17 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.
LiveClient.sendHello (cyclomatic 21) REDACTED:407— LiveClient.sendHello has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LiveClient.moved (cyclomatic 21) REDACTED:1144— LiveClient.moved 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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
frame-concrete.floorWeights (cyclomatic 21) app/frame/frame-concrete.js:201— frame-concrete.floorWeights 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.
frame-concrete-panel.concretePanel.concreteBlock (cyclomatic 21) app/frame/frame-concrete-panel.js:170— frame-concrete-panel.concretePanel.concreteBlock has cyclomatic complexity 21 (threshold 15). Of this number, 11 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.
shell.membrane (cyclomatic 21) app/fem/shell.js:201— shell.membrane has cyclomatic complexity 21 (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.
model.modal (cyclomatic 21) app/fem/model.js:228— model.modal has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 2 function literals 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.
supply.parseCsv (cyclomatic 21) app/lib-supply/supply.js:27— supply.parseCsv 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.
ChunkHistory.sync (cyclomatic 21) app/history/history.js:128— ChunkHistory.sync 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.
transform.transformMember (cyclomatic 21) app/transform.js:75— transform.transformMember 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.
problems.idsProblems (cyclomatic 21) app/ids/problems.js:24— problems.idsProblems has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
foundation-ui.mountFoundation.problems (cyclomatic 21) app/foundation-ui.js:47— foundation-ui.mountFoundation.problems has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundation-ui.mountFoundation.panel (cyclomatic 21) app/foundation-ui.js:119— foundation-ui.mountFoundation.panel 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 5 function items inside it that branch (a function literal at line 161, a function literal at line 163, a function literal at line 169, …). 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.
drawings.makeSet.sheets (cyclomatic 21) app/drawings.js:1041— drawings.makeSet.sheets has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
rc-ui.mountRc.addBlock (cyclomatic 21) app/rc-ui.js:62— rc-ui.mountRc.addBlock has cyclomatic complexity 21 (threshold 15). Of this number, 15 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.
surface-write.surfaceWriter.finish (cyclomatic 21) app/dwg/surface-write.js:146— surface-write.surfaceWriter.finish has cyclomatic complexity 21 (threshold 15). Of this number, 18 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.
api.toApi (cyclomatic 21) app/ifc/api.js:502— api.toApi 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.
live-follow.threeFollow.apply (cyclomatic 21) app/live-follow.js:103— live-follow.threeFollow.apply has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
study.chartSvg (cyclomatic 21) app/study/study.js:193— study.chartSvg has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
unit-table.parseAbs (cyclomatic 21) app/unit-table.js:233— unit-table.parseAbs 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.
ai-principles.walk (cyclomatic 21) devshell/site/assets/js/ai-principles.js:74— ai-principles.walk 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.
ai-teacher.createTeacher (cyclomatic 21) devshell/site/assets/js/ai-teacher.js:120— ai-teacher.createTeacher has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 135, a function literal at line 146, emit, …). 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.
AddonsAccount.#fetchOne (cyclomatic 21) devshell/site/assets/js/app-addons-account.js:447— AddonsAccount.#fetchOne has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AddonsAccount.checkUpdates (cyclomatic 21) devshell/site/assets/js/app-addons-account.js:543— AddonsAccount.checkUpdates has cyclomatic complexity 21 (threshold 15). Of this number, 18 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.
app-pen.classifyStroke (cyclomatic 21) devshell/site/assets/js/app-pen.js:97— app-pen.classifyStroke 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.
app-dock.dockManager.head (cyclomatic 21) devshell/site/assets/js/app-dock.js:80— app-dock.dockManager.head has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
report.hardwarePayload (cyclomatic 21) devshell/site/assets/js/compute/report.js:38— report.hardwarePayload has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
app-panels.onDragEnd (cyclomatic 21) devshell/site/assets/js/app-panels.js:1292— app-panels.onDragEnd 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.
app-phone.tabletSheets (cyclomatic 21) devshell/site/assets/js/app-phone.js:335— app-phone.tabletSheets has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 350, 340). 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.
app-workspace-arrange.arrangeDialog.start (cyclomatic 21) devshell/site/assets/js/app-workspace-arrange.js:26— app-workspace-arrange.arrangeDialog.start 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.
app-workspace-extras.infoFields.render (cyclomatic 21) devshell/site/assets/js/app-workspace-extras.js:277— app-workspace-extras.infoFields.render has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
fields.fem2d (cyclomatic 21) devshell/site/assets/js/engines/em/fields.js:87— fields.fem2d has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tagmap.checkAddress (cyclomatic 21) devshell/site/assets/js/engines/live/tagmap.js:29— tagmap.checkAddress 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.
Robot._build (cyclomatic 21) devshell/site/assets/js/engines/motion/robot.js:25— Robot._build has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ladder.execLadder (cyclomatic 21) devshell/site/assets/js/engines/plc/ladder.js:38— ladder.execLadder has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 42, 40). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
makeAssistantFiles.list::walk (cyclomatic 21) REDACTED:1337— makeAssistantFiles.list::walk 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.
cleanAddonData (cyclomatic 21) REDACTED:87— cleanAddonData has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
textData (cyclomatic 21) app/dwg/objects-write.js:597— textData has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
encodeXrecord (cyclomatic 21) app/dwg/nongraphic-write.js:526— encodeXrecord has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
writeJournal (cyclomatic 21) app/app-autosave.js:454— writeJournal has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mountRc.addBlock (cyclomatic 21) app/rc-ui.js:62— mountRc.addBlock has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 14 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous) (cyclomatic 21) REDACTED:236— (anonymous) has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 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.
framing.cleanPanelSpec (cyclomatic 20) app/framing.js:240— framing.cleanPanelSpec has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
host.makeAssistantFiles.list::walk (cyclomatic 20) REDACTED:1337— host.makeAssistantFiles.list::walk 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.
linalg.ic0 (cyclomatic 20) app/fem/linalg.js:68— linalg.ic0 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.
loose.readRebar.solidOf (cyclomatic 20) app/rc/loose.js:172— loose.readRebar.solidOf 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.
report.reportSheets (cyclomatic 20) app/report.js:84— report.reportSheets has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 115, text, a function literal at line 102, …). 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.
panel.el (cyclomatic 20) app/issuelog/panel.js:27— panel.el 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.
drawings.stairSheet (cyclomatic 20) app/drawings.js:727— drawings.stairSheet 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.
Parser.body (cyclomatic 20) app/usd/usda-read.js:325— Parser.body 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.
stage.composeProp (cyclomatic 20) app/usd/stage.js:287— stage.composeProp has cyclomatic complexity 20 (threshold 15). Of this number, 18 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.
dwgout.sheetDxf (cyclomatic 20) app/dwgout.js:105— dwgout.sheetDxf has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
geo-nurbs.surfaceOf (cyclomatic 20) app/ifc/geo-nurbs.js:137— geo-nurbs.surfaceOf has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ai-history.modelExcerpt (cyclomatic 20) devshell/site/assets/js/ai-history.js:185— ai-history.modelExcerpt has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-access.matchSpoken (cyclomatic 20) REDACTED:146— app-access.matchSpoken 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.
knowledge-pack.findDocuments (cyclomatic 20) devshell/site/assets/js/knowledge-pack.js:53— knowledge-pack.findDocuments has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-input.placeOf (cyclomatic 20) devshell/site/assets/js/app-input.js:238— app-input.placeOf 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.
app-propgrid.create (cyclomatic 20) devshell/site/assets/js/app-propgrid.js:88— app-propgrid.create has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 332, 314, 315, …). 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.
app-reasons.boot::render (cyclomatic 20) devshell/site/assets/js/app-reasons.js:73— app-reasons.boot::render has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-workspace-extras.petPalette.refresh (cyclomatic 20) devshell/site/assets/js/app-workspace-extras.js:205— app-workspace-extras.petPalette.refresh 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.
app-workspace-vector.menubar.menuPanel (cyclomatic 20) devshell/site/assets/js/app-workspace-vector.js:173— app-workspace-vector.menubar.menuPanel has cyclomatic complexity 20 (threshold 15). Of this number, 15 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.
people.egress::run (cyclomatic 20) devshell/site/assets/js/engines/des/people.js:71— people.egress::run 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 (people.egress) 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.
bacnet.parseReadAck (cyclomatic 20) devshell/site/assets/js/engines/live/bacnet.js:99— bacnet.parseReadAck 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.
modbus.parseResponse (cyclomatic 20) devshell/site/assets/js/engines/live/modbus.js:38— modbus.parseResponse 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.
start::memberProps (cyclomatic 20) app/detailcraft.js:1194— start::memberProps 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: start::act (cyclomatic 42) 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.
mountAssistantIndicator (cyclomatic 20) REDACTED:1584— mountAssistantIndicator has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 9 function items inside it that branch (render, (anonymous)::(anonymous)::off, a function literal at line 1595, …). 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.
tableWriter::convert (cyclomatic 20) app/dwg/table-write.js:571— tableWriter::convert 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.
AddonLoader.externalFor (cyclomatic 19) REDACTED:504— AddonLoader.externalFor has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 506). 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.
nest.nestBars (cyclomatic 19) app/nest.js:29— nest.nestBars has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rebar.footingProblems (cyclomatic 19) app/rebar.js:110— rebar.footingProblems 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.
host.movedNotice (cyclomatic 19) REDACTED:2024— host.movedNotice has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
frame-design.checkAISCHollow (cyclomatic 19) app/frame/frame-design.js:223— frame-design.checkAISCHollow has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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.
frame-panel.framePanel.breakBlock (cyclomatic 19) app/frame/frame-panel.js:515— frame-panel.framePanel.breakBlock has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
bim.fromFrame (cyclomatic 19) app/fem/bim.js:20— bim.fromFrame has cyclomatic complexity 19 (threshold 15). Of this number, 16 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.
frame-push.pushoverOfFrame.newton (cyclomatic 19) app/fem/frame-push.js:275— frame-push.pushoverOfFrame.newton has cyclomatic complexity 19 (threshold 15). Of this number, 17 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.
clipboard.readClip (cyclomatic 19) app/clipboard.js:59— clipboard.readClip has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
clipboard.pasteInto (cyclomatic 19) app/clipboard.js:88— clipboard.pasteInto 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.
values.equalsText (cyclomatic 19) app/ids/values.js:55— values.equalsText 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.
Model.readPset (cyclomatic 19) app/ids/access.js:195— Model.readPset 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.
check.checkIds (cyclomatic 19) app/ids/check.js:192— check.checkIds has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
usda-write.listItemText (cyclomatic 19) app/usd/usda-write.js:162— usda-write.listItemText 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.
scene.pointInstances (cyclomatic 19) app/usd/scene.js:112— scene.pointInstances has cyclomatic complexity 19 (threshold 15). Of this number, 14 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.
table-read.readValue (cyclomatic 19) app/dwg/table-read.js:45— table-read.readValue 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.
objects-read.commonEntityHandles (cyclomatic 19) app/dwg/objects-read.js:213— objects-read.commonEntityHandles 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.
objects-read.DECODERS.LWPOLYLINE (cyclomatic 19) app/dwg/objects-read.js:1091— objects-read.DECODERS.LWPOLYLINE 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.
mleader-write.encodeMleader (cyclomatic 19) app/dwg/mleader-write.js:70— mleader-write.encodeMleader 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.
ifc-import.materialMap::nameOf (cyclomatic 19) app/ifc-import.js:566— ifc-import.materialMap::nameOf has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
geo-nurbs.bsplineSurface.inv (cyclomatic 19) app/ifc/geo-nurbs.js:283— geo-nurbs.bsplineSurface.inv 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.
live-follow.viewBody (cyclomatic 19) app/live-follow.js:40— live-follow.viewBody 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.
live.joinFromPage (cyclomatic 19) app/live.js:367— live.joinFromPage has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
AddonsAccount.#installSet (cyclomatic 19) devshell/site/assets/js/app-addons-account.js:494— AddonsAccount.#installSet has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-addons-account.satisfies (cyclomatic 19) devshell/site/assets/js/app-addons-account.js:57— app-addons-account.satisfies 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.
knowledge-pack.checkKnowledge (cyclomatic 19) devshell/site/assets/js/knowledge-pack.js:30— knowledge-pack.checkKnowledge has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-cmdline.suggest (cyclomatic 19) devshell/site/assets/js/app-cmdline.js:42— app-cmdline.suggest has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
app-dock.dockManager.decorate (cyclomatic 19) devshell/site/assets/js/app-dock.js:130— app-dock.dockManager.decorate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-dock.dockManager.groupGrips (cyclomatic 19) devshell/site/assets/js/app-dock.js:150— app-dock.dockManager.groupGrips has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-panels.openMenu (cyclomatic 19) devshell/site/assets/js/app-panels.js:818— app-panels.openMenu 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 3 function items inside it that branch (a function literal at line 853, away, a function literal at line 825). 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.
app-panels.bringBack (cyclomatic 19) devshell/site/assets/js/app-panels.js:1588— app-panels.bringBack has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-settings.ctxItems (cyclomatic 19) devshell/site/assets/js/app-settings.js:1498— app-settings.ctxItems has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-workspace-edit.layoutEditor.contextmenu (cyclomatic 19) devshell/site/assets/js/app-workspace-edit.js:97— app-workspace-edit.layoutEditor.contextmenu has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
fields.magnetostatic2d (cyclomatic 19) devshell/site/assets/js/engines/em/fields.js:120— fields.magnetostatic2d has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
geom.segsIntersect (cyclomatic 19) devshell/site/assets/js/engines/pcb/geom.js:9— geom.segsIntersect has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 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.
print.exprText (cyclomatic 19) devshell/site/assets/js/engines/plc/print.js:3— print.exprText has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Runtime.eval (cyclomatic 19) devshell/site/assets/js/engines/plc/runtime.js:197— Runtime.eval 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.
Runtime.kindOfExpr (cyclomatic 19) devshell/site/assets/js/engines/plc/runtime.js:231— Runtime.kindOfExpr 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.
plant.checkPlant (cyclomatic 19) REDACTED:384— plant.checkPlant 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.
reqif.writeReqif (cyclomatic 19) devshell/site/assets/js/engines/trace/reqif.js:87— reqif.writeReqif has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 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.
openFile (cyclomatic 19) REDACTED:438— openFile has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
framePanel.breakBlock (cyclomatic 19) app/frame/frame-panel.js:515— framePanel.breakBlock has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
bsplineSurface.inv (cyclomatic 19) app/ifc/geo-nurbs.js:283— bsplineSurface.inv 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.
subdivide (cyclomatic 19) app/frame/frame-solve.js:473— subdivide has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 491, (anonymous)::wAt, a function literal at line 474, …). 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.
solveFrame (cyclomatic 19) app/frame/frame-solve.js:535— solveFrame has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
getClassifications (cyclomatic 19) app/ifc/api.js:418— getClassifications has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
library.refreshInstalled (cyclomatic 18) app/addons/regs/lib/library.js:148— library.refreshInstalled 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 branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
pdf.contentStream (cyclomatic 18) app/pdf.js:43— pdf.contentStream has cyclomatic complexity 18 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rebar.footingBars (cyclomatic 18) app/rebar.js:188— rebar.footingBars has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 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.
frame-solve.diagram (cyclomatic 18) app/frame/frame-solve.js:606— frame-solve.diagram has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (at, at::force, integrate2, …). 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.
foundation.pressureField (cyclomatic 18) app/foundation.js:60— foundation.pressureField has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rc-design.cleanRc (cyclomatic 18) app/frame/rc-design.js:41— rc-design.cleanRc 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.
model.loadVector (cyclomatic 18) app/fem/model.js:178— model.loadVector has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 4 function literals 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.
frame-dyn.responseSpectrum (cyclomatic 18) app/fem/frame-dyn.js:58— frame-dyn.responseSpectrum 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.
Autosave.constructor (cyclomatic 18) app/app-autosave.js:194— Autosave.constructor has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ZipIndex.open (cyclomatic 18) app/bundle/read.js:62— ZipIndex.open 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.
rc-detail.cleanRc (cyclomatic 18) app/rc-detail.js:54— rc-detail.cleanRc 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.
transform.applyToMany (cyclomatic 18) app/transform.js:267— transform.applyToMany 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.
clipboard-ui.mountClipboard (cyclomatic 18) app/clipboard-ui.js:12— clipboard-ui.mountClipboard has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 120, 125). 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.
check.propertyMatch (cyclomatic 18) app/ids/check.js:126— check.propertyMatch 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.
viewcube.mountViewCube.draw (cyclomatic 18) app/viewcube.js:607— viewcube.mountViewCube.draw 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.
supply-ui.mountSupply.panel (cyclomatic 18) app/supply-ui.js:62— supply-ui.mountSupply.panel has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 80, 71, 74). 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.
foundation-ui.mountFoundation.takeFromAnalysis (cyclomatic 18) app/foundation-ui.js:75— foundation-ui.mountFoundation.takeFromAnalysis has cyclomatic complexity 18 (threshold 15). Of this number, 15 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.
interfaces-detailcraft.dcInterfaceInput (cyclomatic 18) app/interfaces-detailcraft.js:19— interfaces-detailcraft.dcInterfaceInput 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, 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.
intcode.decodeInts (cyclomatic 18) app/usd/intcode.js:18— intcode.decodeInts has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Composer.expand::visit (cyclomatic 18) app/usd/stage.js:176— Composer.expand::visit 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.
xf-ui.mountXf.xfBlock (cyclomatic 18) app/xf-ui.js:17— xf-ui.mountXf.xfBlock has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 46, 66, 30, …). 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.
lz-r2004-write.decompressR2004ForTest (cyclomatic 18) app/dwg/lz-r2004-write.js:164— lz-r2004-write.decompressR2004ForTest has cyclomatic complexity 18 (threshold 15). Of this number, 11 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.
container-write.layoutR2004 (cyclomatic 18) app/dwg/container-write.js:268— container-write.layoutR2004 has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ifc-import.reportLines (cyclomatic 18) app/ifc-import.js:593— ifc-import.reportLines 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.
step.unescapeStep (cyclomatic 18) app/ifc/step.js:333— step.unescapeStep 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.
IfcFile.inverseAsync (cyclomatic 18) app/ifc/model.js:193— IfcFile.inverseAsync has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GeoCtx.placement (cyclomatic 18) app/ifc/geo-ctx.js:177— GeoCtx.placement 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.
unit-prefs.limitSelect (cyclomatic 18) app/unit-prefs.js:143— unit-prefs.limitSelect has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 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.
m3d.writeM3d::writeMesh (cyclomatic 18) app/usd/m3d.js:105— m3d.writeM3d::writeMesh 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.
ai-principles.figuresIn (cyclomatic 18) devshell/site/assets/js/ai-principles.js:38— ai-principles.figuresIn 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.
AddonsAccount.closure (cyclomatic 18) devshell/site/assets/js/app-addons-account.js:397— AddonsAccount.closure has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (visit). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
app-workspace-popout.popout::open (cyclomatic 18) devshell/site/assets/js/app-workspace-popout.js:78— app-workspace-popout.popout::open 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.
report.familyOf (cyclomatic 18) devshell/site/assets/js/compute/report.js:22— report.familyOf 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.
app-input.panelLayout (cyclomatic 18) devshell/site/assets/js/app-input.js:223— app-input.panelLayout has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 227, 225, 234). 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.
app-panels.plan (cyclomatic 18) devshell/site/assets/js/app-panels.js:195— app-panels.plan has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 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.
app-phone.barFit (cyclomatic 18) devshell/site/assets/js/app-phone.js:399— app-phone.barFit has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-phone.layout (cyclomatic 18) devshell/site/assets/js/app-phone.js:438— app-phone.layout has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-settings.hiddenItems (cyclomatic 18) devshell/site/assets/js/app-settings.js:855— app-settings.hiddenItems has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
app-tabs-scroll.add (cyclomatic 18) devshell/site/assets/js/app-tabs-scroll.js:69— app-tabs-scroll.add 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 6 function literals inside it that branch (lines 85, 76, 82, …). 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.
totals.format (cyclomatic 18) devshell/site/assets/js/totals.js:27— totals.format 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.
urdf.parseXml (cyclomatic 18) devshell/site/assets/js/engines/motion/urdf.js:12— urdf.parseXml 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.
gds.flatten::walk (cyclomatic 18) devshell/site/assets/js/engines/pcb/gds.js:108— gds.flatten::walk 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.
modelica.evalExpr (cyclomatic 18) devshell/site/assets/js/engines/sys/modelica.js:18— modelica.evalExpr 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 (prim, mul, add, …). 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.
Help.search (cyclomatic 18) devshell/site/core/classes/Help.php:692— Help.search 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.
mountViewCube.draw (cyclomatic 18) app/viewcube.js:607— mountViewCube.draw 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.
bsplineSurface (cyclomatic 18) app/ifc/geo-nurbs.js:234— bsplineSurface has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
pieces (cyclomatic 18) app/frame/frame-solve.js:101— pieces has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
writeField (cyclomatic 18) app/dwg/table-write.js:121— writeField has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AddonLoader.baseApi (cyclomatic 17) REDACTED:478— AddonLoader.baseApi has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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.
regs.resolve (cyclomatic 17) app/addons/regs/lib/regs.js:230— regs.resolve 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.
problems.regsProblems (cyclomatic 17) app/addons/regs/lib/problems.js:25— problems.regsProblems 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.
rebar.cleanFooting (cyclomatic 17) app/rebar.js:83— rebar.cleanFooting 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.
plate-solve.plateNodeResults (cyclomatic 17) app/frame/plate-solve.js:343— plate-solve.plateNodeResults has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, 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.
erection.supports (cyclomatic 17) app/erection.js:116— erection.supports has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LiveClient.liveness (cyclomatic 17) REDACTED:527— LiveClient.liveness 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.
live-crypto.verifyAssertion (cyclomatic 17) app/live-crypto.js:323— live-crypto.verifyAssertion 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.
host.mountRecent.render (cyclomatic 17) REDACTED:1872— host.mountRecent.render has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
frame-design.checkAISC (cyclomatic 17) app/frame/frame-design.js:125— frame-design.checkAISC has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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.
frame-design.designTables (cyclomatic 17) app/frame/frame-design.js:385— frame-design.designTables has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
frame-dyn.combineArrays (cyclomatic 17) app/fem/frame-dyn.js:39— frame-dyn.combineArrays 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.
breakit.partFindings (cyclomatic 17) app/study/breakit.js:108— breakit.partFindings has cyclomatic complexity 17 (threshold 15). Of this number, 15 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.
live.createLive.start (cyclomatic 17) app/study/live.js:43— live.createLive.start has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 50, a function literal at line 59, cancelled). 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.
lencalc.calc::primary (cyclomatic 17) app/lencalc.js:143— lencalc.calc::primary 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.
plan.expandBundles (cyclomatic 17) app/bundle/plan.js:45— plan.expandBundles 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.
standards.layersFor (cyclomatic 17) app/bundle/standards.js:19— standards.layersFor 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.
supply.readSupply (cyclomatic 17) app/lib-supply/supply.js:113— supply.readSupply 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.
anchorage.develop (cyclomatic 17) app/rc/anchorage.js:86— anchorage.develop 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.
values.paramText (cyclomatic 17) app/ids/values.js:104— values.paramText 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.
ids.readFacet (cyclomatic 17) app/ids/ids.js:96— ids.readFacet 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.
Model.psets (cyclomatic 17) app/ids/access.js:173— Model.psets has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Model.ownClassifications (cyclomatic 17) app/ids/access.js:345— Model.ownClassifications 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.
check.attributeMatch (cyclomatic 17) app/ids/check.js:49— check.attributeMatch has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
viewcube.keyStep (cyclomatic 17) app/viewcube.js:319— viewcube.keyStep has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
interfaces.penetrationRules (cyclomatic 17) app/modelaudit/interfaces.js:101— interfaces.penetrationRules 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.
lz4.lz4Decompress (cyclomatic 17) app/usd/lz4.js:16— lz4.lz4Decompress 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.
lz4.lz4Compress (cyclomatic 17) app/usd/lz4.js:42— lz4.lz4Compress has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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.
geom.localMatrix (cyclomatic 17) app/usd/geom.js:109— geom.localMatrix 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.
dwgout.sheetModel (cyclomatic 17) app/dwgout.js:52— dwgout.sheetModel has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
surface-read.surfaceFields (cyclomatic 17) app/dwg/surface-read.js:77— surface-read.surfaceFields has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
surface-write.encodeSurface (cyclomatic 17) app/dwg/surface-write.js:64— surface-write.encodeSurface 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.
view3d.partGeometry (cyclomatic 17) app/view3d.js:916— view3d.partGeometry has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
live-classroom.checkWireOps (cyclomatic 17) app/live-classroom.js:144— live-classroom.checkWireOps 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.
live-presence.pointsBox::walk (cyclomatic 17) app/live-presence.js:91— live-presence.pointsBox::walk 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.
textin.decodePartsAsync (cyclomatic 17) app/textin.js:68— textin.decodePartsAsync has cyclomatic complexity 17 (threshold 15). Of this number, 11 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.
fetch-vendor.fetchVendor (cyclomatic 17) devshell/fetch-vendor.mjs:24— fetch-vendor.fetchVendor has cyclomatic complexity 17 (threshold 15). Of this number, 9 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.
ai-suggest.summarize (cyclomatic 17) devshell/site/assets/js/ai-suggest.js:45— ai-suggest.summarize has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
knowledge-pack.knowledgeTools (cyclomatic 17) devshell/site/assets/js/knowledge-pack.js:74— knowledge-pack.knowledgeTools has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 91, a function literal at line 98, get, …). 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.
app-cmdline.matchWord (cyclomatic 17) devshell/site/assets/js/app-cmdline.js:29— app-cmdline.matchWord has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-devices-ui.boot (cyclomatic 17) devshell/site/assets/js/app-devices-ui.js:42— app-devices-ui.boot 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: 2 other methods here (app-devices-ui.boot::viewAt, app-devices-ui.boot::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.
app-devices-ui.mountSettings::el (cyclomatic 17) devshell/site/assets/js/app-devices-ui.js:307— app-devices-ui.mountSettings::el 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.
app-dock.dockManager.startDrag (cyclomatic 17) devshell/site/assets/js/app-dock.js:234— app-dock.dockManager.startDrag has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (move, up). 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.
KeyMatcher.press (cyclomatic 17) devshell/site/assets/js/app-input.js:471— KeyMatcher.press has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-input.normCombo (cyclomatic 17) devshell/site/assets/js/app-input.js:73— app-input.normCombo has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
app-phone.classify (cyclomatic 17) devshell/site/assets/js/app-phone.js:119— app-phone.classify has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 125, 130, 131). 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.
app-settings.screenOnOpen (cyclomatic 17) devshell/site/assets/js/app-settings.js:569— app-settings.screenOnOpen has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (first). 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.
app-settings.syncForm (cyclomatic 17) devshell/site/assets/js/app-settings.js:1177— app-settings.syncForm has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-shell.popOut (cyclomatic 17) devshell/site/assets/js/app-shell.js:433— app-shell.popOut has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
app-workspace-extras.petPalette (cyclomatic 17) devshell/site/assets/js/app-workspace-extras.js:186— app-workspace-extras.petPalette 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.
app-workspace-extras.infoFields.twin (cyclomatic 17) devshell/site/assets/js/app-workspace-extras.js:246— app-workspace-extras.infoFields.twin has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 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.
app-workspace-vector.menuOf (cyclomatic 17) devshell/site/assets/js/app-workspace-vector.js:94— app-workspace-vector.menuOf 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.
rng.sample (cyclomatic 17) devshell/site/assets/js/engines/des/rng.js:42— rng.sample 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.
mqtt.readPayload (cyclomatic 17) devshell/site/assets/js/engines/live/mqtt.js:86— mqtt.readPayload 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.
gerber.readDrill (cyclomatic 17) devshell/site/assets/js/engines/pcb/gerber.js:192— gerber.readDrill 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.
print.stmtsText (cyclomatic 17) devshell/site/assets/js/engines/plc/print.js:19— print.stmtsText has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, 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.
runtime.analyze (cyclomatic 17) devshell/site/assets/js/engines/plc/runtime.js:35— runtime.analyze 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: 2 other methods here (runtime.analyze::ty, runtime.analyze::walk) 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.
logic.condition (cyclomatic 17) devshell/site/assets/js/engines/risk/logic.js:65— logic.condition has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
weibull.fitMLE (cyclomatic 17) devshell/site/assets/js/engines/risk/weibull.js:40— weibull.fitMLE has cyclomatic complexity 17 (threshold 15). Of this number, 16 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.
matrix.checkMatrix (cyclomatic 17) devshell/site/assets/js/engines/risk/matrix.js:11— matrix.checkMatrix 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.
number.numberWires (cyclomatic 17) devshell/site/assets/js/engines/schematic/number.js:13— number.numberWires has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plans.cablePlan (cyclomatic 17) devshell/site/assets/js/engines/schematic/plans.js:58— plans.cablePlan has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 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.
PlantGraph.merge::pass (cyclomatic 17) REDACTED:133— PlantGraph.merge::pass 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.
plant.bom (cyclomatic 17) REDACTED:173— plant.bom has cyclomatic complexity 17 (threshold 15). Of this number, 13 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.
Lang.use (cyclomatic 17) devshell/site/core/classes/Lang.php:61— Lang.use 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.
LAYER (cyclomatic 17) app/dwg/objects-write.js:281— LAYER has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
(anonymous) (cyclomatic 17) app/dwg/nongraphic-write.js:141— (anonymous) has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, 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.
clean (cyclomatic 17) app/steelstair/steelstair.js:104— clean has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
pushoverOfFrame::newton (cyclomatic 17) app/fem/frame-push.js:275— pushoverOfFrame::newton 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.
adapter.startRegs (cyclomatic 16) app/addons/regs/lib/adapter.js:36— adapter.startRegs has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, 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.
connections.findSplices (cyclomatic 16) app/connections.js:176— connections.findSplices 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.
ui-util.el (cyclomatic 16) app/ui-util.js:8— ui-util.el 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.
loads-asce7.floorCase (cyclomatic 16) app/frame/loads-asce7.js:87— loads-asce7.floorCase has cyclomatic complexity 16 (threshold 15). Of this number, 11 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.
frame-concrete.concreteTables (cyclomatic 16) app/frame/frame-concrete.js:289— frame-concrete.concreteTables has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 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.
frame-loads-panel.loadsPanel.makeWind (cyclomatic 16) app/frame/frame-loads-panel.js:87— frame-loads-panel.loadsPanel.makeWind has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
frame-loads-panel.loadsPanel.lookup (cyclomatic 16) app/frame/frame-loads-panel.js:185— frame-loads-panel.loadsPanel.lookup has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
frame-dynamics-panel.dynamicsPanel.pushBlock (cyclomatic 16) app/frame/frame-dynamics-panel.js:294— frame-dynamics-panel.dynamicsPanel.pushBlock has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
frame-dynamics-panel.dynamicsPanel.tables (cyclomatic 16) app/frame/frame-dynamics-panel.js:343— frame-dynamics-panel.dynamicsPanel.tables 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.
hinge.plasticOf (cyclomatic 16) app/fem/hinge.js:56— hinge.plasticOf 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.
elements.startersBelow (cyclomatic 16) app/rc/elements.js:627— elements.startersBelow 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.
model.cleanBolt (cyclomatic 16) app/model.js:625— model.cleanBolt 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.
shell-mount.detailHost (cyclomatic 16) app/shell-mount.js:90— shell-mount.detailHost 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 10 function literals inside it that branch (lines 100, 111, 131, …). 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.
values.valueText (cyclomatic 16) app/ids/values.js:122— values.valueText 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.
drawings.revisionTable (cyclomatic 16) app/drawings.js:1005— drawings.revisionTable has cyclomatic complexity 16 (threshold 15). Of this number, 12 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.
usdc-read.buildPaths (cyclomatic 16) app/usd/usdc-read.js:150— usdc-read.buildPaths 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: ValueReader.inline (cyclomatic 18) 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.
acds.writeAcds (cyclomatic 16) app/dwg/acds.js:197— acds.writeAcds has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
solid-read.decodeAcisEntity (cyclomatic 16) app/dwg/solid-read.js:83— solid-read.decodeAcisEntity 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.
mleader-write.convertMleader (cyclomatic 16) app/dwg/mleader-write.js:44— mleader-write.convertMleader has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (styleText, ltype, h, …). 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.
mleader-write.encodeMleaderStyle (cyclomatic 16) app/dwg/mleader-write.js:161— mleader-write.encodeMleaderStyle 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.
solid-write.writeWireframe (cyclomatic 16) app/dwg/solid-write.js:76— solid-write.writeWireframe 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.
GeoCtx.unitFactor (cyclomatic 16) app/ifc/geo-ctx.js:79— GeoCtx.unitFactor 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.
geo-nurbs.edgeLoopRuns (cyclomatic 16) app/ifc/geo-nurbs.js:52— geo-nurbs.edgeLoopRuns 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.
ClassStore.onSnapPiece (cyclomatic 16) app/live-classroom.js:198— ClassStore.onSnapPiece 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.
ClassStore.onThumb (cyclomatic 16) app/live-classroom.js:219— ClassStore.onThumb 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.
ai-principles.createLedger (cyclomatic 16) devshell/site/assets/js/ai-principles.js:86— ai-principles.createLedger has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AddonsAccount.sync (cyclomatic 16) devshell/site/assets/js/app-addons-account.js:172— AddonsAccount.sync 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.
AddonsAccount.connect (cyclomatic 16) devshell/site/assets/js/app-addons-account.js:249— AddonsAccount.connect has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 254, 253, 251). 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.
help-core.detect (cyclomatic 16) devshell/site/assets/js/help-core.js:13— help-core.detect 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.
calc.tokenize (cyclomatic 16) devshell/site/assets/js/calc.js:73— calc.tokenize 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.
app-devices.importProfile (cyclomatic 16) devshell/site/assets/js/app-devices.js:194— app-devices.importProfile has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-phone.ensureBar (cyclomatic 16) devshell/site/assets/js/app-phone.js:161— app-phone.ensureBar has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 164, 185, 169, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
app-settings.startArrange (cyclomatic 16) devshell/site/assets/js/app-settings.js:444— app-settings.startArrange has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-workspace-arrange.arrangeDialog.open (cyclomatic 16) devshell/site/assets/js/app-workspace-arrange.js:73— app-workspace-arrange.arrangeDialog.open has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 113, 91). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
app-workspace-extras.myTools.pick (cyclomatic 16) devshell/site/assets/js/app-workspace-extras.js:113— app-workspace-extras.myTools.pick has cyclomatic complexity 16 (threshold 15). Of this number, 10 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.
Sim.report (cyclomatic 16) devshell/site/assets/js/engines/des/engine.js:385— Sim.report 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.
dynamics.rnea (cyclomatic 16) devshell/site/assets/js/engines/motion/dynamics.js:21— dynamics.rnea 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.
board.fromNetlist (cyclomatic 16) devshell/site/assets/js/engines/pcb/board.js:98— board.fromNetlist 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.
Parser.caseLabelAhead (cyclomatic 16) devshell/site/assets/js/engines/plc/st.js:187— Parser.caseLabelAhead 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.
plcopen.writePlcopen (cyclomatic 16) REDACTED:63— plcopen.writePlcopen 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.
fmea.fmea.rows (cyclomatic 16) devshell/site/assets/js/engines/risk/fmea.js:11— fmea.fmea.rows 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, 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.
PlantGraph.addItem (cyclomatic 16) REDACTED:74— PlantGraph.addItem 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.
help-panel.addTopics (cyclomatic 16) devshell/site/assets/js/help-panel.js:189— help-panel.addTopics has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
help-panel.open (cyclomatic 16) devshell/site/assets/js/help-panel.js:316— help-panel.open 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.
constructor (cyclomatic 16) REDACTED:352— constructor 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.
VIEW (cyclomatic 16) app/dwg/objects-write.js:366— VIEW 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.
dynamicsPanel.motionBox (cyclomatic 16) app/frame/frame-dynamics-panel.js:210— dynamicsPanel.motionBox has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 19 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.
dynamicsPanel.pushBlock (cyclomatic 16) app/frame/frame-dynamics-panel.js:294— dynamicsPanel.pushBlock has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 27 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dynamicsPanel.tables (cyclomatic 16) app/frame/frame-dynamics-panel.js:343— dynamicsPanel.tables has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
writeCellStyle (cyclomatic 16) app/dwg/table-write.js:157— writeCellStyle 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.
r24CellStyle (cyclomatic 16) app/dwg/table-write.js:181— r24CellStyle 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.
unitScales (cyclomatic 16) app/ifc/ifc43.js:66— unitScales 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.
constructability.constructability (cognitive 340) app/constructability.js:58— constructability.constructability has cognitive complexity 340 (threshold 15). Drivers by points: if/else 47 (168 pts), loops 24 (85 pts), ternaries 16 (56 pts), boolean chains 31 (nesting depth added 222). Of this number, 329 points are the body's own statements and 11 belong to 5 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.
writeDwg (cognitive 256) app/dwg/write.js:87— writeDwg has cognitive complexity 256 (threshold 15). Drivers by points: if/else 141 (243 pts), boolean chains 171, ternaries 91 (159 pts), loops 49 (67 pts), other 44, match/switch 2 (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.
oldTable (cognitive 228) app/dwg/table-write.js:279— oldTable has cognitive complexity 228 (threshold 15). Drivers by points: if/else 41 (130 pts), ternaries 18 (51 pts), loops 13 (28 pts), boolean chains 16, other 3 (nesting depth added 137). Of this number, 213 points are the body's own statements and 15 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.
host.createDispatcher (cognitive 223) REDACTED:823— host.createDispatcher has cognitive complexity 223 (threshold 15). Drivers by points: boolean chains 77, if/else 57 (77 pts), ternaries 35 (56 pts), error handling 7 (9 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 44). Of this number, 149 points are the body's own statements and 74 belong to 19 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
writeDwg::convert (cognitive 216) app/dwg/write.js:374— writeDwg::convert has cognitive complexity 216 (threshold 15). Drivers by points: if/else 45 (84 pts), boolean chains 54, ternaries 23 (48 pts), other 25, loops 2 (4 pts), match/switch 1 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
convert (cognitive 216) app/ifc-import.js:67— convert has cognitive complexity 216 (threshold 15). Drivers by points: if/else 108 (223 pts), boolean chains 118, ternaries 57 (112 pts), loops 34 (52 pts), error handling 6 (14 pts), other 3, match/switch 2 (nesting depth added 196). 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.
plate-solve.prepareShell (cognitive 184) app/frame/plate-solve.js:36— plate-solve.prepareShell has cognitive complexity 184 (threshold 15). Drivers by points: loops 44 (94 pts), if/else 28 (67 pts), boolean chains 17, ternaries 3 (6 pts) (nesting depth added 92). Of this number, 166 points are the body's own statements and 18 belong to 5 function literals 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.
checkElement (cognitive 169) app/rc/elements.js:517— checkElement has cognitive complexity 169 (threshold 15). Drivers by points: ternaries 25 (88 pts), if/else 35 (64 pts), loops 5 (13 pts), boolean chains 4 (nesting depth added 100). Of this number, 154 points are the body's own statements and 15 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.
fields.readPack (cognitive 168) devshell/site/assets/js/fields.js:41— fields.readPack has cognitive complexity 168 (threshold 15). Drivers by points: if/else 30 (59 pts), ternaries 31 (59 pts), boolean chains 38, loops 9 (12 pts) (nesting depth added 60). Of this number, 155 points are the body's own statements and 13 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.
nongraphic-write.extendWriter (cognitive 164) app/dwg/nongraphic-write.js:170— nongraphic-write.extendWriter has cognitive complexity 164 (threshold 15). Drivers by points: boolean chains 134, if/else 9 (21 pts), loops 3 (5 pts), ternaries 4 (nesting depth added 14). Of this number, 157 points are the body's own statements and 7 belong to 18 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.
analysis.frameOf (cognitive 151) app/analysis.js:63— analysis.frameOf has cognitive complexity 151 (threshold 15). Drivers by points: if/else 44 (83 pts), ternaries 13 (24 pts), boolean chains 22, loops 17 (22 pts) (nesting depth added 55). Of this number, 120 points are the body's own statements and 31 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.
steelstair.build (cognitive 151) app/steelstair/steelstair.js:168— steelstair.build has cognitive complexity 151 (threshold 15). Drivers by points: ternaries 26 (60 pts), loops 15 (37 pts), if/else 15 (35 pts), boolean chains 19 (nesting depth added 76). Of this number, 45 points are the body's own statements and 106 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.
panelBars (cognitive 150) app/rc/elements.js:382— panelBars has cognitive complexity 150 (threshold 15). Drivers by points: ternaries 26 (80 pts), if/else 14 (38 pts), loops 9 (25 pts), boolean chains 7 (nesting depth added 94). Of this number, 71 points are the body's own statements and 79 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.
Model.compile (cognitive 149) devshell/site/assets/js/engines/sys/model.js:56— Model.compile has cognitive complexity 149 (threshold 15). Drivers by points: if/else 46 (104 pts), ternaries 12 (25 pts), boolean chains 13, loops 4, match/switch 2 (3 pts) (nesting depth added 72). Of this number, 139 points are the body's own statements and 10 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.
model.readModel (cognitive 146) app/model.js:665— model.readModel has cognitive complexity 146 (threshold 15). Drivers by points: if/else 37 (56 pts), ternaries 21 (51 pts), boolean chains 25, loops 10 (11 pts), error handling 2 (3 pts) (nesting depth added 51). Of this number, 137 points are the body's own statements and 9 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.
regs.cleanPack (cognitive 143) app/addons/regs/lib/regs.js:127— regs.cleanPack has cognitive complexity 143 (threshold 15). Drivers by points: if/else 38 (61 pts), boolean chains 42, ternaries 27 (36 pts), error handling 1 (2 pts), loops 2 (nesting depth added 33). Of this number, 104 points are the body's own statements and 39 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.
prepare (cognitive 143) app/frame/frame-solve.js:195— prepare has cognitive complexity 143 (threshold 15). Drivers by points: loops 36 (76 pts), if/else 23 (50 pts), boolean chains 14, ternaries 1 (3 pts) (nesting depth added 69). Of this number, 136 points are the body's own statements and 7 belong to 12 function literals 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.
cleanElement (cognitive 142) app/rc/elements.js:88— cleanElement has cognitive complexity 142 (threshold 15). Drivers by points: if/else 33 (64 pts), ternaries 14 (30 pts), other 25, boolean chains 19, loops 2 (4 pts) (nesting depth added 49). Of this number, 140 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.
pipes.readPipes (cognitive 141) app/ifc/pipes.js:29— pipes.readPipes has cognitive complexity 141 (threshold 15). Drivers by points: if/else 32 (81 pts), loops 14 (26 pts), ternaries 5 (19 pts), boolean chains 15 (nesting depth added 75). Of this number, 121 points are the body's own statements and 20 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.
elementBars (cognitive 140) app/rc/elements.js:256— elementBars has cognitive complexity 140 (threshold 15). Drivers by points: ternaries 32 (76 pts), if/else 16 (29 pts), loops 9 (21 pts), boolean chains 14 (nesting depth added 69). Of this number, 44 points are the body's own statements and 96 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.
st.lex (cognitive 139) devshell/site/assets/js/engines/plc/st.js:27— st.lex has cognitive complexity 139 (threshold 15). Drivers by points: if/else 26 (74 pts), loops 12 (38 pts), boolean chains 24, ternaries 1 (3 pts) (nesting depth added 76). Of this number, 135 points are the body's own statements and 4 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.
write43 (cognitive 136) app/ifc/ifc43.js:380— write43 has cognitive complexity 136 (threshold 15). Drivers by points: if/else 22 (63 pts), ternaries 10 (37 pts), boolean chains 23, loops 7 (11 pts), other 2 (nesting depth added 72). Of this number, 118 points are the body's own statements and 18 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.
surfaceFace (cognitive 134) app/ifc/geo-nurbs.js:315— surfaceFace has cognitive complexity 134 (threshold 15). Drivers by points: if/else 22 (43 pts), loops 28 (43 pts), ternaries 15 (31 pts), boolean chains 17 (nesting depth added 52). Of this number, 107 points are the body's own statements and 27 belong to 28 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.
bindPointer (cognitive 132) app/view3d.js:737— bindPointer has cognitive complexity 132 (threshold 15). Drivers by points: if/else 46 (76 pts), boolean chains 28, ternaries 8 (21 pts), error handling 4 (7 pts) (nesting depth added 46). None of this is in the body itself: all 132 points belong to 21 function items inside it that branch (a function literal at line 777, a function literal at line 819, a function literal at line 875, …). 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.
shop.shopDrawing (cognitive 130) app/shop.js:37— shop.shopDrawing has cognitive complexity 130 (threshold 15). Drivers by points: ternaries 26 (46 pts), if/else 24 (31 pts), loops 18 (28 pts), boolean chains 25 (nesting depth added 37). Of this number, 113 points are the body's own statements and 17 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.
build.build (cognitive 128) app/build.js:33— build.build has cognitive complexity 128 (threshold 15). Drivers by points: ternaries 13 (47 pts), if/else 14 (34 pts), loops 20 (31 pts), boolean chains 16 (nesting depth added 65). Of this number, 126 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.
drawings.assemblySheet (cognitive 128) app/drawings.js:531— drawings.assemblySheet has cognitive complexity 128 (threshold 15). Drivers by points: ternaries 33 (61 pts), if/else 22 (27 pts), boolean chains 21, loops 16 (19 pts) (nesting depth added 36). Of this number, 104 points are the body's own statements and 24 belong to 13 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.
gerber.readGerber (cognitive 127) devshell/site/assets/js/engines/pcb/gerber.js:142— gerber.readGerber has cognitive complexity 127 (threshold 15). Drivers by points: if/else 46 (97 pts), ternaries 4 (12 pts), boolean chains 9, loops 4 (9 pts) (nesting depth added 64). Of this number, 124 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.
agents.detailTools (cognitive 126) REDACTED:90— agents.detailTools has cognitive complexity 126 (threshold 15). Drivers by points: boolean chains 42, ternaries 25 (42 pts), if/else 30 (38 pts), loops 3 (4 pts) (nesting depth added 26). None of this is in the body itself: all 126 points belong to 30 function items inside it that branch (a function literal at line 132, a function literal at line 214, a function literal at line 235, …). 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.
rc-design.checkRcFrame (cognitive 123) app/frame/rc-design.js:121— rc-design.checkRcFrame has cognitive complexity 123 (threshold 15). Drivers by points: if/else 33 (69 pts), boolean chains 22, ternaries 12 (22 pts), loops 5 (10 pts) (nesting depth added 51). Most of this is not in the body itself: 3 of the 123 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 155, 131, 161, …). 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.
read43 (cognitive 122) app/ifc/ifc43.js:108— read43 has cognitive complexity 122 (threshold 15). Drivers by points: if/else 27 (64 pts), loops 26 (44 pts), boolean chains 29, ternaries 8 (20 pts), other 8, error handling 2 (7 pts) (nesting depth added 72). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drc.drc (cognitive 119) devshell/site/assets/js/engines/pcb/drc.js:21— drc.drc has cognitive complexity 119 (threshold 15). Drivers by points: if/else 28 (62 pts), boolean chains 21, loops 8 (18 pts), ternaries 6 (18 pts) (nesting depth added 56). Of this number, 93 points are the body's own statements and 26 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.
sharedApi (cognitive 119) REDACTED:862— sharedApi has cognitive complexity 119 (threshold 15). Drivers by points: if/else 44 (46 pts), boolean chains 40, ternaries 17 (19 pts), error handling 8 (12 pts), loops 1, other 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 119 points is its own statement and the rest belongs to 62 function items inside it that branch (toolbarGroup, panelSection, settingsSection, …). 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.
HATCH (cognitive 119) app/dwg/objects-write.js:799— HATCH has cognitive complexity 119 (threshold 15). Drivers by points: if/else 14 (36 pts), ternaries 12 (36 pts), loops 10 (32 pts), boolean chains 14, other 1 (nesting depth added 68). Of this number, 118 points are the body's own statements and 1 belongs 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.
setModel (cognitive 119) app/view3d.js:213— setModel has cognitive complexity 119 (threshold 15). Drivers by points: loops 18 (44 pts), ternaries 11 (34 pts), if/else 20 (32 pts), boolean chains 9 (nesting depth added 61). Of this number, 104 points are the body's own statements and 15 belong to 16 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plcopen.readLd (cognitive 118) REDACTED:106— plcopen.readLd has cognitive complexity 118 (threshold 15). Drivers by points: if/else 20 (44 pts), ternaries 9 (33 pts), loops 13 (25 pts), boolean chains 16 (nesting depth added 60). Of this number, 108 points are the body's own statements and 10 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.
tokenize (cognitive 116) app/usd/usda-read.js:30— tokenize has cognitive complexity 116 (threshold 15). Drivers by points: if/else 26 (75 pts), loops 6 (15 pts), boolean chains 13, ternaries 4 (13 pts) (nesting depth added 67). Of this number, 113 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.
closingUV (cognitive 112) app/ifc/geo-nurbs.js:481— closingUV has cognitive complexity 112 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 15 (38 pts), ternaries 8 (20 pts), boolean chains 12 (nesting depth added 62). Of this number, 101 points are the body's own statements and 11 belong to 18 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
checkFooting (cognitive 110) app/foundation.js:152— checkFooting has cognitive complexity 110 (threshold 15). Drivers by points: ternaries 25 (43 pts), if/else 24 (33 pts), boolean chains 27, loops 6 (7 pts) (nesting depth added 28). Of this number, 67 points are the body's own statements and 43 belong to 28 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.
checkManifest (cognitive 108) REDACTED:108— checkManifest has cognitive complexity 108 (threshold 15). Drivers by points: if/else 36 (56 pts), boolean chains 33, ternaries 8 (15 pts), loops 3 (4 pts) (nesting depth added 28). Of this number, 94 points are the body's own statements and 14 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.
oldTableModel (cognitive 108) app/dwg/table-read.js:527— oldTableModel has cognitive complexity 108 (threshold 15). Drivers by points: if/else 27 (73 pts), ternaries 9 (15 pts), boolean chains 8, loops 4 (6 pts), other 6 (nesting depth added 54). Of this number, 102 points are the body's own statements and 6 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.
engine.validate (cognitive 107) devshell/site/assets/js/engines/des/engine.js:317— engine.validate has cognitive complexity 107 (threshold 15). Drivers by points: if/else 34 (76 pts), boolean chains 22, loops 4 (9 pts) (nesting depth added 47). Of this number, 103 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-workspace-format.validateLayout (cognitive 103) devshell/site/assets/js/app-workspace-format.js:223— app-workspace-format.validateLayout has cognitive complexity 103 (threshold 15). Drivers by points: if/else 35 (62 pts), boolean chains 19, ternaries 8 (16 pts), loops 4 (6 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.
ifc.writeIfc (cognitive 101) app/ifc.js:90— ifc.writeIfc has cognitive complexity 101 (threshold 15). Drivers by points: if/else 22 (43 pts), boolean chains 21, loops 14 (21 pts), ternaries 6 (15 pts), match/switch 1 (nesting depth added 37). Of this number, 60 points are the body's own statements and 41 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.
Runtime.exec (cognitive 101) devshell/site/assets/js/engines/plc/runtime.js:270— Runtime.exec has cognitive complexity 101 (threshold 15). Drivers by points: if/else 20 (73 pts), loops 6 (16 pts), ternaries 2 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 69). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loose.readRebar.curve (cognitive 100) app/rc/loose.js:110— loose.readRebar.curve has cognitive complexity 100 (threshold 15). Drivers by points: if/else 19 (55 pts), boolean chains 18, ternaries 4 (15 pts), loops 4 (12 pts) (nesting depth added 55). Of this number, 98 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ai-suggest.createSuggestions (cognitive 100) devshell/site/assets/js/ai-suggest.js:71— ai-suggest.createSuggestions has cognitive complexity 100 (threshold 15). Drivers by points: boolean chains 44, if/else 22 (28 pts), ternaries 8 (11 pts), loops 7 (9 pts), error handling 6 (8 pts) (nesting depth added 13). Of this number, 61 points are the body's own statements and 39 belong to 15 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ai-activity.createActivityLog (cognitive 98) devshell/site/assets/js/ai-activity.js:85— ai-activity.createActivityLog has cognitive complexity 98 (threshold 15). Drivers by points: boolean chains 67, if/else 42 (48 pts), ternaries 38 (48 pts), loops 7 (8 pts), error handling 2 (3 pts) (nesting depth added 18). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (ai-activity.createActivityLog::normalise) 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.
newTableModel (cognitive 97) app/dwg/table-read.js:627— newTableModel has cognitive complexity 97 (threshold 15). Drivers by points: if/else 41 (64 pts), boolean chains 11, ternaries 9, loops 4 (8 pts), other 5 (nesting depth added 27). Of this number, 22 points are the body's own statements and 75 belong to 15 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ai-history.createHistory (cognitive 96) devshell/site/assets/js/ai-history.js:32— ai-history.createHistory has cognitive complexity 96 (threshold 15). Drivers by points: if/else 30 (41 pts), boolean chains 28, ternaries 14 (19 pts), loops 6, error handling 1 (2 pts) (nesting depth added 17). Of this number, 74 points are the body's own statements and 22 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xml.parseXml (cognitive 93) app/ids/xml.js:42— xml.parseXml has cognitive complexity 93 (threshold 15). Drivers by points: if/else 34 (76 pts), boolean chains 8, loops 4 (7 pts), ternaries 1 (2 pts) (nesting depth added 46). Of this number, 89 points are the body's own statements and 4 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.
app-teamwork.boot (cognitive 93) devshell/site/assets/js/app-teamwork.js:29— app-teamwork.boot has cognitive complexity 93 (threshold 15). Drivers by points: ternaries 28 (34 pts), boolean chains 32, if/else 20 (27 pts) (nesting depth added 13). Most of this is not in the body itself: 9 of the 93 points are its own statements and the rest belongs to 21 function items inside it that branch (threadView, render::modelBody, render, …). 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.
circuit.parseDeck (cognitive 93) devshell/site/assets/js/engines/em/circuit.js:322— circuit.parseDeck has cognitive complexity 93 (threshold 15). Drivers by points: if/else 25 (43 pts), ternaries 7 (25 pts), loops 4 (12 pts), boolean chains 11, error handling 1 (2 pts) (nesting depth added 45). Of this number, 84 points are the body's own statements and 9 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.
runSet (cognitive 92) app/frame/frame-solve.js:367— runSet has cognitive complexity 92 (threshold 15). Drivers by points: loops 28 (44 pts), if/else 13 (30 pts), ternaries 4 (11 pts), boolean chains 7 (nesting depth added 40). Of this number, 57 points are the body's own statements and 35 belong to 5 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.
buildMitre (cognitive 91) app/connections.js:752— buildMitre has cognitive complexity 91 (threshold 15). Drivers by points: if/else 24 (38 pts), loops 9 (21 pts), ternaries 9 (19 pts), boolean chains 13 (nesting depth added 36). Of this number, 88 points are the body's own statements and 3 belong to 16 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
power.loadFlow (cognitive 89) devshell/site/assets/js/engines/network/power.js:51— power.loadFlow has cognitive complexity 89 (threshold 15). Drivers by points: loops 11 (32 pts), if/else 15 (30 pts), boolean chains 23, ternaries 2 (4 pts) (nesting depth added 38). Of this number, 59 points are the body's own statements and 30 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fields.createFields (cognitive 88) devshell/site/assets/js/fields.js:149— fields.createFields has cognitive complexity 88 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 22, loops 14 (22 pts), ternaries 4 (5 pts), error handling 3 (4 pts) (nesting depth added 21). Of this number, 64 points are the body's own statements and 24 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.
table-read.oldTable (cognitive 87) app/dwg/table-read.js:198— table-read.oldTable has cognitive complexity 87 (threshold 15). Drivers by points: if/else 30 (75 pts), loops 6 (11 pts), boolean chains 1 (nesting depth added 50). Of this number, 71 points are the body's own statements and 16 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.
board.readBoard (cognitive 87) devshell/site/assets/js/engines/pcb/board.js:68— board.readBoard has cognitive complexity 87 (threshold 15). Drivers by points: ternaries 15 (28 pts), if/else 16 (27 pts), boolean chains 23, loops 6 (8 pts), error handling 1 (nesting depth added 26). Of this number, 77 points are the body's own statements and 10 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.
app-input.validateProfile (cognitive 85) devshell/site/assets/js/app-input.js:320— app-input.validateProfile has cognitive complexity 85 (threshold 15). Drivers by points: if/else 53 (102 pts), boolean chains 26, ternaries 10 (24 pts), loops 8 (15 pts) (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (app-input.validateProfile::panelItems) 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.
nc1.writeNc1 (cognitive 84) app/nc1.js:89— nc1.writeNc1 has cognitive complexity 84 (threshold 15). Drivers by points: ternaries 20 (45 pts), if/else 16 (21 pts), loops 8 (14 pts), boolean chains 4 (nesting depth added 36). Of this number, 66 points are the body's own statements and 18 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.
Help.renderBody (cognitive 84) devshell/site/core/classes/Help.php:235— Help.renderBody has cognitive complexity 84 (threshold 15). Drivers by points: if/else 25 (54 pts), loops 5 (11 pts), boolean chains 10, ternaries 3 (9 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.
frame-combos.generateCombos (cognitive 82) app/frame/frame-combos.js:58— frame-combos.generateCombos has cognitive complexity 82 (threshold 15). Drivers by points: loops 11 (34 pts), if/else 14 (32 pts), ternaries 3 (9 pts), boolean chains 7 (nesting depth added 47). Of this number, 74 points are the body's own statements and 8 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.
live-classroom.attachClassroom (cognitive 82) app/live-classroom.js:250— live-classroom.attachClassroom has cognitive complexity 82 (threshold 15). Drivers by points: if/else 120 (158 pts), boolean chains 89, error handling 25 (47 pts), ternaries 30 (43 pts), loops 16 (17 pts) (nesting depth added 74). To reduce it, split the body into named stages: move each independent 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 (live-classroom.attachClassroom::ingest, live-classroom.attachClassroom::roster, live-classroom.attachClassroom::lookIn) 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.
connections.buildGusset (cognitive 81) app/connections.js:590— connections.buildGusset has cognitive complexity 81 (threshold 15). Drivers by points: if/else 33 (47 pts), boolean chains 16, loops 6 (11 pts), ternaries 5 (7 pts) (nesting depth added 21). Of this number, 78 points are the body's own statements and 3 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.
sheets.elementSheet (cognitive 81) app/rc/sheets.js:76— sheets.elementSheet has cognitive complexity 81 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 19, ternaries 8 (19 pts), loops 7 (13 pts) (nesting depth added 29). Of this number, 78 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.
flexibleMat (cognitive 80) app/foundation.js:351— flexibleMat has cognitive complexity 80 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 25, loops 11 (20 pts), ternaries 4 (7 pts) (nesting depth added 24). Of this number, 58 points are the body's own statements and 22 belong to 19 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plate-solve.runShellSet (cognitive 79) app/frame/plate-solve.js:236— plate-solve.runShellSet has cognitive complexity 79 (threshold 15). Drivers by points: loops 30 (44 pts), if/else 8 (19 pts), ternaries 3 (12 pts), boolean chains 4 (nesting depth added 34). Of this number, 51 points are the body's own statements and 28 belong to 8 function literals 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.
mountViewCube (cognitive 79) app/viewcube.js:463— mountViewCube has cognitive complexity 79 (threshold 15). Drivers by points: if/else 25 (33 pts), ternaries 10 (17 pts), boolean chains 16, loops 6 (10 pts), error handling 2, other 1 (nesting depth added 19). Of this number, 29 points are the body's own statements and 50 belong to 16 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.
nlSystem (cognitive 79) app/fem/frame-push.js:51— nlSystem has cognitive complexity 79 (threshold 15). Drivers by points: loops 14 (31 pts), if/else 9 (19 pts), ternaries 6 (18 pts), boolean chains 11 (nesting depth added 39). Of this number, 27 points are the body's own statements and 52 belong to 18 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.
nlTimeHistoryOfFrame (cognitive 78) app/fem/frame-push.js:351— nlTimeHistoryOfFrame has cognitive complexity 78 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 10 (19 pts), ternaries 11 (16 pts), boolean chains 11, other 6 (nesting depth added 26). Of this number, 57 points are the body's own statements and 21 belong to 22 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.
objects-read.DECODERS.HATCH (cognitive 77) app/dwg/objects-read.js:954— objects-read.DECODERS.HATCH has cognitive complexity 77 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 11 (33 pts), ternaries 1 (4 pts) (nesting depth added 49). 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.
table-write.tableWriter (cognitive 77) app/dwg/table-write.js:486— table-write.tableWriter has cognitive complexity 77 (threshold 15). Drivers by points: boolean chains 32, if/else 14 (28 pts), loops 9 (14 pts), ternaries 3 (nesting depth added 19). Of this number, 48 points are the body's own statements and 29 belong to 15 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gds.readGds (cognitive 77) devshell/site/assets/js/engines/pcb/gds.js:23— gds.readGds has cognitive complexity 77 (threshold 15). Drivers by points: if/else 21 (56 pts), loops 6 (10 pts), boolean chains 7, match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 41). Of this number, 71 points are the body's own statements and 6 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.
reqif.readReqif (cognitive 77) devshell/site/assets/js/engines/trace/reqif.js:20— reqif.readReqif has cognitive complexity 77 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 20, loops 11 (14 pts), ternaries 4 (8 pts), error handling 1 (nesting depth added 20). Of this number, 66 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.
buildSplice (cognitive 77) app/connections.js:512— buildSplice has cognitive complexity 77 (threshold 15). Drivers by points: ternaries 10 (28 pts), loops 10 (22 pts), if/else 14 (15 pts), boolean chains 12 (nesting depth added 31). Of this number, 75 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-propgrid.create.control (cognitive 75) devshell/site/assets/js/app-propgrid.js:153— app-propgrid.create.control has cognitive complexity 75 (threshold 15). Drivers by points: if/else 31 (56 pts), error handling 2 (7 pts), ternaries 3 (7 pts), boolean chains 5 (nesting depth added 34). Of this number, 37 points are the body's own statements and 38 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solve.simulate (cognitive 75) devshell/site/assets/js/engines/sys/solve.js:92— solve.simulate has cognitive complexity 75 (threshold 15). Drivers by points: if/else 17 (33 pts), ternaries 9 (19 pts), boolean chains 18, loops 4 (5 pts) (nesting depth added 27). Of this number, 65 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.
createControlRelay.handle (cognitive 75) REDACTED:1774— createControlRelay.handle has cognitive complexity 75 (threshold 15). Drivers by points: if/else 22 (38 pts), boolean chains 17, ternaries 7 (17 pts), error handling 1 (3 pts) (nesting depth added 28). Of this number, 70 points are the body's own statements and 5 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.
app-docinfo.boot (cognitive 74) devshell/site/assets/js/app-docinfo.js:30— app-docinfo.boot has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 23 (26 pts), boolean chains 22, if/else 13, error handling 7 (11 pts), loops 2 (nesting depth added 7). Most of this is not in the body itself: 9 of the 74 points are its own statements and the rest belongs to 21 function items inside it that branch (facts, unverifiedBlock, who, …). 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.
app-workspace-format.resolveLayout (cognitive 74) devshell/site/assets/js/app-workspace-format.js:302— app-workspace-format.resolveLayout has cognitive complexity 74 (threshold 15). Drivers by points: if/else 19 (53 pts), boolean chains 16, loops 2 (3 pts), ternaries 2 (nesting depth added 35). Of this number, 68 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.
host.createControlRelay.handle (cognitive 73) REDACTED:1774— host.createControlRelay.handle has cognitive complexity 73 (threshold 15). Drivers by points: if/else 22 (38 pts), ternaries 7 (17 pts), boolean chains 15, error handling 1 (3 pts) (nesting depth added 28). Of this number, 68 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.
frame-push.pushoverOfFrame (cognitive 73) app/fem/frame-push.js:247— frame-push.pushoverOfFrame has cognitive complexity 73 (threshold 15). Drivers by points: if/else 21 (36 pts), boolean chains 19, ternaries 11 (16 pts), loops 2 (nesting depth added 20). Of this number, 53 points are the body's own statements and 20 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.
plant.layout (cognitive 73) REDACTED:246— plant.layout has cognitive complexity 73 (threshold 15). Drivers by points: ternaries 13 (30 pts), if/else 11 (22 pts), boolean chains 12, loops 7 (9 pts) (nesting depth added 30). Of this number, 25 points are the body's own statements and 48 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ai-teacher.stepsOf (cognitive 72) devshell/site/assets/js/ai-teacher.js:69— ai-teacher.stepsOf has cognitive complexity 72 (threshold 15). Drivers by points: if/else 16 (46 pts), boolean chains 15, loops 3 (7 pts), error handling 1 (4 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.
model.read (cognitive 72) devshell/site/assets/js/engines/schematic/model.js:74— model.read has cognitive complexity 72 (threshold 15). Drivers by points: ternaries 13 (27 pts), if/else 14 (25 pts), boolean chains 10, loops 6 (8 pts), error handling 1 (2 pts) (nesting depth added 28). Of this number, 59 points are the body's own statements and 13 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.
framing.placePanel (cognitive 71) app/framing.js:279— framing.placePanel has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 8 (30 pts), if/else 14 (25 pts), boolean chains 9, loops 3 (7 pts) (nesting depth added 37). Of this number, 65 points are the body's own statements and 6 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.
congestion.congestion (cognitive 71) app/congestion.js:38— congestion.congestion has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 7 (33 pts), if/else 6 (17 pts), loops 7 (11 pts), boolean chains 10 (nesting depth added 41). Of this number, 69 points are the body's own statements and 2 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.
interfaces.openingRules (cognitive 71) app/modelaudit/interfaces.js:60— interfaces.openingRules has cognitive complexity 71 (threshold 15). Drivers by points: if/else 13 (34 pts), boolean chains 14, ternaries 5 (14 pts), loops 5 (9 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.
model.build (cognitive 70) app/fem/model.js:112— model.build has cognitive complexity 70 (threshold 15). Drivers by points: loops 18 (38 pts), if/else 8 (20 pts), boolean chains 11, ternaries 1 (nesting depth added 32). Of this number, 65 points are the body's own statements and 5 belong to 2 function literals 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.
r2007-write.compressR2007 (cognitive 69) app/dwg/r2007-write.js:120— r2007-write.compressR2007 has cognitive complexity 69 (threshold 15). Drivers by points: if/else 19 (35 pts), loops 7 (15 pts), boolean chains 11, ternaries 4 (8 pts) (nesting depth added 28). Of this number, 63 points are the body's own statements and 6 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.
place.place (cognitive 69) devshell/site/assets/js/engines/pcb/place.js:26— place.place has cognitive complexity 69 (threshold 15). Drivers by points: if/else 24 (43 pts), loops 13 (18 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 25). Of this number, 48 points are the body's own statements and 21 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.
Help.withScreens (cognitive 69) devshell/site/core/classes/Help.php:556— Help.withScreens has cognitive complexity 69 (threshold 15). Drivers by points: if/else 13 (32 pts), ternaries 7 (18 pts), loops 6 (16 pts), boolean chains 3 (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.
Circuit._assemble (cognitive 68) devshell/site/assets/js/engines/em/circuit.js:134— Circuit._assemble has cognitive complexity 68 (threshold 15). Drivers by points: if/else 19 (55 pts), loops 4 (8 pts), match/switch 1 (2 pts), ternaries 2, boolean chains 1 (nesting depth added 41). Of this number, 53 points are the body's own statements and 15 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.
gerber.writeGerber (cognitive 68) devshell/site/assets/js/engines/pcb/gerber.js:61— gerber.writeGerber has cognitive complexity 68 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 10 (19 pts), boolean chains 7, ternaries 2 (6 pts) (nesting depth added 33). Of this number, 33 points are the body's own statements and 35 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.
activate (cognitive 68) REDACTED:534— activate has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 14, ternaries 6 (12 pts), error handling 4 (9 pts), loops 1 (3 pts) (nesting depth added 26). Of this number, 58 points are the body's own statements and 10 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.
newTable (cognitive 68) app/dwg/table-write.js:402— newTable has cognitive complexity 68 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 14, loops 8 (13 pts), ternaries 5 (10 pts), other 7 (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.
check.checkSchematic (cognitive 67) devshell/site/assets/js/engines/schematic/check.js:25— check.checkSchematic has cognitive complexity 67 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 17, loops 12 (15 pts) (nesting depth added 21). Of this number, 62 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.
xml.parseXml (cognitive 67) devshell/site/assets/js/engines/trace/xml.js:17— xml.parseXml has cognitive complexity 67 (threshold 15). Drivers by points: if/else 28 (58 pts), loops 3 (5 pts), boolean chains 2, 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.
frame-members.buildFrame (cognitive 66) app/frame/frame-members.js:41— frame-members.buildFrame has cognitive complexity 66 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 13 (17 pts), boolean chains 14, ternaries 5 (9 pts) (nesting depth added 20). Of this number, 55 points are the body's own statements and 11 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.
app-input.validateProfile::panelItems (cognitive 66) devshell/site/assets/js/app-input.js:350— app-input.validateProfile::panelItems has cognitive complexity 66 (threshold 15). Drivers by points: if/else 20 (43 pts), ternaries 4 (13 pts), boolean chains 6, loops 2 (4 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. This shape REPEATS in the file: one other method here (app-input.validateProfile) 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.
ik.ik (cognitive 66) devshell/site/assets/js/engines/motion/ik.js:22— ik.ik has cognitive complexity 66 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 9 (26 pts), boolean chains 9, ternaries 3 (4 pts) (nesting depth added 30). Of this number, 60 points are the body's own statements and 6 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.
checkSchema (cognitive 66) REDACTED:768— checkSchema has cognitive complexity 66 (threshold 15). Drivers by points: if/else 24 (40 pts), boolean chains 18, loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flush (cognitive 66) REDACTED:691— flush has cognitive complexity 66 (threshold 15). Drivers by points: if/else 15 (37 pts), ternaries 3 (13 pts), boolean chains 10, loops 2 (6 pts) (nesting depth added 36). Of this number, 59 points are the body's own statements and 7 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.
objects-read.groupType (cognitive 65) app/dwg/objects-read.js:1290— objects-read.groupType has cognitive complexity 65 (threshold 15). Drivers by points: if/else 32, boolean chains 29, ternaries 2 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Antenna._build (cognitive 65) devshell/site/assets/js/engines/em/wire.js:45— Antenna._build has cognitive complexity 65 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 14 (24 pts), boolean chains 6, ternaries 2 (5 pts) (nesting depth added 29). Of this number, 58 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cleanAnalysis (cognitive 65) app/frame/frame-panel.js:80— cleanAnalysis has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 13 (24 pts), if/else 12 (19 pts), boolean chains 14, loops 5 (6 pts), other 2 (nesting depth added 19). Of this number, 64 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
modelica.readModelica (cognitive 64) devshell/site/assets/js/engines/sys/modelica.js:56— modelica.readModelica has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (34 pts), loops 10 (14 pts), error handling 3 (10 pts), boolean chains 4, ternaries 2 (nesting depth added 27). Of this number, 60 points are the body's own statements and 4 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.
combos-asce7.asce7Combos (cognitive 63) app/frame/combos-asce7.js:19— combos-asce7.asce7Combos has cognitive complexity 63 (threshold 15). Drivers by points: ternaries 11 (24 pts), loops 9 (23 pts), if/else 9 (15 pts), boolean chains 1 (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.
lencalc.tokenize (cognitive 63) app/lencalc.js:60— lencalc.tokenize has cognitive complexity 63 (threshold 15). Drivers by points: if/else 15 (44 pts), boolean chains 16, loops 2 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Composer.compose (cognitive 63) app/usd/stage.js:233— Composer.compose has cognitive complexity 63 (threshold 15). Drivers by points: if/else 18 (35 pts), loops 13 (18 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 23). Of this number, 59 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
usdc-read.readUsdc (cognitive 62) app/usd/usdc-read.js:29— usdc-read.readUsdc has cognitive complexity 62 (threshold 15). Drivers by points: if/else 26 (44 pts), loops 6 (12 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 25). Of this number, 58 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.
scene.readMaterial (cognitive 62) app/usd/scene.js:158— scene.readMaterial has cognitive complexity 62 (threshold 15). Drivers by points: if/else 17 (38 pts), boolean chains 16, loops 4 (8 pts) (nesting depth added 25). Of this number, 53 points are the body's own statements and 9 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.
Circuit.ac (cognitive 62) devshell/site/assets/js/engines/em/circuit.js:230— Circuit.ac has cognitive complexity 62 (threshold 15). Drivers by points: if/else 12 (36 pts), loops 8 (18 pts), boolean chains 3, match/switch 1 (3 pts), ternaries 2 (nesting depth added 36). Of this number, 57 points are the body's own statements and 5 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.
plate.plateStiffness (cognitive 61) app/frame/plate.js:90— plate.plateStiffness has cognitive complexity 61 (threshold 15). Drivers by points: loops 23 (57 pts), if/else 1 (4 pts) (nesting depth added 37). Of this number, 56 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
app-pen.boot (cognitive 61) devshell/site/assets/js/app-pen.js:139— app-pen.boot has cognitive complexity 61 (threshold 15). Drivers by points: if/else 25 (32 pts), boolean chains 20, ternaries 7 (8 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 61 points is its own statement and the rest belongs to 14 function items inside it that branch (move, down, up, …). 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.
app-cmdline.dockedCommandLine (cognitive 60) devshell/site/assets/js/app-cmdline.js:85— app-cmdline.dockedCommandLine has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (25 pts), ternaries 9 (19 pts), boolean chains 15, error handling 1 (nesting depth added 14). None of this is in the body itself: all 60 points belong to 15 function items inside it that branch (a function literal at line 137, fill, run, …). 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.
frame-model.cleanFrame (cognitive 59) app/frame/frame-model.js:76— frame-model.cleanFrame has cognitive complexity 59 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 21, ternaries 5, loops 3, error handling 1 (2 pts) (nesting depth added 7). Of this number, 29 points are the body's own statements and 30 belong to 9 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.
plcopen.readPlcopen (cognitive 59) REDACTED:157— plcopen.readPlcopen has cognitive complexity 59 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 8 (18 pts), ternaries 4 (11 pts), boolean chains 9, error handling 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solve (cognitive 59) app/steelstair/steelstair.js:125— solve has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 13 (21 pts), boolean chains 15, if/else 12 (15 pts), other 6, loops 2 (nesting depth added 11). Of this number, 50 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.
r2007-write.layoutR2007 (cognitive 58) app/dwg/r2007-write.js:281— r2007-write.layoutR2007 has cognitive complexity 58 (threshold 15). Drivers by points: loops 15 (24 pts), ternaries 7 (17 pts), if/else 8 (14 pts), boolean chains 3 (nesting depth added 25). Of this number, 51 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Circuit.check (cognitive 58) devshell/site/assets/js/engines/em/circuit.js:60— Circuit.check has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 11 (13 pts), boolean chains 9, ternaries 3 (7 pts) (nesting depth added 19). Of this number, 55 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.
fluid.solveNetwork (cognitive 58) devshell/site/assets/js/engines/network/fluid.js:85— fluid.solveNetwork has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 13, ternaries 7 (11 pts), loops 3, error handling 1 (2 pts) (nesting depth added 15). Of this number, 29 points are the body's own statements and 29 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.
frame-dyn.timeHistory (cognitive 57) app/fem/frame-dyn.js:100— frame-dyn.timeHistory has cognitive complexity 57 (threshold 15). Drivers by points: loops 8 (24 pts), if/else 14 (22 pts), ternaries 5 (6 pts), boolean chains 5 (nesting depth added 25). Of this number, 53 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
marks.markParts (cognitive 57) app/marks.js:94— marks.markParts has cognitive complexity 57 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 16, loops 11 (15 pts), ternaries 4 (6 pts) (nesting depth added 18). Of this number, 51 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LiveStore.apply (cognitive 57) devshell/site/assets/js/engines/live/store.js:36— LiveStore.apply has cognitive complexity 57 (threshold 15). Drivers by points: if/else 10 (32 pts), ternaries 6 (16 pts), boolean chains 6, loops 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.
frame-panel.framePanel.loadsBlock (cognitive 56) app/frame/frame-panel.js:321— frame-panel.framePanel.loadsBlock has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 18 (31 pts), if/else 9 (12 pts), boolean chains 9, loops 3 (4 pts) (nesting depth added 17). Of this number, 26 points are the body's own statements and 30 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.
shell.membrane (cognitive 56) app/fem/shell.js:201— shell.membrane has cognitive complexity 56 (threshold 15). Drivers by points: loops 19 (52 pts), if/else 1 (4 pts) (nesting depth added 36). 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.
ids.audit (cognitive 56) app/ids/ids.js:157— ids.audit has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (39 pts), boolean chains 14, loops 2, ternaries 1 (nesting depth added 18). Of this number, 47 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.
usd-detailcraft.partMesh (cognitive 56) app/usd-detailcraft.js:59— usd-detailcraft.partMesh has cognitive complexity 56 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 9 (19 pts), boolean chains 9, ternaries 5 (9 pts) (nesting depth added 24). Of this number, 43 points are the body's own statements and 13 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geo-bool.capLoops (cognitive 56) app/ifc/geo-bool.js:206— geo-bool.capLoops has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 11 (19 pts), ternaries 3 (7 pts), boolean chains 5 (nesting depth added 26). Of this number, 49 points are the body's own statements and 7 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.
std.runStdFb (cognitive 56) devshell/site/assets/js/engines/plc/std.js:33— std.runStdFb has cognitive complexity 56 (threshold 15). Drivers by points: if/else 22 (41 pts), boolean chains 14, match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
xml.parseXml::element (cognitive 56) devshell/site/assets/js/engines/plc/xml.js:23— xml.parseXml::element has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (40 pts), loops 7 (11 pts), boolean chains 5 (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.
drawings.gaContent (cognitive 55) app/drawings.js:307— drawings.gaContent has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 8 (16 pts), boolean chains 9, ternaries 4 (8 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geo-nurbs.delaunay (cognitive 55) app/ifc/geo-nurbs.js:723— geo-nurbs.delaunay has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 10 (17 pts), boolean chains 7, ternaries 1 (4 pts) (nesting depth added 25). Of this number, 41 points are the body's own statements and 14 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.
frame-breakit.breakFrame (cognitive 54) app/frame/frame-breakit.js:31— frame-breakit.breakFrame has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 14, loops 5 (9 pts), ternaries 6 (9 pts) (nesting depth added 17). Of this number, 43 points are the body's own statements and 11 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gds.layoutDrc (cognitive 54) devshell/site/assets/js/engines/pcb/gds.js:152— gds.layoutDrc has cognitive complexity 54 (threshold 15). Drivers by points: if/else 8 (29 pts), loops 6 (20 pts), boolean chains 5 (nesting depth added 35). Of this number, 37 points are the body's own statements and 17 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.
cpm.cpm (cognitive 54) devshell/site/assets/js/engines/schedule/cpm.js:52— cpm.cpm has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 5 (16 pts), loops 8 (12 pts), boolean chains 6 (nesting depth added 23). Of this number, 53 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.
plant.snapshotFrom3d (cognitive 53) REDACTED:199— plant.snapshotFrom3d has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 21, ternaries 7 (16 pts), loops 6 (9 pts), if/else 3 (7 pts) (nesting depth added 16). Of this number, 41 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chunks.apply (cognitive 52) app/history/chunks.js:128— chunks.apply has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 10 (21 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 22). Of this number, 51 points are the body's own statements and 1 belongs 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.
app-addons-account.installFromFile (cognitive 52) devshell/site/assets/js/app-addons-account.js:704— app-addons-account.installFromFile has cognitive complexity 52 (threshold 15). Drivers by points: boolean chains 26, if/else 13 (15 pts), ternaries 4 (6 pts), error handling 4 (5 pts) (nesting depth added 5). Of this number, 51 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.
urdf.readUrdf (cognitive 52) devshell/site/assets/js/engines/motion/urdf.js:51— urdf.readUrdf has cognitive complexity 52 (threshold 15). Drivers by points: if/else 18 (43 pts), boolean chains 5, error handling 2, loops 1, ternaries 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gds.writeGds (cognitive 52) devshell/site/assets/js/engines/pcb/gds.js:63— gds.writeGds has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (29 pts), ternaries 4 (11 pts), boolean chains 6, loops 5 (6 pts) (nesting depth added 27). Of this number, 48 points are the body's own statements and 4 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.
framePanel.loadsBlock (cognitive 52) app/frame/frame-panel.js:321— framePanel.loadsBlock has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 18 (24 pts), if/else 9 (12 pts), boolean chains 9, loops 3 (4 pts), other 3 (nesting depth added 10). Of this number, 20 points are the body's own statements and 32 belong to 18 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
addConnection (cognitive 52) app/model.js:439— addConnection has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 20, ternaries 5 (10 pts) (nesting depth added 13). Of this number, 44 points are the body's own statements and 8 belong to 12 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.
wallPanel (cognitive 52) app/framing.js:47— wallPanel has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 5 (10 pts), loops 7 (9 pts), boolean chains 8 (nesting depth added 20). Of this number, 50 points are the body's own statements and 2 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.
frame-pdf.reportPdf (cognitive 51) app/frame/frame-pdf.js:42— frame-pdf.reportPdf has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 10 (22 pts), if/else 8 (15 pts), loops 6 (8 pts), boolean chains 6 (nesting depth added 21). Of this number, 19 points are the body's own statements and 32 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.
frame-draw.resultGeometry (cognitive 51) app/frame/frame-draw.js:28— frame-draw.resultGeometry has cognitive complexity 51 (threshold 15). Drivers by points: loops 11 (21 pts), ternaries 9 (17 pts), if/else 7 (9 pts), boolean chains 4 (nesting depth added 20). Of this number, 30 points are the body's own statements and 21 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.
ai-ask.createAsk (cognitive 51) devshell/site/assets/js/ai-ask.js:75— ai-ask.createAsk has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 54, if/else 38 (54 pts), ternaries 24 (32 pts), error handling 13 (20 pts), loops 6 (7 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (ai-ask.createAsk::runAskEngine, ai-ask.createAsk::runAskEngine::callTool, ai-ask.createAsk::runEngine) 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.
app-panels.menuItems (cognitive 51) devshell/site/assets/js/app-panels.js:783— app-panels.menuItems has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 16, ternaries 4 (10 pts) (nesting depth added 16). Of this number, 39 points are the body's own statements and 12 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.
bacnet.values (cognitive 51) devshell/site/assets/js/engines/live/bacnet.js:69— bacnet.values has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (34 pts), ternaries 3 (10 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
route.route (cognitive 51) devshell/site/assets/js/engines/pcb/route.js:19— route.route has cognitive complexity 51 (threshold 15). Drivers by points: if/else 41 (98 pts), loops 38 (74 pts), boolean chains 21, ternaries 1 (nesting depth added 93). To reduce it, split the body into named stages: move each independent 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: 4 other methods here (route.route::raster, route.route::routeNet, route.route::routeNet::access, …) 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.
ipc2581.writeIpc2581 (cognitive 51) devshell/site/assets/js/engines/pcb/ipc2581.js:13— ipc2581.writeIpc2581 has cognitive complexity 51 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 13 (14 pts), boolean chains 12, ternaries 6 (7 pts) (nesting depth added 11). Of this number, 31 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.
Help.search (cognitive 51) devshell/site/core/classes/Help.php:692— Help.search has cognitive complexity 51 (threshold 15). Drivers by points: if/else 9 (31 pts), ternaries 5 (14 pts), loops 3 (6 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plate-solve.plateNodeResults (cognitive 50) app/frame/plate-solve.js:343— plate-solve.plateNodeResults has cognitive complexity 50 (threshold 15). Drivers by points: loops 10 (35 pts), if/else 6 (14 pts), boolean chains 1 (nesting depth added 33). Of this number, 45 points are the body's own statements and 5 belong to 2 function literals 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.
mleader-write.writeContext (cognitive 50) app/dwg/mleader-write.js:98— mleader-write.writeContext has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 14 (24 pts), boolean chains 9, loops 5 (9 pts), if/else 7 (8 pts) (nesting depth added 15). Of this number, 37 points are the body's own statements and 13 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
encodeHeader (cognitive 50) app/dwg/objects-write.js:1109— encodeHeader has cognitive complexity 50 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 6 (17 pts), boolean chains 10, other 3, match/switch 1 (2 pts), loops 1 (nesting depth added 20). Of this number, 46 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.
app-addons-account.renderYourAddons::draw (cognitive 49) devshell/site/assets/js/app-addons-account.js:772— app-addons-account.renderYourAddons::draw has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 13, ternaries 4 (11 pts), loops 3 (5 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.
app-workspace-tools.editTools (cognitive 49) devshell/site/assets/js/app-workspace-tools.js:120— app-workspace-tools.editTools has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (31 pts), boolean chains 6, ternaries 3 (6 pts), loops 2 (5 pts), match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
checkFrame (cognitive 49) app/frame/frame-design.js:307— checkFrame has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 11 (15 pts), loops 8 (13 pts), boolean chains 5 (nesting depth added 15). Of this number, 20 points are the body's own statements and 29 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
autopilot.propose (cognitive 48) app/autopilot.js:98— autopilot.propose has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 11, loops 6 (7 pts), ternaries 2 (4 pts) (nesting depth added 17). Of this number, 47 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
study.readStudy (cognitive 48) app/study/study.js:33— study.readStudy has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 17, ternaries 3 (6 pts) (nesting depth added 13). Of this number, 32 points are the body's own statements and 16 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ai-teacher.rankTopics (cognitive 48) devshell/site/assets/js/ai-teacher.js:39— ai-teacher.rankTopics has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 5 (20 pts), if/else 7 (14 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 23). Of this number, 45 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.
connections.buildBasePlate (cognitive 47) app/connections.js:438— connections.buildBasePlate has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 15, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 11). Of this number, 43 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
problems-detailcraft.dcProblems (cognitive 47) app/problems-detailcraft.js:66— problems-detailcraft.dcProblems has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 7 (21 pts), if/else 5 (15 pts), boolean chains 10, loops 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.
step.scanStep (cognitive 47) app/ifc/step.js:112— step.scanStep has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (38 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-panels.load (cognitive 47) devshell/site/assets/js/app-panels.js:113— app-panels.load has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 18, ternaries 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 7 of the 47 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 117, 135, 145, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Parser.stmt (cognitive 47) devshell/site/assets/js/engines/plc/st.js:145— Parser.stmt has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 4 (14 pts), boolean chains 4, match/switch 1 (2 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.
loadStrings (cognitive 47) REDACTED:443— loadStrings has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 10, loops 5 (9 pts), ternaries 2 (7 pts), error handling 1 (2 pts) (nesting depth added 20). Of this number, 34 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.
decodeObject (cognitive 47) app/dwg/objects-read.js:52— decodeObject has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (25 pts), ternaries 4 (9 pts), boolean chains 7, error handling 2 (3 pts), other 3 (nesting depth added 9). 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· save (cognitive 47) · ×1
save (cognitive 47) app/app-autosave.js:403— save has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 11, error handling 4 (8 pts), ternaries 5 (7 pts), other 1 (nesting depth added 12). Most of this is not in the body itself: 4 of the 47 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 408, 428). 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.
panel.mountIssuePanel.render (cognitive 46) app/issuelog/panel.js:192— panel.mountIssuePanel.render has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 18 (29 pts), boolean chains 13, if/else 3 (4 pts) (nesting depth added 12). Of this number, 16 points are the body's own statements and 30 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.
geom.shapeMesh (cognitive 46) app/usd/geom.js:227— geom.shapeMesh has cognitive complexity 46 (threshold 15). Drivers by points: loops 12 (33 pts), if/else 7 (8 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 24). Of this number, 44 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
detailcraft.start (cognitive 46) app/detailcraft.js:97— detailcraft.start has cognitive complexity 46 (threshold 15). Drivers by points: if/else 387 (497 pts), ternaries 140 (286 pts), boolean chains 172, loops 45 (57 pts), error handling 13 (15 pts), match/switch 1 (nesting depth added 270). To reduce it, split the body into named stages: move each independent 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: 9 other methods here (detailcraft.start::refresh, detailcraft.start::exists, detailcraft.start::renderBar, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 10 times rather than 10 independent problems. Splitting this body alone leaves the other 9 exactly as they are. Where these are variations on one operation, the change that clears all 10 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.
sheetBuilder (cognitive 46) app/drawings.js:70— sheetBuilder has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 11 (15 pts), boolean chains 10, loops 6 (10 pts), if/else 9, other 2 (nesting depth added 8). None of this is in the body itself: all 46 points belong to 18 function items inside it that branch (dimH, dimV, chainH, …). 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.
anchorSheet (cognitive 46) app/drawings.js:822— anchorSheet has cognitive complexity 46 (threshold 15). Drivers by points: loops 12 (16 pts), if/else 10 (14 pts), ternaries 9 (11 pts), boolean chains 5 (nesting depth added 10). Of this number, 40 points are the body's own statements and 6 belong to 55 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.
connections.buildEndPlate (cognitive 45) app/connections.js:281— connections.buildEndPlate has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 8, ternaries 4 (5 pts), loops 3 (4 pts) (nesting depth added 9). 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.
frame-weld.checkWelds (cognitive 45) app/frame/frame-weld.js:198— frame-weld.checkWelds has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 7 (15 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 24). Of this number, 27 points are the body's own statements and 18 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.
problems-detailcraft.anchorOf (cognitive 45) app/problems-detailcraft.js:95— problems-detailcraft.anchorOf has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 8 (22 pts), if/else 10 (15 pts), boolean chains 8 (nesting depth added 19). 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.
xsd-regex.xsdRegExp (cognitive 45) REDACTED:77— xsd-regex.xsdRegExp has cognitive complexity 45 (threshold 15). Drivers by points: if/else 48 (79 pts), boolean chains 9, ternaries 3 (6 pts), loops 2, error handling 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (xsd-regex.xsdRegExp::charClass) 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.
host.makeRecent (cognitive 44) REDACTED:273— host.makeRecent has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 10, ternaries 5 (8 pts), error handling 4 (5 pts), loops 3 (nesting depth added 13). Of this number, 43 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.
Model.value (cognitive 44) app/ids/access.js:64— Model.value has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 12, ternaries 5 (12 pts) (nesting depth added 13). Of this number, 37 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-devices-studio.studioMidi.requestMIDIAccess (cognitive 44) devshell/site/assets/js/app-devices-studio.js:169— app-devices-studio.studioMidi.requestMIDIAccess has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 16, loops 4 (5 pts), error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 9 of the 44 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 208, a function literal at line 184, input, …). 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.
people.egress (cognitive 44) devshell/site/assets/js/engines/des/people.js:27— people.egress has cognitive complexity 44 (threshold 15). Drivers by points: if/else 25 (43 pts), boolean chains 18, loops 8 (9 pts), ternaries 7 (8 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. This shape REPEATS in the file: one other method here (people.egress::run) 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.
plc.runScene (cognitive 44) devshell/site/assets/js/engines/ui/plc.js:68— plc.runScene has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 11, ternaries 8 (10 pts), loops 5 (6 pts), error handling 1 (nesting depth added 10). Of this number, 34 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.
mleader-write.ensureMleaderStyle (cognitive 43) app/dwg/mleader-write.js:193— mleader-write.ensureMleaderStyle has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 13, ternaries 6 (13 pts), loops 3 (nesting depth added 12). Of this number, 25 points are the body's own statements and 18 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.
geo-tri.bridgeHole (cognitive 43) app/ifc/geo-tri.js:71— geo-tri.bridgeHole has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 13, ternaries 1 (3 pts), loops 2 (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.
app-ai-activity.boot (cognitive 43) devshell/site/assets/js/app-ai-activity.js:31— app-ai-activity.boot has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 19, ternaries 12, if/else 8, error handling 3 (4 pts) (nesting depth added 1). Most of this is not in the body itself: 10 of the 43 points are its own statements and the rest belongs to 12 function items inside it that branch (rowEl, render, docName, …). 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.
app-panels.layoutGrid (cognitive 43) devshell/site/assets/js/app-panels.js:318— app-panels.layoutGrid has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 7, ternaries 5 (7 pts) (nesting depth added 9). Of this number, 23 points are the body's own statements and 20 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.
Circuit.tran (cognitive 43) devshell/site/assets/js/engines/em/circuit.js:268— Circuit.tran has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 8 (15 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 19). Of this number, 25 points are the body's own statements and 18 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.
linkPackage (cognitive 43) REDACTED:243— linkPackage has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 7 (14 pts), loops 7 (8 pts), boolean chains 2, error handling 1 (nesting depth added 17). Of this number, 35 points are the body's own statements and 8 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.
sections.cleanFormat (cognitive 42) app/addons/regs/lib/sections.js:121— sections.cleanFormat has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 7, ternaries 2 (5 pts), 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.
frame-concrete-panel.concretePanel.seismicBlock (cognitive 42) app/frame/frame-concrete-panel.js:212— frame-concrete-panel.concretePanel.seismicBlock has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 11 (26 pts), if/else 7 (9 pts), boolean chains 6, loops 1 (nesting depth added 17). Of this number, 19 points are the body's own statements and 23 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.
supply.check (cognitive 42) app/lib-supply/supply.js:173— supply.check has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 9 (23 pts), boolean chains 12, if/else 3 (6 pts), loops 1 (nesting depth added 17). Of this number, 38 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loose.readRebar (cognitive 42) app/rc/loose.js:88— loose.readRebar has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 10, loops 4 (7 pts), ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Model.readProp (cognitive 42) app/ids/access.js:227— Model.readProp has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 12 (32 pts), if/else 3 (5 pts), boolean chains 4, match/switch 1 (nesting depth added 22). Of this number, 36 points are the body's own statements and 6 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.
teamwork.createTeamwork (cognitive 42) devshell/site/assets/js/teamwork.js:46— teamwork.createTeamwork has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 55, error handling 3 (4 pts), ternaries 3 (4 pts), if/else 3, loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (teamwork.createTeamwork::call) 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.
LiveStore.define (cognitive 42) devshell/site/assets/js/engines/live/store.js:20— LiveStore.define has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 6 (12 pts), boolean chains 10, loops 2 (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.
tagmap.check (cognitive 42) devshell/site/assets/js/engines/live/tagmap.js:51— tagmap.check has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 9, ternaries 3 (8 pts), loops 3 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reverse (cognitive 42) REDACTED:918— reverse has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 5 (11 pts), boolean chains 9, loops 3, error handling 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.
checkEN (cognitive 42) app/frame/frame-design.js:162— checkEN has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 11 (18 pts), if/else 10 (17 pts), boolean chains 6, loops 1 (nesting depth added 14). Of this number, 27 points are the body's own statements and 15 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.
frame-concrete.cleanConcrete (cognitive 41) app/frame/frame-concrete.js:56— frame-concrete.cleanConcrete has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 6 (11 pts), boolean chains 10, loops 3 (5 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.
plate-draw.plateGeometry (cognitive 41) app/frame/plate-draw.js:19— plate-draw.plateGeometry has cognitive complexity 41 (threshold 15). Drivers by points: loops 9 (15 pts), if/else 6 (14 pts), ternaries 5 (7 pts), boolean chains 5 (nesting depth added 16). Of this number, 32 points are the body's own statements and 9 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.
frame-fem.modalOfFrame (cognitive 41) app/fem/frame-fem.js:24— frame-fem.modalOfFrame has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 8 (12 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 14). Of this number, 36 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
values.matchValue (cognitive 41) app/ids/values.js:72— values.matchValue has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 10, ternaries 1 (2 pts) (nesting depth added 12). Of this number, 39 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.
workspace-detailcraft.mountDetailcraftWorkspace (cognitive 41) app/workspace-detailcraft.js:48— workspace-detailcraft.mountDetailcraftWorkspace has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 10, ternaries 6 (10 pts) (nesting depth added 9). Of this number, 24 points are the body's own statements and 17 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.
totals.createTotals.compute (cognitive 41) devshell/site/assets/js/totals.js:54— totals.createTotals.compute has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 5 (11 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-totals.boot (cognitive 41) devshell/site/assets/js/app-totals.js:29— app-totals.boot has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 16, ternaries 5 (6 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 41 points are its own statements and the rest belongs to 6 function items inside it that branch (ensureHost, a function literal at line 63, why, …). 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.
resources.level (cognitive 41) devshell/site/assets/js/engines/schedule/resources.js:21— resources.level has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 6 (13 pts), boolean chains 8 (nesting depth added 18). Of this number, 39 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
message (cognitive 41) REDACTED:560— message has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 16, loops 8 (16 pts), if/else 2 (6 pts), ternaries 1 (2 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.
linalg.ic0 (cognitive 40) app/fem/linalg.js:68— linalg.ic0 has cognitive complexity 40 (threshold 15). Drivers by points: loops 11 (25 pts), if/else 5 (13 pts), boolean chains 2 (nesting depth added 22). 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.
model.elements (cognitive 40) app/fem/model.js:79— model.elements has cognitive complexity 40 (threshold 15). Drivers by points: loops 10 (20 pts), ternaries 5 (12 pts), boolean chains 6, if/else 1 (2 pts) (nesting depth added 18). Of this number, 19 points are the body's own statements and 21 belong to 8 function items inside it that branch. To reduce it, 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.
check.checkIds (cognitive 40) app/ids/check.js:192— check.checkIds has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (20 pts), boolean chains 7, loops 3 (7 pts), ternaries 3 (6 pts) (nesting depth added 21). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValueReader.array (cognitive 40) app/usd/usdc-read.js:359— ValueReader.array has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 4 (10 pts), boolean chains 7, ternaries 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geom.meshOf (cognitive 40) app/usd/geom.js:184— geom.meshOf has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 7, loops 4 (6 pts), ternaries 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Styles.materialColor (cognitive 40) app/ifc/geo-style.js:87— Styles.materialColor has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 3 (9 pts), boolean chains 4 (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.
live.stateCore.applyOne (cognitive 40) app/live.js:116— live.stateCore.applyOne has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (3 pts), match/switch 1 (nesting depth added 18). 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.
sw.self.addEventListener("message") (cognitive 40) devshell/edition/sw.js:73— sw.self.addEventListener("message") has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (8 pts), boolean chains 7, error handling 3 (6 pts), ternaries 3 (4 pts) (nesting depth added 15). Most of this is not in the body itself: 9 of the 40 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 109, a function literal at line 81, reply, …). 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.
app-panels.onDragMove (cognitive 40) devshell/site/assets/js/app-panels.js:1248— app-panels.onDragMove has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (28 pts), ternaries 5 (8 pts), boolean chains 4 (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.
loops.prepare (cognitive 40) devshell/site/assets/js/engines/motion/loops.js:31— loops.prepare has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 13, ternaries 4, loops 1 (nesting depth added 5). Most of this is not in the body itself: 15 of the 40 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 52, a function literal at line 44, has). 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.
clash.clashCheck (cognitive 39) app/clash.js:221— clash.clashCheck has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 9, loops 3 (6 pts), ternaries 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-model.cleanLoad (cognitive 39) app/frame/frame-model.js:198— frame-model.cleanLoad has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 12, ternaries 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.
xsd-regex.xsdRegExp::charClass (cognitive 39) REDACTED:110— xsd-regex.xsdRegExp::charClass has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (xsd-regex.xsdRegExp) 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.
dwgout.sheetDxf (cognitive 39) app/dwgout.js:105— dwgout.sheetDxf has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 5 (13 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 20). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
objects-write.ENC.SPLINE (cognitive 39) app/dwg/objects-write.js:772— objects-write.ENC.SPLINE has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (20 pts), boolean chains 9, if/else 5 (6 pts), loops 2 (4 pts) (nesting depth added 14). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geo-nurbs.recoverEdges (cognitive 39) app/ifc/geo-nurbs.js:683— geo-nurbs.recoverEdges has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 6 (10 pts), boolean chains 8 (nesting depth added 17). Of this number, 33 points are the body's own statements and 6 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.
ifc.writeIfcElement (cognitive 39) app/usd/ifc.js:78— ifc.writeIfcElement has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 5 (12 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 16). Of this number, 36 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.
logEdit (cognitive 39) REDACTED:758— logEdit has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (11 pts), ternaries 7 (10 pts), loops 3 (4 pts), other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cleanLoad (cognitive 39) app/frame/frame-panel.js:118— cleanLoad has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 6 (12 pts), boolean chains 11 (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.
entityCommon (cognitive 39) app/dwg/objects-write.js:180— entityCommon has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11, other 11, boolean chains 8, ternaries 5 (8 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
regs.strictest (cognitive 38) app/addons/regs/lib/regs.js:263— regs.strictest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 2 (10 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 18). Of this number, 36 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rebar.footingBars (cognitive 38) app/rebar.js:188— rebar.footingBars has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 10 (25 pts), loops 3 (6 pts), if/else 2 (5 pts), boolean chains 2 (nesting depth added 21). Of this number, 30 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.
host.makeLive.run (cognitive 38) REDACTED:1970— host.makeLive.run has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 19, ternaries 9 (11 pts), if/else 7 (8 pts) (nesting depth added 3). Of this number, 29 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ChunkHistory.sync (cognitive 38) app/history/history.js:128— ChunkHistory.sync has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (10 pts), boolean chains 6, ternaries 2 (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.
usd-detailcraft.steelUsd (cognitive 38) app/usd-detailcraft.js:22— usd-detailcraft.steelUsd has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 10, ternaries 3 (6 pts), loops 3 (4 pts) (nesting depth added 14). Of this number, 36 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
r2007-write.decompressR2007ForTest (cognitive 38) app/dwg/r2007-write.js:195— r2007-write.decompressR2007ForTest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 7 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 17). Of this number, 22 points are the body's own statements and 16 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.
geo-curve.trimmedCurve (cognitive 38) app/ifc/geo-curve.js:166— geo-curve.trimmedCurve has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 7 (12 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 11). Of this number, 17 points are the body's own statements and 21 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.
Antenna._matrix (cognitive 38) devshell/site/assets/js/engines/em/wire.js:113— Antenna._matrix has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 3 (18 pts), loops 6 (16 pts), if/else 3 (4 pts) (nesting depth added 26). Of this number, 37 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mountRecent (cognitive 38) REDACTED:1860— mountRecent has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (11 pts), ternaries 4 (9 pts), loops 3, error handling 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 4 of the 38 points are its own statements and the rest belongs to 7 function items inside it that branch (render, el, a function literal at line 1887, …). 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.
framePanel.resultsBlock (cognitive 38) app/frame/frame-panel.js:662— framePanel.resultsBlock has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 15 (20 pts), boolean chains 8, if/else 8, loops 1, other 1 (nesting depth added 5). Of this number, 27 points are the body's own statements and 11 belong to 18 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.
writeValue (cognitive 38) app/dwg/table-write.js:85— writeValue has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (11 pts), boolean chains 6, ternaries 2 (5 pts), other 3, 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.
beamResponse (cognitive 38) app/fem/frame-push.js:135— beamResponse has cognitive complexity 38 (threshold 15). Drivers by points: loops 16 (44 pts), if/else 10 (20 pts), ternaries 3 (12 pts), boolean chains 6 (nesting depth added 47). 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.
AddonLoader.row (cognitive 37) REDACTED:673— AddonLoader.row has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 11 (23 pts), boolean chains 8, if/else 2 (4 pts), loops 2 (nesting depth added 14). Of this number, 25 points are the body's own statements and 12 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.
sections.cleanConventions (cognitive 37) app/addons/regs/lib/sections.js:177— sections.cleanConventions has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 10, ternaries 3 (5 pts) (nesting depth added 5). Most of this is not in the body itself: 10 of the 37 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 181, 196, 190). 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.
frame-push.pushoverOfFrame.newton (cognitive 37) app/fem/frame-push.js:275— frame-push.pushoverOfFrame.newton has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 6 (12 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 19). Of this number, 33 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
read.readManifest (cognitive 37) app/bundle/read.js:173— read.readManifest has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 14, loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 7). Of this number, 35 points are the body's own statements and 2 belong to 20 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.
transform.transformRefs (cognitive 37) app/transform.js:131— transform.transformRefs has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 7, loops 5 (7 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.
session.idsSession (cognitive 37) app/ids/session.js:25— session.idsSession has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 9 (17 pts), boolean chains 14, if/else 4, error handling 2 (nesting depth added 8). Of this number, 22 points are the body's own statements and 15 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.
drawings.drawPrims (cognitive 37) app/drawings.js:370— drawings.drawPrims has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (11 pts), ternaries 5 (9 pts), boolean chains 3 (nesting depth added 16). Of this number, 29 points are the body's own statements and 8 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.
lz4.lz4Decompress (cognitive 37) app/usd/lz4.js:16— lz4.lz4Decompress has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 4 (10 pts), boolean chains 2 (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.
IfcAPI.fromApi (cognitive 37) app/ifc/api.js:232— IfcAPI.fromApi has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 18 (21 pts), boolean chains 16 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-input.readState (cognitive 37) devshell/site/assets/js/app-input.js:533— app-input.readState has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 11, loops 3 (6 pts), error handling 1 (nesting depth added 9). Of this number, 35 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.
app-panels.visibility (cognitive 37) devshell/site/assets/js/app-panels.js:1055— app-panels.visibility has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 7 (14 pts), boolean chains 8 (nesting depth added 10). Most of this is not in the body itself: 2 of the 37 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1059, 1105). 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.
app-workspace-arrange.arrangeDialog.build (cognitive 37) devshell/site/assets/js/app-workspace-arrange.js:45— app-workspace-arrange.arrangeDialog.build has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (15 pts), ternaries 5 (13 pts), boolean chains 9 (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.
ladder.ladderToST (cognitive 37) devshell/site/assets/js/engines/plc/ladder.js:68— ladder.ladderToST has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 5 (10 pts), boolean chains 5, loops 2 (nesting depth added 10). None of this is in the body itself: all 37 points belong to 3 function literals inside it that branch (lines 73, 70, 86). 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.
makeLive.run (cognitive 37) REDACTED:1970— makeLive.run has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 19, ternaries 10, if/else 7 (8 pts) (nesting depth added 1). Of this number, 29 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TABLESTYLE (cognitive 37) app/dwg/table-write.js:197— TABLESTYLE has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 10, other 6, loops 3 (5 pts), if/else 3 (4 pts) (nesting depth added 7). Of this number, 34 points are the body's own statements and 3 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.
checkENHollow (cognitive 37) app/frame/frame-design.js:258— checkENHollow has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 8 (13 pts), boolean chains 6, loops 1 (nesting depth added 12). Of this number, 22 points are the body's own statements and 15 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.
transform.transformMember (cognitive 36) app/transform.js:75— transform.transformMember has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 6 (16 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Model.unitFactor (cognitive 36) app/ids/access.js:295— Model.unitFactor has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 8 (12 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lasso-core.lassoSelect (cognitive 36) app/lasso-core.js:58— lasso-core.lassoSelect has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 11, loops 3, 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.
passthrough.rawEntityCommon (cognitive 36) app/dwg/passthrough.js:142— passthrough.rawEntityCommon has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 10, ternaries 5 (7 pts), loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
live.createLive (cognitive 36) app/live.js:214— live.createLive has cognitive complexity 36 (threshold 15). Drivers by points: if/else 30 (39 pts), boolean chains 38, loops 11 (21 pts), ternaries 8 (14 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 (live.createLive::item) 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.
ai-activity.createActivityLog::normalise (cognitive 36) devshell/site/assets/js/ai-activity.js:95— ai-activity.createActivityLog::normalise has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 21 (24 pts), boolean chains 11, if/else 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (ai-activity.createActivityLog) 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.
app-settings.form.addEventListener("change") (cognitive 36) devshell/site/assets/js/app-settings.js:1387— app-settings.form.addEventListener("change") has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (24 pts), ternaries 3 (7 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
app-state.parse (cognitive 36) devshell/site/assets/js/app-state.js:63— app-state.parse has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 10, ternaries 3 (4 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 3 of the 36 points are its own statements and the rest belongs to 9 function items inside it that branch (value, cmp, a function literal at line 83, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
rng.distProblem (cognitive 36) devshell/site/assets/js/engines/des/rng.js:24— rng.distProblem has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 10 (20 pts), boolean chains 12, if/else 3, match/switch 1 (nesting depth added 10). Of this number, 34 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.primary (cognitive 36) devshell/site/assets/js/engines/plc/st.js:215— Parser.primary has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 2 (6 pts), boolean chains 5, ternaries 2 (4 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.
eedBytes (cognitive 36) app/dwg/objects-write.js:144— eedBytes has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 4 (12 pts), loops 3 (8 pts), boolean chains 7, if/else 2 (4 pts), other 3, 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.
profiles.cleanCustom (cognitive 35) app/profiles.js:87— profiles.cleanCustom has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 15, 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.
breakit.routes (cognitive 35) app/study/breakit.js:62— breakit.routes has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 9, loops 4 (5 pts), ternaries 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.
supply.parseCsv (cognitive 35) app/lib-supply/supply.js:27— supply.parseCsv has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 8, ternaries 2 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
supply.readSupplyCsv (cognitive 35) app/lib-supply/supply.js:80— supply.readSupplyCsv has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 10, ternaries 4 (7 pts), loops 2 (nesting depth added 8). Of this number, 28 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.
live-presence.attachPresence::frame (cognitive 35) app/live-presence.js:247— live-presence.attachPresence::frame has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 9, loops 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live.stateCore.invert (cognitive 35) app/live.js:147— live.stateCore.invert has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 2 (8 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 17). Of this number, 34 points are the body's own statements and 1 belongs 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.
ai-principles.walk (cognitive 35) devshell/site/assets/js/ai-principles.js:74— ai-principles.walk has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 5 (12 pts), error handling 1 (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.
app-calc.boot::render (cognitive 35) devshell/site/assets/js/app-calc.js:74— app-calc.boot::render has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 10 (15 pts), if/else 8, loops 3 (7 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
app-pen.classifyStroke (cognitive 35) devshell/site/assets/js/app-pen.js:97— app-pen.classifyStroke has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 7, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-shell.setup (cognitive 35) devshell/site/assets/js/app-shell.js:350— app-shell.setup has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 13, if/else 12 (13 pts), ternaries 5 (7 pts), error handling 2 (nesting depth added 3). Most of this is not in the body itself: 9 of the 35 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 383, a function literal at line 358, end, …). 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.
cost.earnedValue (cognitive 35) devshell/site/assets/js/engines/schedule/cost.js:29— cost.earnedValue has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 9 (12 pts), boolean chains 6, 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.
makeAssistantFiles.list::walk (cognitive 35) REDACTED:1337— makeAssistantFiles.list::walk has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 2 (6 pts), boolean chains 5, error handling 2 (4 pts), loops 1, other 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createControlRelay (cognitive 35) REDACTED:1637— createControlRelay has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 15, ternaries 8, if/else 7, error handling 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 5 of the 35 points are its own statements and the rest belongs to 22 function items inside it that branch (a function literal at line 1644, a function literal at line 1651, a function literal at line 1662, …). 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.
makeSet (cognitive 35) app/drawings.js:1029— makeSet has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (10 pts), ternaries 9, loops 5 (nesting depth added 4). Most of this is not in the body itself: 13 of the 35 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1041, 1032, 1032, …). 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.
recoverDialog (cognitive 35) app/app-autosave.js:547— recoverDialog has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 9, error handling 3 (6 pts), loops 5, ternaries 1 (3 pts) (nesting depth added 10). Most of this is not in the body itself: 6 of the 35 points are its own statements and the rest belongs to 13 function items inside it that branch (el, a function literal at line 571, a function literal at line 596, …). 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.
connections.findSplices (cognitive 34) app/connections.js:176— connections.findSplices has cognitive complexity 34 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 6 (10 pts), ternaries 2 (8 pts), boolean chains 3 (nesting depth added 19). Of this number, 25 points are the body's own statements and 9 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.
frame-design.cleanDesign (cognitive 34) app/frame/frame-design.js:44— frame-design.cleanDesign has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 8, ternaries 5, loops 1 (2 pts) (nesting depth added 13). Of this number, 32 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.
model.modal (cognitive 34) app/fem/model.js:228— model.modal has cognitive complexity 34 (threshold 15). Drivers by points: loops 11 (29 pts), boolean chains 3, if/else 1 (2 pts) (nesting depth added 19). Of this number, 33 points are the body's own statements and 1 belongs to 2 function literals 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.
chunks.serializeKeys (cognitive 34) app/history/chunks.js:76— chunks.serializeKeys has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 8 (21 pts), if/else 5 (7 pts), boolean chains 5, loops 1 (nesting depth added 15). Of this number, 31 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.
usdz.readUsdz (cognitive 34) app/usd/usdz.js:20— usdz.readUsdz has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 5, loops 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.
mitre-ui.mountMitre.openMitre (cognitive 34) app/mitre-ui.js:17— mitre-ui.mountMitre.openMitre has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts), ternaries 6 (8 pts), loops 5 (6 pts) (nesting depth added 5). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 8 function items inside it that branch (update, a function literal at line 81, a function literal at line 27, …). 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.
surface-write.surfaceWriter.finish (cognitive 34) app/dwg/surface-write.js:146— surface-write.surfaceWriter.finish has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 4 (9 pts), boolean chains 6, loops 2 (nesting depth added 15). Of this number, 28 points are the body's own statements and 6 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.
geo-nurbs.edgeLoopRuns (cognitive 34) app/ifc/geo-nurbs.js:52— geo-nurbs.edgeLoopRuns has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 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.
geo-brep.faceSet (cognitive 34) app/ifc/geo-brep.js:96— geo-brep.faceSet has cognitive complexity 34 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 4 (10 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 14). Of this number, 29 points are the body's own statements and 5 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.
ifc43.read43::quantitiesOf (cognitive 34) app/ifc/ifc43.js:154— ifc43.read43::quantitiesOf has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 4 (18 pts), if/else 3 (8 pts), boolean chains 5, loops 2 (3 pts) (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.
ai-principles.figuresIn (cognitive 34) devshell/site/assets/js/ai-principles.js:38— ai-principles.figuresIn has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 5, ternaries 2 (5 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
docinfo.createDocInfo (cognitive 34) devshell/site/assets/js/docinfo.js:39— docinfo.createDocInfo has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 6, ternaries 5 (6 pts), loops 3, error handling 1 (2 pts) (nesting depth added 6). Of this number, 30 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
checks.check (cognitive 34) devshell/site/assets/js/engines/trace/checks.js:49— checks.check has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 7 (9 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 13). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partGeometry (cognitive 34) app/view3d.js:916— partGeometry has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 6 (12 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 17). Of this number, 24 points are the body's own statements and 10 belong to 8 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check.boltDistances (cognitive 33) app/addons/regs/lib/check.js:22— check.boltDistances has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 10, ternaries 2 (4 pts) (nesting depth added 8). Of this number, 32 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.
pdf.contentStream (cognitive 33) app/pdf.js:43— pdf.contentStream has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 6 (9 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 17). Of this number, 30 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.
erection.plan (cognitive 33) app/erection.js:161— erection.plan has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (18 pts), boolean chains 8, if/else 3 (5 pts), loops 2 (nesting depth added 14). Of this number, 27 points are the body's own statements and 6 belong to 5 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.
host.makeControl (cognitive 33) REDACTED:1075— host.makeControl has cognitive complexity 33 (threshold 15). Drivers by points: if/else 45 (54 pts), boolean chains 42, ternaries 13 (14 pts), error handling 7 (9 pts), loops 4 (5 pts) (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
clipboard.pasteInto (cognitive 33) app/clipboard.js:88— clipboard.pasteInto has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 4 (14 pts), loops 7 (9 pts), if/else 4 (6 pts), boolean chains 4 (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.
ids.readParam (cognitive 33) app/ids/ids.js:45— ids.readParam has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, error handling 1 (4 pts), loops 2 (3 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.
ids.readIds (cognitive 33) app/ids/ids.js:121— ids.readIds has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (13 pts), boolean chains 12, if/else 4 (5 pts), loops 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.untyped (cognitive 33) app/usd/usda-read.js:548— Parser.untyped has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 2 (4 pts), boolean chains 3, 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.
dwgout.sheetModel (cognitive 33) app/dwgout.js:52— dwgout.sheetModel has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 5 (12 pts), boolean chains 3, loops 1 (nesting depth added 16). 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.
table-read.readTableContent (cognitive 33) app/dwg/table-read.js:116— table-read.readTableContent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 7 (13 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.
step.unescapeStep (cognitive 33) app/ifc/step.js:333— step.unescapeStep has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (6 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geo-bool.clipPlane (cognitive 33) app/ifc/geo-bool.js:165— geo-bool.clipPlane has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 5 (8 pts), boolean chains 3 (nesting depth added 13). Of this number, 29 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.
calc.tokenize (cognitive 33) devshell/site/assets/js/calc.js:73— calc.tokenize has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 2 (4 pts), ternaries 1 (3 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.
app-dock.dockManager.head (cognitive 33) devshell/site/assets/js/app-dock.js:80— app-dock.dockManager.head has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (17 pts), if/else 10 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 14). Of this number, 18 points are the body's own statements and 15 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.
report.familyOf (cognitive 33) devshell/site/assets/js/compute/report.js:22— report.familyOf has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (21 pts), if/else 8 (9 pts), boolean chains 3 (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.
app-propgrid.create.build (cognitive 33) devshell/site/assets/js/app-propgrid.js:247— app-propgrid.create.build has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 9, ternaries 4 (6 pts) (nesting depth added 5). Most of this is not in the body itself: 12 of the 33 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 284, a function literal at line 276, a function literal at line 275, …). 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.
gerber.readDrill (cognitive 33) devshell/site/assets/js/engines/pcb/gerber.js:192— gerber.readDrill has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nets.buildNets (cognitive 33) devshell/site/assets/js/engines/schematic/nets.js:15— nets.buildNets has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 9 (11 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 11). 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.
BLOCK_HEADER (cognitive 33) app/dwg/objects-write.js:252— BLOCK_HEADER has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 8, if/else 6 (7 pts), loops 4 (6 pts), other 1 (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.
beamResponse::out (cognitive 33) app/fem/frame-push.js:148— beamResponse::out has cognitive complexity 33 (threshold 15). Drivers by points: loops 7 (21 pts), if/else 3 (8 pts), ternaries 1 (4 pts) (nesting depth added 22). 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.
pushoverOfFrame::newton (cognitive 33) app/fem/frame-push.js:275— pushoverOfFrame::newton has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 6 (12 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.
getClassifications (cognitive 33) app/ifc/api.js:418— getClassifications has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (11 pts), boolean chains 6, ternaries 2, other 1 (nesting depth added 15). Of this number, 29 points are the body's own statements and 4 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.
toApi (cognitive 33) app/ifc/api.js:502— toApi has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 5 (12 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
linalg.jacobiEig (cognitive 32) app/fem/linalg.js:144— linalg.jacobiEig has cognitive complexity 32 (threshold 15). Drivers by points: loops 9 (24 pts), if/else 2 (6 pts), boolean chains 2 (nesting depth added 19). 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.
dyn-core.parseGroundMotion (cognitive 32) app/fem/dyn-core.js:105— dyn-core.parseGroundMotion has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 4, loops 2 (3 pts), 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.
history.changesSince (cognitive 32) REDACTED:203— history.changesSince has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6, loops 6, ternaries 2 (3 pts) (nesting depth added 9). Of this number, 20 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.
intcode.encodeInts (cognitive 32) app/usd/intcode.js:78— intcode.encodeInts has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 7, ternaries 4, loops 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
api.typedApi::unwrap (cognitive 32) app/ifc/api.js:534— api.typedApi::unwrap has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 5 (17 pts), if/else 6 (8 pts), boolean chains 7 (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.
live.stateCore.diff (cognitive 32) app/live.js:58— live.stateCore.diff has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 3 (6 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 14). Of this number, 30 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.
calc.calcTools (cognitive 32) devshell/site/assets/js/calc.js:615— calc.calcTools has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 16, ternaries 8, if/else 6 (7 pts), error handling 1 (nesting depth added 1). None of this is in the body itself: all 32 points belong to 10 function items inside it that branch (a function literal at line 650, a function literal at line 644, a function literal at line 632, …). 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.
app-lessons.boot (cognitive 32) devshell/site/assets/js/app-lessons.js:27— app-lessons.boot has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 10 (11 pts), boolean chains 3, loops 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 7 function items inside it that branch (render, a function literal at line 62, a function literal at line 35, …). 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.
app-panels.makeHandle (cognitive 32) devshell/site/assets/js/app-panels.js:589— app-panels.makeHandle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 7, ternaries 4 (5 pts) (nesting depth added 3). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 637, a function literal at line 611, a function literal at line 604, …). 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.
runtime.analyze (cognitive 32) devshell/site/assets/js/engines/plc/runtime.js:35— runtime.analyze has cognitive complexity 32 (threshold 15). Drivers by points: if/else 62 (193 pts), boolean chains 40, loops 9 (27 pts), ternaries 6 (23 pts), match/switch 2 (5 pts) (nesting depth added 169). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (runtime.analyze::ty, runtime.analyze::walk) 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.
LWPOLYLINE (cognitive 32) app/dwg/objects-write.js:746— LWPOLYLINE has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 13, if/else 10, loops 4 (7 pts), boolean chains 2 (nesting depth added 3). Of this number, 31 points are the body's own statements and 1 belongs to 5 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mountUi::render (cognitive 32) app/live-classroom.js:776— mountUi::render has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 8 (11 pts), boolean chains 8, 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.
cellStyleFor (cognitive 32) app/dwg/table-write.js:373— cellStyleFor has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 8, ternaries 3 (4 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.
slab-design.slabDesign (cognitive 31) app/frame/slab-design.js:50— slab-design.slabDesign has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 5 (9 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 11). Of this number, 21 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
schedule.rcSchedule (cognitive 31) app/rc/schedule.js:19— schedule.rcSchedule has cognitive complexity 31 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (9 pts), ternaries 2 (7 pts), boolean chains 5 (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.
foundation-ui.mountFoundation.problems (cognitive 31) app/foundation-ui.js:47— foundation-ui.mountFoundation.problems has cognitive complexity 31 (threshold 15). Drivers by points: loops 8 (13 pts), if/else 4 (8 pts), ternaries 3 (7 pts), boolean chains 3 (nesting depth added 13). Of this number, 28 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.
usda-write.propText (cognitive 31) app/usd/usda-write.js:92— usda-write.propText has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 6 (9 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). Of this number, 19 points are the body's own statements and 12 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.
objects-read.readEED (cognitive 31) app/dwg/objects-read.js:143— objects-read.readEED has cognitive complexity 31 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 4 (9 pts), ternaries 1 (4 pts), match/switch 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geo-curve.sampleBSpline (cognitive 31) app/ifc/geo-curve.js:219— geo-curve.sampleBSpline has cognitive complexity 31 (threshold 15). Drivers by points: loops 9 (14 pts), if/else 6 (10 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 11). Of this number, 18 points are the body's own statements and 13 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.
app-fields.boot (cognitive 31) devshell/site/assets/js/app-fields.js:23— app-fields.boot has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11, ternaries 7 (10 pts), boolean chains 8, error handling 1 (2 pts) (nesting depth added 4). None of this is in the body itself: all 31 points belong to 16 function items inside it that branch (render, listAll, a function literal at line 106, …). 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.
app-input.conflicts (cognitive 31) devshell/site/assets/js/app-input.js:192— app-input.conflicts has cognitive complexity 31 (threshold 15). Drivers by points: loops 8 (12 pts), if/else 6 (11 pts), boolean chains 8 (nesting depth added 9). Of this number, 29 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lessons.cleanLesson (cognitive 31) devshell/site/assets/js/lessons.js:27— lessons.cleanLesson has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 7 (15 pts), boolean chains 8, if/else 5 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
linalg.cgSolve (cognitive 31) devshell/site/assets/js/engines/em/linalg.js:49— linalg.cgSolve has cognitive complexity 31 (threshold 15). Drivers by points: loops 14 (22 pts), if/else 3 (7 pts), boolean chains 1, ternaries 1 (nesting depth added 12). Of this number, 28 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
circuit.waveAt (cognitive 31) devshell/site/assets/js/engines/em/circuit.js:22— circuit.waveAt has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 12, ternaries 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.
matrix.checkMatrix (cognitive 31) devshell/site/assets/js/engines/risk/matrix.js:11— matrix.checkMatrix has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (10 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.
turnaround.turnaround (cognitive 31) devshell/site/assets/js/engines/schedule/turnaround.js:11— turnaround.turnaround has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 10 (27 pts), if/else 2 (3 pts), loops 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.
PlantGraph.fromJSON (cognitive 31) REDACTED:155— PlantGraph.fromJSON has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 5 (8 pts), boolean chains 5, loops 3, error handling 1 (2 pts) (nesting depth added 11). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pressureField (cognitive 31) app/foundation.js:60— pressureField has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 6 (13 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 14). Most of this is not in the body itself: 15 of the 31 points are its own statements and the rest belongs to 11 function items inside it that branch (F, make, a function literal at line 88, …). 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.
bsplineSurface.inv (cognitive 31) app/ifc/geo-nurbs.js:283— bsplineSurface.inv has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 4 (8 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
connections.findJoints (cognitive 30) app/connections.js:204— connections.findJoints has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 3 (10 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 19). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
connections.buildShearTab (cognitive 30) app/connections.js:363— connections.buildShearTab has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14, boolean chains 8, ternaries 5, loops 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
nest.nestBars (cognitive 30) app/nest.js:29— nest.nestBars has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 5 (8 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 13). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-concrete.rayleighPeriods (cognitive 30) app/frame/frame-concrete.js:169— frame-concrete.rayleighPeriods has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 8, loops 5 (8 pts), 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.
frame-dynamics-panel.dynamicsPanel.pushBlock (cognitive 30) app/frame/frame-dynamics-panel.js:294— frame-dynamics-panel.dynamicsPanel.pushBlock has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (7 pts), boolean chains 4 (nesting depth added 13). Of this number, 24 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-panel.framePanel.resultsBlock (cognitive 30) app/frame/frame-panel.js:662— frame-panel.framePanel.resultsBlock has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 8, if/else 8, loops 1 (nesting depth added 3). Of this number, 20 points are the body's own statements and 10 belong to 5 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.
plate-bim.addPlates (cognitive 30) app/frame/plate-bim.js:19— plate-bim.addPlates has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 16, if/else 5 (6 pts), loops 4, ternaries 2 (3 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 10 of the 30 points are its own statements and the rest belongs to 5 function items inside it that branch (take, a function literal at line 37, a function literal at line 50, …). 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.
stair.stairGeometry (cognitive 30) app/stair.js:54— stair.stairGeometry has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 6, loops 4 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundation-ui.mountFoundation.panel (cognitive 30) app/foundation-ui.js:119— foundation-ui.mountFoundation.panel has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (nesting depth added 11). Most of this is not in the body itself: 14 of the 30 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 161, a function literal at line 163, a function literal at line 169, …). 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.
ValueReader.decode (cognitive 30) app/usd/usdc-read.js:195— ValueReader.decode has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
scene.sceneOf::build (cognitive 30) app/usd/scene.js:41— scene.sceneOf::build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 6, 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.
objects-read.annotContext (cognitive 30) app/dwg/objects-read.js:1349— objects-read.annotContext has cognitive complexity 30 (threshold 15). Drivers by points: loops 7 (17 pts), if/else 7 (13 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.
app-access.spokenNumber (cognitive 30) REDACTED:104— app-access.spokenNumber has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AddonsAccount.#installSet (cognitive 30) devshell/site/assets/js/app-addons-account.js:494— AddonsAccount.#installSet has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (6 pts), error handling 3 (5 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-dock.dockManager.decorate (cognitive 30) devshell/site/assets/js/app-dock.js:130— app-dock.dockManager.decorate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (22 pts), ternaries 2 (5 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.
app-engines.boot (cognitive 30) devshell/site/assets/js/app-engines.js:26— app-engines.boot has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 12, if/else 9, ternaries 5 (6 pts), error handling 3 (nesting depth added 1). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 11 function items inside it that branch (render, sendProblems, tableEl, …). 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.
probe.tierOf (cognitive 30) devshell/site/assets/js/compute/probe.js:134— probe.tierOf has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 9, ternaries 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.
app-settings.load (cognitive 30) devshell/site/assets/js/app-settings.js:76— app-settings.load has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 11, error handling 1 (nesting depth added 1). 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, 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.
app-settings.ctxItems (cognitive 30) devshell/site/assets/js/app-settings.js:1498— app-settings.ctxItems has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 9 (19 pts), if/else 6 (7 pts), boolean chains 4 (nesting depth added 11). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fields.fem2d (cognitive 30) devshell/site/assets/js/engines/em/fields.js:87— fields.fem2d has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 7 (10 pts), ternaries 3, boolean chains 1 (nesting depth added 10). Of this number, 18 points are the body's own statements and 12 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.
board.fromNetlist (cognitive 30) devshell/site/assets/js/engines/pcb/board.js:98— board.fromNetlist has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 5 (7 pts), boolean chains 3 (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.
framePanel.runBreak (cognitive 30) app/frame/frame-panel.js:489— framePanel.runBreak has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (7 pts), boolean chains 5, loops 2 (4 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
subdivide (cognitive 30) app/frame/frame-solve.js:473— subdivide has cognitive complexity 30 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (8 pts), ternaries 3 (8 pts), other 5 (nesting depth added 13). Most of this is not in the body itself: 11 of the 30 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 491, (anonymous)::wAt, a function literal at line 474, …). 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.
dynamicsPanel.pushBlock (cognitive 30) app/frame/frame-dynamics-panel.js:294— dynamicsPanel.pushBlock has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (7 pts), boolean chains 4 (nesting depth added 13). Of this number, 24 points are the body's own statements and 6 belong to 27 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.
AddonLoader.externalFor (cognitive 29) REDACTED:504— AddonLoader.externalFor has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 10 (nesting depth added 11). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 506). 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.
frame-concrete.floorWeights (cognitive 29) app/frame/frame-concrete.js:201— frame-concrete.floorWeights has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 6 (9 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 11). Of this number, 27 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-panel.framePanel.runBreak (cognitive 29) app/frame/frame-panel.js:489— frame-panel.framePanel.runBreak has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (4 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
linalg.pcg (cognitive 29) app/fem/linalg.js:112— linalg.pcg has cognitive complexity 29 (threshold 15). Drivers by points: loops 9 (15 pts), if/else 7 (9 pts), boolean chains 4, ternaries 1 (nesting depth added 8). Of this number, 24 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
frame-dyn.combineArrays (cognitive 29) app/fem/frame-dyn.js:39— frame-dyn.combineArrays has cognitive complexity 29 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 3 (8 pts), ternaries 2 (7 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.
loose.readRebar.solidOf (cognitive 29) app/rc/loose.js:172— loose.readRebar.solidOf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Model.readPset (cognitive 29) app/ids/access.js:195— Model.readPset has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (6 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 12). Of this number, 24 points are the body's own statements and 5 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.
check.candidates (cognitive 29) app/ids/check.js:165— check.candidates has cognitive complexity 29 (threshold 15). Drivers by points: loops 7 (19 pts), if/else 9 (18 pts), boolean chains 8, ternaries 2 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (check.candidates::typed2x3) 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.
foundation-ui.mountFoundation.takeFromAnalysis (cognitive 29) app/foundation-ui.js:75— foundation-ui.mountFoundation.takeFromAnalysis has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 5 (10 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 14). Of this number, 24 points are the body's own statements and 5 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.
objects-read.commonEntityHandles (cognitive 29) app/dwg/objects-read.js:213— objects-read.commonEntityHandles has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
objects-write.xrecordBytes (cognitive 29) app/dwg/objects-write.js:470— objects-write.xrecordBytes has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 10, loops 3 (8 pts), if/else 3 (6 pts), ternaries 1 (3 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.
geo-solid.revolved (cognitive 29) app/ifc/geo-solid.js:69— geo-solid.revolved has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 4 (13 pts), loops 4 (10 pts), if/else 3 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ai-model-only.scrub::walk (cognitive 29) devshell/site/assets/js/ai-model-only.js:92— ai-model-only.scrub::walk has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 6, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AddonsAccount.deviceSignIn (cognitive 29) devshell/site/assets/js/app-addons-account.js:275— AddonsAccount.deviceSignIn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, ternaries 3 (7 pts), error handling 3 (4 pts), loops 1 (nesting depth added 9). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-block-ribbonx.enhance.decorate (cognitive 29) devshell/site/assets/js/app-block-ribbonx.js:39— app-block-ribbonx.enhance.decorate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 10 of the 29 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 43, 50, 72). 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.
app-settings.openCtx (cognitive 29) devshell/site/assets/js/app-settings.js:1525— app-settings.openCtx has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 8). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1539, 1532, 1549, …). 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.
app-workspace-vector.menubar.menuPanel (cognitive 29) devshell/site/assets/js/app-workspace-vector.js:173— app-workspace-vector.menubar.menuPanel has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, ternaries 2 (6 pts), loops 2 (4 pts) (nesting depth added 9). Of this number, 21 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
numeric.cinvert (cognitive 29) devshell/site/assets/js/engines/network/numeric.js:35— numeric.cinvert has cognitive complexity 29 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 4 (12 pts), boolean chains 1, ternaries 1 (nesting depth added 16). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
openFile (cognitive 29) REDACTED:438— openFile has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, error handling 2 (5 pts), loops 2 (3 pts), other 1 (nesting depth added 11). Of this number, 20 points are the body's own statements and 9 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.
localChange (cognitive 29) REDACTED:867— localChange has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (11 pts), error handling 2 (4 pts), ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
panelSvg (cognitive 29) app/framing.js:202— panelSvg has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 10, ternaries 4 (8 pts), if/else 5 (7 pts), loops 2 (3 pts), other 1 (nesting depth added 7). Of this number, 27 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
panelPage (cognitive 29) app/framing.js:340— panelPage has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (7 pts), loops 3 (5 pts), ternaries 2 (4 pts), other 2 (nesting depth added 6). Of this number, 25 points are the body's own statements and 4 belong to 11 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 29) REDACTED:236— (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: loops 8 (11 pts), if/else 4 (7 pts), ternaries 3 (6 pts), boolean chains 5 (nesting depth added 9). Of this number, 27 points are the body's own statements and 2 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
metaBlock (cognitive 29) app/usd/usda-read.js:203— metaBlock has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 1 (4 pts), boolean chains 3, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
property (cognitive 29) app/usd/usda-read.js:372— property has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 6, ternaries 1 (2 pts), loops 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.
clash.samples (cognitive 28) app/clash.js:164— clash.samples has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 8 (13 pts), boolean chains 1 (nesting depth added 15). Of this number, 27 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundation.cleanFoundation (cognitive 28) app/foundation.js:544— foundation.cleanFoundation has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 8, if/else 6 (8 pts), loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Writer.any (cognitive 28) REDACTED:76— Writer.any has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (7 pts), loops 4 (6 pts), boolean chains 4, 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.
host.makeAssistantFiles.list::walk (cognitive 28) REDACTED:1337— host.makeAssistantFiles.list::walk has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
host.getHost (cognitive 28) REDACTED:2057— host.getHost has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 3 (nesting depth added 14). Of this number, 15 points are the body's own statements and 13 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.
model.loadVector (cognitive 28) app/fem/model.js:178— model.loadVector has cognitive complexity 28 (threshold 15). Drivers by points: loops 9 (18 pts), boolean chains 6, if/else 2 (4 pts) (nesting depth added 11). Of this number, 22 points are the body's own statements and 6 belong to 4 function literals 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.
plan.expandBundles (cognitive 28) app/bundle/plan.js:45— plan.expandBundles has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (7 pts), ternaries 2 (7 pts), loops 3 (5 pts), error handling 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.
Model.ownClassifications (cognitive 28) app/ids/access.js:345— Model.ownClassifications has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 6 (9 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.
check.attributeMatch (cognitive 28) app/ids/check.js:49— check.attributeMatch has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 4 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 13). Of this number, 25 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.
stage.composeProp (cognitive 28) app/usd/stage.js:287— stage.composeProp has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (6 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 11). Of this number, 25 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
earcut.findHoleBridge (cognitive 28) app/usd/earcut.js:155— earcut.findHoleBridge has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 8, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mitre-preview.mitrePreview (cognitive 28) app/mitre-preview.js:33— mitre-preview.mitrePreview has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 6 (7 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 8). Of this number, 26 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solid-write.solidWriter.convert (cognitive 28) app/dwg/solid-write.js:137— solid-write.solidWriter.convert has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 11, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
drawings-ui.mountDrawings (cognitive 28) app/drawings-ui.js:17— drawings-ui.mountDrawings has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (17 pts), ternaries 5 (6 pts), boolean chains 5 (nesting depth added 2). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 65, 177, 37, …). 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.
geo-align.segmentedCurve (cognitive 28) app/ifc/geo-align.js:120— geo-align.segmentedCurve has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 1 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 13). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to one function item inside it that branches (zAt). 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.
AddonsAccount.gc (cognitive 28) devshell/site/assets/js/app-addons-account.js:593— AddonsAccount.gc has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 9, loops 6 (8 pts) (nesting depth added 7). Of this number, 27 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-tools-ui.makePanel (cognitive 28) devshell/site/assets/js/app-tools-ui.js:27— app-tools-ui.makePanel has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
app-input.placeOf (cognitive 28) devshell/site/assets/js/app-input.js:238— app-input.placeOf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 9, loops 3 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-panels.onDragEnd (cognitive 28) devshell/site/assets/js/app-panels.js:1292— app-panels.onDragEnd has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 4, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-workspace.mountWorkspaces (cognitive 28) devshell/site/assets/js/app-workspace.js:96— app-workspace.mountWorkspaces has cognitive complexity 28 (threshold 15). Drivers by points: if/else 294 (365 pts), boolean chains 233, ternaries 156 (214 pts), loops 54 (73 pts), error handling 7 (12 pts) (nesting depth added 153). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 7 other methods here (app-workspace.mountWorkspaces::edges, app-workspace.mountWorkspaces::mountPalettes, app-workspace.mountWorkspaces::refreshPalettes, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 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.
circuit.runDeck (cognitive 28) devshell/site/assets/js/engines/em/circuit.js:358— circuit.runDeck has cognitive complexity 28 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 6 (9 pts), ternaries 2 (7 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tagmap.parseCsv (cognitive 28) devshell/site/assets/js/engines/live/tagmap.js:95— tagmap.parseCsv has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (6 pts), boolean chains 3, 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.
math.singularValues (cognitive 28) devshell/site/assets/js/engines/motion/math.js:90— math.singularValues has cognitive complexity 28 (threshold 15). Drivers by points: loops 7 (19 pts), if/else 2 (6 pts), ternaries 2, boolean chains 1 (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.
number.numberWires (cognitive 28) devshell/site/assets/js/engines/schematic/number.js:13— number.numberWires has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 5 (9 pts), boolean chains 5 (nesting depth added 12). Of this number, 27 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.
PlantGraph.merge::pass (cognitive 28) REDACTED:133— PlantGraph.merge::pass has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 5, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stairSheet (cognitive 28) app/drawings.js:727— stairSheet has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 5 (8 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
welcome (cognitive 28) REDACTED:610— welcome has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (10 pts), loops 2, ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
LAYOUT (cognitive 28) app/dwg/objects-write.js:509— LAYOUT has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 9, if/else 6, other 6, ternaries 4, loops 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
applySelection (cognitive 28) app/view3d.js:519— applySelection has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 4 (11 pts), loops 5 (10 pts), if/else 3 (5 pts), boolean chains 2 (nesting depth added 14). Of this number, 27 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.
sections.build (cognitive 27) app/shapes/sections.js:2481— sections.build has cognitive complexity 27 (threshold 15). Drivers by points: loops 19 (22 pts), ternaries 2 (3 pts), boolean chains 1, if/else 1 (nesting depth added 4). Of this number, 22 points are the body's own statements and 5 belong to 3 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.
plate.transform (cognitive 27) app/frame/plate.js:204— plate.transform has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 1 (6 pts) (nesting depth added 20). 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.
frame-panel.partResults (cognitive 27) app/frame/frame-panel.js:142— frame-panel.partResults has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (10 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.
breakit.findingProblems (cognitive 27) app/study/breakit.js:143— breakit.findingProblems has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 11, ternaries 6 (8 pts), if/else 6 (7 pts), loops 1 (nesting depth added 3). None of this is in the body itself: all 27 points belong to one function literal inside it that branches (line 146). 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.
check.propertyMatch (cognitive 27) app/ids/check.js:126— check.propertyMatch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (5 pts), ternaries 2 (5 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.
scene.meshWithMaterials (cognitive 27) app/usd/scene.js:78— scene.meshWithMaterials has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (5 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 13). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
acds.readAcds (cognitive 27) app/dwg/acds.js:25— acds.readAcds has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, loops 5 (6 pts), error handling 1 (nesting depth added 5). Of this number, 23 points are the body's own statements and 4 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.
solid-read.decodeAcisEntity (cognitive 27) app/dwg/solid-read.js:83— solid-read.decodeAcisEntity has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 1 (3 pts), boolean chains 2, 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.
objects-read.mtextData (cognitive 27) app/dwg/objects-read.js:644— objects-read.mtextData has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (5 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.
objects-read.DECODERS.LTYPE (cognitive 27) app/dwg/objects-read.js:799— objects-read.DECODERS.LTYPE has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (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.
container-write.layoutR2004 (cognitive 27) app/dwg/container-write.js:268— container-write.layoutR2004 has cognitive complexity 27 (threshold 15). Drivers by points: loops 10 (15 pts), if/else 4 (7 pts), ternaries 3 (5 pts) (nesting depth added 10). Of this number, 25 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
geo-tri.clip (cognitive 27) app/ifc/geo-tri.js:124— geo-tri.clip has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 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.
GeoCtx.gridPlacement (cognitive 27) app/ifc/geo-ctx.js:211— GeoCtx.gridPlacement has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 12, loops 1, ternaries 1 (nesting depth added 1). Of this number, 22 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
geo-nurbs.bsplineSurface.inv (cognitive 27) app/ifc/geo-nurbs.js:283— geo-nurbs.bsplineSurface.inv has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
unit-settings.mountUnitSettings (cognitive 27) app/unit-settings.js:18— unit-settings.mountUnitSettings has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 7 (9 pts), boolean chains 3, loops 3 (nesting depth added 7). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 28, el, render, …). 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.
fetch-vendor.fetchVendor (cognitive 27) devshell/fetch-vendor.mjs:24— fetch-vendor.fetchVendor has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 12). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to 2 function items inside it that branch (worker, a function literal at line 31). 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.
AddonsAccount.checkUpdates (cognitive 27) devshell/site/assets/js/app-addons-account.js:543— AddonsAccount.checkUpdates has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 9, ternaries 2 (4 pts), loops 1 (nesting depth added 7). Of this number, 24 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.
knowledge-pack.findDocuments (cognitive 27) devshell/site/assets/js/knowledge-pack.js:53— knowledge-pack.findDocuments has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 11). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-input.moveCommand (cognitive 27) devshell/site/assets/js/app-input.js:257— app-input.moveCommand has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (11 pts), loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-panels.toWindow (cognitive 27) devshell/site/assets/js/app-panels.js:1375— app-panels.toWindow has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 3 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
app-propgrid.cleanRow (cognitive 27) devshell/site/assets/js/app-propgrid.js:62— app-propgrid.cleanRow has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 10, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Sim.report (cognitive 27) devshell/site/assets/js/engines/des/engine.js:385— Sim.report has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 3 (11 pts), if/else 5 (10 pts), loops 3 (4 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.
Robot._build (cognitive 27) devshell/site/assets/js/engines/motion/robot.js:25— Robot._build has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, loops 3, ternaries 1 (2 pts) (nesting depth added 8). Of this number, 24 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.
fluid.linkLaw (cognitive 27) devshell/site/assets/js/engines/network/fluid.js:48— fluid.linkLaw has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 9, ternaries 4 (9 pts), if/else 5 (8 pts), match/switch 1 (nesting depth added 8). Of this number, 22 points are the body's own statements and 5 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.
LWPOLYLINE (cognitive 27) app/dwg/objects-read.js:1091— LWPOLYLINE has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (9 pts), ternaries 7, boolean chains 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
framePanel.designBlock (cognitive 27) app/frame/frame-panel.js:559— framePanel.designBlock has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (12 pts), if/else 8 (9 pts), boolean chains 4, loops 1, other 1 (nesting depth added 2). Most of this is not in the body itself: 13 of the 27 points are its own statements and the rest belongs to 43 function items inside it that branch (a function literal at line 600, idOf, a function literal at line 569, …). 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.
keyStep (cognitive 27) app/viewcube.js:319— keyStep has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 4 (10 pts), boolean chains 3 (nesting depth added 11). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
unitScales (cognitive 27) app/ifc/ifc43.js:66— unitScales has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 5 (10 pts), boolean chains 2, other 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.
regs.resolve (cognitive 26) app/addons/regs/lib/regs.js:230— regs.resolve has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (8 pts), boolean chains 5, ternaries 1 (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.
LiveClient.dropped (cognitive 26) REDACTED:490— LiveClient.dropped has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 10, ternaries 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
rc-design.cleanRc (cognitive 26) app/frame/rc-design.js:41— rc-design.cleanRc has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 6, ternaries 3 (5 pts), loops 1 (2 pts) (nesting depth added 11). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shell.inv (cognitive 26) app/fem/shell.js:68— shell.inv has cognitive complexity 26 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 3 (10 pts), ternaries 1 (nesting depth added 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, 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.
shell.bendMitc4 (cognitive 26) app/fem/shell.js:94— shell.bendMitc4 has cognitive complexity 26 (threshold 15). Drivers by points: loops 10 (26 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.
transform.applyToMany (cognitive 26) app/transform.js:267— transform.applyToMany has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (6 pts), boolean chains 5, 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.
Model.materials (cognitive 26) app/ids/access.js:379— Model.materials has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, boolean chains 4, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 4 function items inside it that branch (read::walk, read, read::walk::push, …). 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.
viewcube.mountViewCube.draw (cognitive 26) app/viewcube.js:607— viewcube.mountViewCube.draw has cognitive complexity 26 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 6 (8 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawings.revisionTable (cognitive 26) app/drawings.js:1005— drawings.revisionTable has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (12 pts), boolean chains 5, if/else 3 (5 pts), loops 3 (4 pts) (nesting depth added 11). Of this number, 20 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.
kiss.kissFile (cognitive 26) app/kiss.js:77— kiss.kissFile has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 14 (23 pts), loops 10 (16 pts), boolean chains 14, if/else 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (kiss.kissFile::labor) 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.
UsdBuilder.mesh (cognitive 26) app/usd/build.js:131— UsdBuilder.mesh has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9, loops 4 (5 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.
objects-write.dimVars (cognitive 26) app/dwg/objects-write.js:407— objects-write.dimVars has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (14 pts), loops 7, if/else 5 (nesting depth added 4). Of this number, 24 points are the body's own statements and 2 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.
drawings-ui.mountDrawings.drawList (cognitive 26) app/drawings-ui.js:183— drawings-ui.mountDrawings.drawList has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.value (cognitive 26) app/ifc/step.js:250— Parser.value has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 4 (8 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
step.readHeader (cognitive 26) app/ifc/step.js:185— step.readHeader has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (21 pts), error handling 1 (3 pts), boolean chains 1, loops 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.
textin.decodePartsAsync (cognitive 26) app/textin.js:68— textin.decodePartsAsync has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (7 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 11). Of this number, 16 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.
unit-table.parseAbs (cognitive 26) app/unit-table.js:233— unit-table.parseAbs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 5 (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.
app-devices-studio.studioHid (cognitive 26) devshell/site/assets/js/app-devices-studio.js:59— app-devices-studio.studioHid has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 8, if/else 7, error handling 5 (6 pts), ternaries 3, loops 2 (nesting depth added 1). Of this number, 15 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.
docinfo.summarize (cognitive 26) devshell/site/assets/js/docinfo.js:129— docinfo.summarize has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, loops 3 (4 pts), ternaries 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-dock.dockManager.groupGrips (cognitive 26) devshell/site/assets/js/app-dock.js:150— app-dock.dockManager.groupGrips has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 4 (8 pts), boolean chains 5, loops 1 (nesting depth added 10). Of this number, 15 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
totals.format (cognitive 26) devshell/site/assets/js/totals.js:27— totals.format has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (18 pts), if/else 5, error handling 1 (2 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.
Antenna._N (cognitive 26) devshell/site/assets/js/engines/em/wire.js:158— Antenna._N has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (16 pts), loops 4 (10 pts) (nesting depth added 17). None of this is in the body itself: all 26 points belong to one function literal inside it that branches (line 160). 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.
urdf.parseXml (cognitive 26) devshell/site/assets/js/engines/motion/urdf.js:12— urdf.parseXml has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 3, 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.
logic.condition (cognitive 26) devshell/site/assets/js/engines/risk/logic.js:65— logic.condition has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 8 (10 pts), boolean chains 1 (nesting depth added 10). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
logic.cutSets.go (cognitive 26) devshell/site/assets/js/engines/risk/logic.js:94— logic.cutSets.go has cognitive complexity 26 (threshold 15). Drivers by points: loops 7 (19 pts), if/else 5 (7 pts) (nesting depth added 14). 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, 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.
markov.transient (cognitive 26) devshell/site/assets/js/engines/risk/markov.js:31— markov.transient has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 2 (10 pts), boolean chains 2 (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.
plc.runBound (cognitive 26) devshell/site/assets/js/engines/ui/plc.js:32— plc.runBound has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, ternaries 5 (9 pts), if/else 3 (4 pts), loops 1 (nesting depth added 5). Of this number, 17 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.
mountViewCube.draw (cognitive 26) app/viewcube.js:607— mountViewCube.draw has cognitive complexity 26 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 6 (8 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solveFrame (cognitive 26) app/frame/frame-solve.js:535— solveFrame has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 6 (8 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.
sections.mergeSections (cognitive 25) app/addons/regs/lib/sections.js:241— sections.mergeSections has cognitive complexity 25 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (8 pts), boolean chains 7 (nesting depth added 10). Of this number, 19 points are the body's own statements and 6 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.
problems.regsProblems (cognitive 25) app/addons/regs/lib/problems.js:25— problems.regsProblems has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (15 pts), boolean chains 6, if/else 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rebar.footingProblems (cognitive 25) app/rebar.js:110— rebar.footingProblems has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 7). Of this number, 24 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.
plate-mesh.earClip (cognitive 25) app/frame/plate-mesh.js:124— plate-mesh.earClip has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), boolean chains 3 (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.
erection.supports (cognitive 25) app/erection.js:116— erection.supports has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 8). Of this number, 22 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.
frame-weld.detailing (cognitive 25) app/frame/frame-weld.js:173— frame-weld.detailing has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 1 (4 pts), boolean chains 2 (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.
frame-panel.framePanel.designBlock (cognitive 25) app/frame/frame-panel.js:559— frame-panel.framePanel.designBlock has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10 (11 pts), if/else 8 (9 pts), boolean chains 4, loops 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
bim.fromFrame (cognitive 25) app/fem/bim.js:20— bim.fromFrame has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 8, ternaries 3 (5 pts), loops 3 (nesting depth added 7). Of this number, 19 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.
shell.shellK (cognitive 25) app/fem/shell.js:239— shell.shellK has cognitive complexity 25 (threshold 15). Drivers by points: loops 8 (24 pts), ternaries 1 (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.
lencalc.calc::primary (cognitive 25) app/lencalc.js:143— lencalc.calc::primary has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (8 pts), boolean chains 5 (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.
usdc-read.buildPaths (cognitive 25) app/usd/usdc-read.js:150— usdc-read.buildPaths has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Composer.expand::visit (cognitive 25) app/usd/stage.js:176— Composer.expand::visit has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 7 (9 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.
scene.pointInstances (cognitive 25) app/usd/scene.js:112— scene.pointInstances has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 7, ternaries 3 (5 pts), loops 1 (nesting depth added 8). Of this number, 15 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
surface-write.surfaceWriter.convert (cognitive 25) app/dwg/surface-write.js:108— surface-write.surfaceWriter.convert has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (11 pts), ternaries 2, loops 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.
geo-bool.convexCut (cognitive 25) app/ifc/geo-bool.js:124— geo-bool.convexCut has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 5 (11 pts) (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.
live-classroom.mountUi::card (cognitive 25) app/live-classroom.js:743— live-classroom.mountUi::card has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 2 (5 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.
ifc.typed (cognitive 25) app/usd/ifc.js:54— ifc.typed has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serve.start (cognitive 25) devshell/serve.mjs:97— serve.start has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, ternaries 2 (4 pts), error handling 2 (3 pts) (nesting depth added 4). None of this is in the body itself: all 25 points belong to 2 function literals inside it that branch (lines 102, 99). 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.
app-addons-account.stampFile (cognitive 25) devshell/site/assets/js/app-addons-account.js:656— app-addons-account.stampFile has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (8 pts), loops 4 (7 pts) (nesting depth added 5). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to one function item inside it that branches (walk). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
app-input-ui.mount (cognitive 25) devshell/site/assets/js/app-input-ui.js:77— app-input-ui.mount has cognitive complexity 25 (threshold 15). Drivers by points: if/else 154 (221 pts), boolean chains 157, ternaries 66 (103 pts), loops 19 (31 pts), error handling 3 (4 pts) (nesting depth added 117). To reduce it, split the body into named stages: move each independent 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: 5 other methods here (app-input-ui.mount::rememberSplit, app-input-ui.mount::render, app-input-ui.mount::customize::placeVal, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
people.egress::run (cognitive 25) devshell/site/assets/js/engines/des/people.js:71— people.egress::run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 5 (6 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (people.egress) 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.
Circuit.op (cognitive 25) devshell/site/assets/js/engines/em/circuit.js:191— Circuit.op has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mqtt.decode (cognitive 25) devshell/site/assets/js/engines/live/mqtt.js:42— mqtt.decode has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 1 (nesting depth added 11). Of this number, 23 points are the body's own statements and 2 belong to 2 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.
mqtt.readPayload (cognitive 25) devshell/site/assets/js/engines/live/mqtt.js:86— mqtt.readPayload has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 5 (7 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.
tagmap.splitCsv (cognitive 25) devshell/site/assets/js/engines/live/tagmap.js:81— tagmap.splitCsv has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fromDrop (cognitive 25) REDACTED:485— fromDrop has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4 (6 pts), loops 3 (5 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 10). Of this number, 21 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pieces (cognitive 25) app/frame/frame-solve.js:101— pieces has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), other 5, ternaries 3 (5 pts), loops 1 (nesting depth added 8). Of this number, 16 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.
sections.cleanSatisfy (cognitive 24) app/addons/regs/lib/sections.js:110— sections.cleanSatisfy has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 3, 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.
library.install (cognitive 24) app/addons/regs/lib/library.js:107— library.install has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 14, if/else 5, ternaries 3 (4 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 112). 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.
frame-solve.invSmall (cognitive 24) app/frame/frame-solve.js:129— frame-solve.invSmall has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 3 (8 pts), boolean chains 1, ternaries 1 (nesting depth added 12). 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, 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.
linalg.solveDense (cognitive 24) app/fem/linalg.js:166— linalg.solveDense has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 4 (10 pts) (nesting depth added 13). 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.
supply.problemsOf (cognitive 24) app/lib-supply/supply.js:195— supply.problemsOf has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (20 pts), if/else 2 (3 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.
usda-write.primText (cognitive 24) app/usd/usda-write.js:51— usda-write.primText has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 4 (5 pts), ternaries 3 (nesting depth added 5). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
intcode.decodeInts (cognitive 24) app/usd/intcode.js:18— intcode.decodeInts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (6 pts), loops 2 (3 pts) (nesting depth added 6). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
table-read.canonicalBorders (cognitive 24) app/dwg/table-read.js:605— table-read.canonicalBorders has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lz-r2004-write.decompressR2004ForTest (cognitive 24) app/dwg/lz-r2004-write.js:164— lz-r2004-write.decompressR2004ForTest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 6 (8 pts) (nesting depth added 7). Of this number, 15 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.
app-reasons.boot::render (cognitive 24) devshell/site/assets/js/app-reasons.js:73— app-reasons.boot::render has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (10 pts), boolean chains 8, if/else 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-workspace-arrange.arrangeDialog.start (cognitive 24) devshell/site/assets/js/app-workspace-arrange.js:26— app-workspace-arrange.arrangeDialog.start has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (14 pts), boolean chains 10 (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.
app-workspace-extras.infoFields.render (cognitive 24) devshell/site/assets/js/app-workspace-extras.js:277— app-workspace-extras.infoFields.render has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, loops 3 (5 pts), ternaries 1 (nesting depth added 8). 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.
tagmap.checkAddress (cognitive 24) devshell/site/assets/js/engines/live/tagmap.js:29— tagmap.checkAddress has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, ternaries 2 (4 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shortcircuit.fault (cognitive 24) devshell/site/assets/js/engines/network/shortcircuit.js:50— shortcircuit.fault has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10 (12 pts), if/else 7, boolean chains 4, loops 1 (nesting depth added 2). 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: 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.
gds.narrowest (cognitive 24) devshell/site/assets/js/engines/pcb/gds.js:175— gds.narrowest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
std.kindOf (cognitive 24) devshell/site/assets/js/engines/plc/std.js:5— std.kindOf has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (21 pts), boolean chains 3 (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.
Runtime.kindOfExpr (cognitive 24) devshell/site/assets/js/engines/plc/runtime.js:231— Runtime.kindOfExpr has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 3 (6 pts), boolean chains 2, 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.
plcopen.ldXml (cognitive 24) REDACTED:32— plcopen.ldXml has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 4 (8 pts), boolean chains 6, ternaries 1 (nesting depth added 5). None of this is in the body itself: all 24 points belong to 3 function literals inside it that branch (lines 35, 37, 38). 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.
cpm.normalise (cognitive 24) devshell/site/assets/js/engines/schedule/cpm.js:13— cpm.normalise has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plans.terminalPlan (cognitive 24) devshell/site/assets/js/engines/schematic/plans.js:33— plans.terminalPlan has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (5 pts), ternaries 3 (5 pts), loops 2 (nesting depth added 4). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (side, a function literal at line 49, a function literal at line 38, …). 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.
plant.checkPlant (cognitive 24) REDACTED:384— plant.checkPlant has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 6 (8 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wireAccount (cognitive 24) REDACTED:376— wireAccount has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 10, ternaries 6 (7 pts), if/else 5, error handling 2 (nesting depth added 1). Of this number, 17 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
constructor (cognitive 24) REDACTED:328— constructor has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, ternaries 6, if/else 4, error handling 2. Of this number, 20 points are the body's own statements and 4 belong to 5 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.
sendHello (cognitive 24) REDACTED:407— sendHello has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, ternaries 1 (2 pts) (nesting depth added 4). 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.
punchSection (cognitive 24) app/foundation.js:273— punchSection has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (8 pts), loops 3 (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.
cleanDyn (cognitive 24) app/frame/frame-dynamics-panel.js:25— cleanDyn has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (9 pts), if/else 3, other 3 (nesting depth added 3). Of this number, 22 points are the body's own statements and 2 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mountRc.addBlock (cognitive 24) app/rc-ui.js:62— mountRc.addBlock has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 9, if/else 5 (nesting depth added 4). Of this number, 18 points are the body's own statements and 6 belong to 14 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.
frame-solve.diagram (cognitive 23) app/frame/frame-solve.js:606— frame-solve.diagram has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 5 (6 pts), ternaries 3, boolean chains 2 (nesting depth added 6). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (at, at::force, integrate2, …). 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.
host.mountRecent.render (cognitive 23) REDACTED:1872— host.mountRecent.render has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), ternaries 3 (6 pts), error handling 1 (2 pts), loops 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-push.assemble (cognitive 23) app/fem/frame-push.js:197— frame-push.assemble has cognitive complexity 23 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 2 (5 pts) (nesting depth added 12). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 202). 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.
frame-dyn.responseSpectrum (cognitive 23) app/fem/frame-dyn.js:58— frame-dyn.responseSpectrum has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
csv.parseCsv (cognitive 23) app/csv.js:19— csv.parseCsv has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, 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.
Model.typed (cognitive 23) app/ids/access.js:87— Model.typed has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 7, if/else 4 (7 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.
problems.idsProblems (cognitive 23) app/ids/problems.js:24— problems.idsProblems has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (8 pts), loops 3 (6 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.
panel.el (cognitive 23) app/issuelog/panel.js:27— panel.el has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawings.makeSet.sheets (cognitive 23) app/drawings.js:1041— drawings.makeSet.sheets has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 9, if/else 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
rc-ui.mountRc.addBlock (cognitive 23) app/rc-ui.js:62— rc-ui.mountRc.addBlock has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, ternaries 4 (8 pts), if/else 5 (nesting depth added 4). Of this number, 19 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
acds.writeAcds (cognitive 23) app/dwg/acds.js:197— acds.writeAcds has cognitive complexity 23 (threshold 15). Drivers by points: loops 9 (12 pts), if/else 4 (6 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 7). 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.
surface-write.encodeSurface (cognitive 23) app/dwg/surface-write.js:64— surface-write.encodeSurface has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, loops 2 (3 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.
geo-solid.primitive (cognitive 23) app/ifc/geo-solid.js:275— geo-solid.primitive has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (9 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.
geo-nurbs.surfaceOf (cognitive 23) app/ifc/geo-nurbs.js:137— geo-nurbs.surfaceOf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 4). Of this number, 20 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
geo-brep.face (cognitive 23) app/ifc/geo-brep.js:41— geo-brep.face has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Geometry.openings (cognitive 23) app/ifc/geometry.js:86— Geometry.openings has cognitive complexity 23 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (9 pts), boolean chains 3, 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.
live.stateCore.touched (cognitive 23) app/live.js:190— live.stateCore.touched has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
study.runStudy::worker (cognitive 23) app/study/study.js:123— study.runStudy::worker has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-access.matchSpoken (cognitive 23) REDACTED:146— app-access.matchSpoken has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 5, boolean chains 2, loops 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.
app-devices.classifyWheel (cognitive 23) devshell/site/assets/js/app-devices.js:211— app-devices.classifyWheel has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, ternaries 3 (6 pts), if/else 5 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
app-panels.bringBack (cognitive 23) devshell/site/assets/js/app-panels.js:1588— app-panels.bringBack has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 6). Of this number, 16 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.
app-panels.showOffer (cognitive 23) devshell/site/assets/js/app-panels.js:1666— app-panels.showOffer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5 (nesting depth added 9). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1677, 1688, 1684). 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.
app-phone.layout (cognitive 23) devshell/site/assets/js/app-phone.js:438— app-phone.layout has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 6). Of this number, 18 points are the body's own statements and 5 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.
app-settings.hiddenItems (cognitive 23) devshell/site/assets/js/app-settings.js:855— app-settings.hiddenItems has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 4 (8 pts), boolean chains 3, loops 1 (nesting depth added 7). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 862, 859, 860, …). 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.
modbus.parseResponse (cognitive 23) devshell/site/assets/js/engines/live/modbus.js:38— modbus.parseResponse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
dynamics.rnea (cognitive 23) devshell/site/assets/js/engines/motion/dynamics.js:21— dynamics.rnea has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 3 (5 pts), loops 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loops.newton (cognitive 23) devshell/site/assets/js/engines/motion/loops.js:102— loops.newton has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 4 (9 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.
numeric.solveLinear (cognitive 23) devshell/site/assets/js/engines/network/numeric.js:8— numeric.solveLinear has cognitive complexity 23 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 3 (8 pts) (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.
shortcircuit.faultStudy (cognitive 23) devshell/site/assets/js/engines/network/shortcircuit.js:86— shortcircuit.faultStudy has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (13 pts), ternaries 1 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solve.solveLinear (cognitive 23) devshell/site/assets/js/engines/sys/solve.js:20— solve.solveLinear has cognitive complexity 23 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 3 (8 pts) (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.
solve.newton (cognitive 23) devshell/site/assets/js/engines/sys/solve.js:36— solve.newton has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (8 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.
reqif.writeReqif (cognitive 23) devshell/site/assets/js/engines/trace/reqif.js:87— reqif.writeReqif has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (7 pts), if/else 4 (6 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 5). 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.
mountAssistants (cognitive 23) REDACTED:1506— mountAssistants has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 7, ternaries 6, loops 4 (5 pts), if/else 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to 17 function items inside it that branch (render, a function literal at line 1568, persist, …). 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.
runsBehind (cognitive 23) app/drawings.js:187— runsBehind has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (9 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 10). Of this number, 19 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.
findMitres (cognitive 23) app/connections.js:715— findMitres has cognitive complexity 23 (threshold 15). Drivers by points: if/else 2 (10 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 14). Of this number, 20 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cleanPanelSpec (cognitive 23) app/framing.js:240— cleanPanelSpec has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 6, boolean chains 5 (nesting depth added 3). Of this number, 21 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: 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.
checkAISCHollow (cognitive 23) app/frame/frame-design.js:223— checkAISCHollow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 5 (7 pts), boolean chains 5, loops 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 8 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.
fromApi::asRaw (cognitive 23) app/ifc/api.js:245— fromApi::asRaw has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 3 (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.
plate.inv4 (cognitive 22) app/frame/plate.js:188— plate.inv4 has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 2 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 11). 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, 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.
frame-solve.rcm (cognitive 22) app/frame/frame-solve.js:171— frame-solve.rcm has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 2 (7 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.
frame-loads-panel.loadsPanel.siteBlock (cognitive 22) app/frame/frame-loads-panel.js:207— frame-loads-panel.loadsPanel.siteBlock has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 5 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dyn-core.newmark (cognitive 22) app/fem/dyn-core.js:213— dyn-core.newmark has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 4 (7 pts), boolean chains 2 (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.
breakit.reserve (cognitive 22) app/study/breakit.js:33— breakit.reserve has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 9). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
values.equalsText (cognitive 22) app/ids/values.js:55— values.equalsText has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (14 pts), boolean chains 6, if/else 1, 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.
Model.psets (cognitive 22) app/ids/access.js:173— Model.psets has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 6, ternaries 2 (4 pts), boolean chains 2 (nesting depth added 6). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: 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.
panel.mountIssuePanel.recordForm (cognitive 22) app/issuelog/panel.js:170— panel.mountIssuePanel.recordForm has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, ternaries 4, if/else 2 (3 pts) (nesting depth added 1). Of this number, 17 points are the body's own statements and 5 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.
usda-write.formatValue (cognitive 22) app/usd/usda-write.js:183— usda-write.formatValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, ternaries 3 (5 pts), boolean chains 4, loops 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.
usda-write.dictText (cognitive 22) app/usd/usda-write.js:254— usda-write.dictText has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (20 pts), if/else 1, 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.
geom.localMatrix (cognitive 22) app/usd/geom.js:109— geom.localMatrix has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xf-ui.mountXf.xfBlock (cognitive 22) app/xf-ui.js:17— xf-ui.mountXf.xfBlock has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (5 pts), boolean chains 4, ternaries 2 (4 pts), error handling 2 (nesting depth added 4). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 46, 66, 30, …). 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.
IfcFile.refIndex (cognitive 22) app/ifc/model.js:148— IfcFile.refIndex has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 8). Of this number, 13 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.
geo-curve.indexedPolyCurve (cognitive 22) app/ifc/geo-curve.js:58— geo-curve.indexedPolyCurve has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 9). Of this number, 20 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.
GeoCtx.unitFactor (cognitive 22) app/ifc/geo-ctx.js:79— GeoCtx.unitFactor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, 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.
app-ai-ownkey.addOwnKey (cognitive 22) devshell/site/assets/js/app-ai-ownkey.js:64— app-ai-ownkey.addOwnKey has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts), ternaries 2 (3 pts), error handling 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
app-dock.dockManager.refresh (cognitive 22) devshell/site/assets/js/app-dock.js:182— app-dock.dockManager.refresh has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2, boolean chains 1 (nesting depth added 9). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
report.hardwarePayload (cognitive 22) devshell/site/assets/js/compute/report.js:38— report.hardwarePayload has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, ternaries 4 (5 pts), if/else 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
app-input.normCombo (cognitive 22) devshell/site/assets/js/app-input.js:73— app-input.normCombo has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 5). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-panels.plan (cognitive 22) devshell/site/assets/js/app-panels.js:195— app-panels.plan has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, loops 1 (nesting depth added 6). Of this number, 18 points are the body's own statements and 4 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.
reasons.createReasons::set (cognitive 22) devshell/site/assets/js/reasons.js:59— reasons.createReasons::set has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
linalg.solveComplex (cognitive 22) devshell/site/assets/js/engines/em/linalg.js:23— linalg.solveComplex has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 4 (10 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.
fields.magnetostatic2d (cognitive 22) devshell/site/assets/js/engines/em/fields.js:120— fields.magnetostatic2d has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (6 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.
fluid.checkNetwork (cognitive 22) devshell/site/assets/js/engines/network/fluid.js:156— fluid.checkNetwork has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drc.connectivity (cognitive 22) devshell/site/assets/js/engines/pcb/drc.js:98— drc.connectivity has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). Of this number, 13 points are the body's own statements and 9 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.
HelpLocales.buildAddonLocales (cognitive 22) devshell/site/tools/lang/help-locales.php:94— HelpLocales.buildAddonLocales has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 2 (3 pts), 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 (HelpLocales.buildAll) 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.
HelpLocales.compile (cognitive 22) devshell/site/tools/lang/help-locales.php:203— HelpLocales.compile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HelpLocales.buildAll (cognitive 22) devshell/site/tools/lang/help-locales.php:263— HelpLocales.buildAll has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 2 (3 pts), 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 (HelpLocales.buildAddonLocales) 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.
cleanAddonData (cognitive 22) REDACTED:87— cleanAddonData has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (5 pts), ternaries 3 (5 pts), error handling 1 (2 pts), loops 1, other 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dynamicsPanel.motionBox (cognitive 22) app/frame/frame-dynamics-panel.js:210— dynamicsPanel.motionBox has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (6 pts), other 4, boolean chains 3 (nesting depth added 5). Of this number, 13 points are the body's own statements and 9 belong to 19 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity· body (cognitive 22) · ×1
body (cognitive 22) app/usd/usda-read.js:325— body has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (8 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
checkAISC (cognitive 22) app/frame/frame-design.js:125— checkAISC has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 5 (8 pts), boolean chains 4, loops 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
library.refreshInstalled (cognitive 21) app/addons/regs/lib/library.js:148— library.refreshInstalled has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, error handling 4 (6 pts), if/else 4 (6 pts), 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.
adapter.startRegs.fmt (cognitive 21) app/addons/regs/lib/adapter.js:43— adapter.startRegs.fmt has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (21 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.
trust.readPackageJson (cognitive 21) app/addons/trust.js:98— trust.readPackageJson has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts), error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plate-model.cleanDiaphragms (cognitive 21) app/frame/plate-model.js:61— plate-model.cleanDiaphragms has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (5 pts), boolean chains 3, 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.
frame-model.cleanShape (cognitive 21) app/frame/frame-model.js:177— frame-model.cleanShape has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 4). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plate-solve.prepareShell.assemble (cognitive 21) app/frame/plate-solve.js:187— plate-solve.prepareShell.assemble has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (10 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.
frame-solve.secondOrderSet (cognitive 21) app/frame/frame-solve.js:512— frame-solve.secondOrderSet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 pts), ternaries 1 (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.
Host.pickFolder (cognitive 21) REDACTED:598— Host.pickFolder has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-concrete.concreteTables (cognitive 21) app/frame/frame-concrete.js:289— frame-concrete.concreteTables has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 5 (6 pts), boolean chains 4 (nesting depth added 7). Of this number, 11 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-concrete-panel.concretePanel.concreteBlock (cognitive 21) app/frame/frame-concrete-panel.js:170— frame-concrete-panel.concretePanel.concreteBlock has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 5, if/else 3 (4 pts), loops 1 (nesting depth added 2). Of this number, 12 points are the body's own statements and 9 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.
tet10.tetK (cognitive 21) app/fem/tet10.js:62— tet10.tetK has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 1 (3 pts) (nesting depth added 13). Of this number, 12 points are the body's own statements and 9 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.
rc-detail.cleanRc (cognitive 21) app/rc-detail.js:54— rc-detail.cleanRc has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 4 (7 pts), boolean chains 4, loops 2 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rc-detail.rcProblems (cognitive 21) app/rc-detail.js:143— rc-detail.rcProblems has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (9 pts), boolean chains 6, if/else 1 (3 pts), loops 2 (3 pts) (nesting depth added 9). Of this number, 18 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.
report.reportSheets (cognitive 21) app/report.js:84— report.reportSheets has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 4, loops 2 (nesting depth added 3). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 115, text, a function literal at line 102, …). 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.
lz-r2004-write.compressR2004::best (cognitive 21) app/dwg/lz-r2004-write.js:57— lz-r2004-write.compressR2004::best has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, 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. This shape REPEATS in the file: one other method here (lz-r2004-write.compressR2004) 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.
lz-r2004-write.compressR2004 (cognitive 21) app/dwg/lz-r2004-write.js:32— lz-r2004-write.compressR2004 has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 6 (9 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (lz-r2004-write.compressR2004::best) 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.
passthrough.encodeConverted (cognitive 21) app/dwg/passthrough.js:266— passthrough.encodeConverted has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9, loops 5 (9 pts), ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
geo-align.sectionedSolid (cognitive 21) app/ifc/geo-align.js:182— geo-align.sectionedSolid has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (6 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 7). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Styles.styleColor (cognitive 21) app/ifc/geo-style.js:42— Styles.styleColor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workspace-detailcraft.mountDetailcraftWorkspace.ribbon (cognitive 21) app/workspace-detailcraft.js:65— workspace-detailcraft.mountDetailcraftWorkspace.ribbon has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, ternaries 2 (5 pts), loops 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 70, 68, 79). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ifc43.summary (cognitive 21) app/ifc/ifc43.js:275— ifc43.summary has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 10). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (pick, a function literal at line 291). 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.
unit-prefs.limitSelect (cognitive 21) app/unit-prefs.js:143— unit-prefs.limitSelect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, loops 1 (2 pts), ternaries 1 (nesting depth added 6). Of this number, 16 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.
ai-model-only.kindOf (cognitive 21) devshell/site/assets/js/ai-model-only.js:116— ai-model-only.kindOf has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (21 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.
ai-history.modelExcerpt (cognitive 21) devshell/site/assets/js/ai-history.js:185— ai-history.modelExcerpt has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 7 (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.
ai-teach.cleanStep (cognitive 21) devshell/site/assets/js/ai-teach.js:26— ai-teach.cleanStep has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 4 (nesting depth added 3). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ai-teacher.createTeacher (cognitive 21) devshell/site/assets/js/ai-teacher.js:120— ai-teacher.createTeacher has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 6, error handling 2 (3 pts), ternaries 3, loops 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 7 function items inside it that branch (emit, a function literal at line 135, a function literal at line 146, …). 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.
app-cmdline.matchWord (cognitive 21) devshell/site/assets/js/app-cmdline.js:29— app-cmdline.matchWord has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 3 (4 pts), ternaries 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-phone.ensureBar (cognitive 21) devshell/site/assets/js/app-phone.js:161— app-phone.ensureBar has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 6). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 164, 185, 169, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
app-phone.tabletSheets (cognitive 21) devshell/site/assets/js/app-phone.js:335— app-phone.tabletSheets has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 8 (nesting depth added 3). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 350, 340). 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.
app-workspace-vector.menubar.groups (cognitive 21) devshell/site/assets/js/app-workspace-vector.js:150— app-workspace-vector.menubar.groups has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (7 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-workspace-vector.menubar.mount (cognitive 21) devshell/site/assets/js/app-workspace-vector.js:241— app-workspace-vector.menubar.mount has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 250, 259, 258, …). 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.
linalg.solveReal (cognitive 21) devshell/site/assets/js/engines/em/linalg.js:5— linalg.solveReal has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 4 (10 pts) (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.
Runtime.binary (cognitive 21) devshell/site/assets/js/engines/plc/runtime.js:211— Runtime.binary has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 6, if/else 4 (6 pts), match/switch 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xref.crossRefs (cognitive 21) devshell/site/assets/js/engines/schematic/xref.js:8— xref.crossRefs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, ternaries 1 (3 pts), loops 2 (nesting depth added 7). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plant.readPid (cognitive 21) REDACTED:299— plant.readPid has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (8 pts), boolean chains 6, if/else 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 8). Of this number, 18 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Help.keys (cognitive 21) devshell/site/core/classes/Help.php:478— Help.keys has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HelpLocales.overlay (cognitive 21) devshell/site/tools/lang/help-locales.php:163— HelpLocales.overlay has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 5 (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.
convert::catalogMatch::fit (cognitive 21) app/ifc-import.js:221— convert::catalogMatch::fit has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 18, other 2, match/switch 1. 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.
edgeMap (cognitive 21) app/dwg/table-write.js:256— edgeMap has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 11). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
orphans (cognitive 21) app/app-autosave.js:269— orphans has cognitive complexity 21 (threshold 15). Drivers by points: error handling 3 (9 pts), if/else 2 (4 pts), loops 3 (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.
writeJournal (cognitive 21) app/app-autosave.js:454— writeJournal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 5, error handling 1 (2 pts) (nesting depth added 2). Of this number, 20 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
sections.checklistFromSections (cognitive 20) app/addons/regs/lib/sections.js:274— sections.checklistFromSections has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, ternaries 4, if/else 1. Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
library.load (cognitive 20) app/addons/regs/lib/library.js:72— library.load has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (4 pts), ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 2). Of this number, 12 points are the body's own statements and 8 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.
frame-solve.condense (cognitive 20) app/frame/frame-solve.js:147— frame-solve.condense has cognitive complexity 20 (threshold 15). Drivers by points: loops 9 (16 pts), if/else 3 (4 pts) (nesting depth added 8). 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.
frame-loads-panel.cleanLoads (cognitive 20) app/frame/frame-loads-panel.js:31— frame-loads-panel.cleanLoads has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11, boolean chains 8, if/else 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.
frame-panel.framePanel.endsBlock (cognitive 20) app/frame/frame-panel.js:407— frame-panel.framePanel.endsBlock has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 5 (6 pts), boolean chains 3 (nesting depth added 8). Of this number, 14 points are the body's own statements and 6 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.
shell.transform (cognitive 20) app/fem/shell.js:253— shell.transform has cognitive complexity 20 (threshold 15). Drivers by points: loops 8 (20 pts) (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.
ZipIndex.open (cognitive 20) app/bundle/read.js:62— ZipIndex.open has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChunkHistory.diff (cognitive 20) app/history/history.js:57— ChunkHistory.diff has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
transform.snapOffset (cognitive 20) app/transform.js:220— transform.snapOffset has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 9). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mleader-write.encodeMleader (cognitive 20) app/dwg/mleader-write.js:70— mleader-write.encodeMleader has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 4, loops 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
solid-write.writeWireframe (cognitive 20) app/dwg/solid-write.js:76— solid-write.writeWireframe has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (6 pts), boolean chains 5, 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.
ifc-import.reportLines (cognitive 20) app/ifc-import.js:593— ifc-import.reportLines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 8, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geo-align.parentCurve (cognitive 20) app/ifc/geo-align.js:39— geo-align.parentCurve has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 2 (7 pts), boolean chains 6, if/else 5, loops 1 (2 pts) (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Styles.productColor (cognitive 20) app/ifc/geo-style.js:69— Styles.productColor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geo-solid.frames (cognitive 20) app/ifc/geo-solid.js:109— geo-solid.frames has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (6 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geo-bool.subtractAll (cognitive 20) app/ifc/geo-bool.js:75— geo-bool.subtractAll has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (7 pts), error handling 1 (4 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.
Properties.getSpatialStructure (cognitive 20) app/ifc/api.js:473— Properties.getSpatialStructure has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 2 function items inside it that branch (node, kids). 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.
live-follow.viewBody (cognitive 20) app/live-follow.js:40— live-follow.viewBody has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AddonsAccount.closure (cognitive 20) devshell/site/assets/js/app-addons-account.js:397— AddonsAccount.closure has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, loops 2 (nesting depth added 3). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to one function item inside it that branches (visit). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AddonsAccount.#fetchOne (cognitive 20) devshell/site/assets/js/app-addons-account.js:447— AddonsAccount.#fetchOne has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, error handling 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-devices.importProfile (cognitive 20) devshell/site/assets/js/app-devices.js:194— app-devices.importProfile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, loops 1 (2 pts), error handling 1, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to one function item inside it that branches (walk). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
app-input.panelLayout (cognitive 20) devshell/site/assets/js/app-input.js:223— app-input.panelLayout has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 7, if/else 2 (nesting depth added 4). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 227, 225, 234). 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.
app-input-ui.el (cognitive 20) devshell/site/assets/js/app-input-ui.js:52— app-input-ui.el has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (6 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-propgrid.create (cognitive 20) devshell/site/assets/js/app-propgrid.js:88— app-propgrid.create has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 8, ternaries 3. Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 332, 314, 315, …). 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.
app-settings.startArrange (cognitive 20) devshell/site/assets/js/app-settings.js:444— app-settings.startArrange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3 (nesting depth added 4). Of this number, 13 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Circuit._nl (cognitive 20) devshell/site/assets/js/engines/em/circuit.js:97— Circuit._nl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
circuit.waveFrom (cognitive 20) devshell/site/assets/js/engines/em/circuit.js:311— circuit.waveFrom has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, if/else 5. 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.
Antenna._pair (cognitive 20) devshell/site/assets/js/engines/em/wire.js:85— Antenna._pair has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (5 pts), ternaries 3 (4 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.
math.solve (cognitive 20) devshell/site/assets/js/engines/motion/math.js:68— math.solve has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (8 pts) (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.
robot.robotFromDH (cognitive 20) devshell/site/assets/js/engines/motion/robot.js:108— robot.robotFromDH has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 6, if/else 4 (6 pts) (nesting depth added 6). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 112). 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.
common.solve (cognitive 20) devshell/site/assets/js/engines/risk/common.js:11— common.solve has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (8 pts) (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.
weibull.fitMLE (cognitive 20) devshell/site/assets/js/engines/risk/weibull.js:40— weibull.fitMLE has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 6 (7 pts), boolean chains 2, loops 2 (nesting depth added 4). Of this number, 19 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.
Lang.use (cognitive 20) devshell/site/core/classes/Lang.php:61— Lang.use has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, loops 1 (2 pts), ternaries 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
saveAs (cognitive 20) REDACTED:530— saveAs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (4 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· moved (cognitive 20) · ×1
moved (cognitive 20) REDACTED:1144— moved has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8, boolean chains 7, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 1). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
textData (cognitive 20) app/dwg/objects-write.js:597— textData has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9, if/else 8, boolean chains 2, other 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 20) app/app-autosave.js:194— constructor has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (6 pts), error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AddonLoader.discover (cognitive 19) REDACTED:389— AddonLoader.discover has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, error handling 2 (4 pts), loops 2, ternaries 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
library.readCapped (cognitive 19) app/addons/regs/lib/library.js:33— library.readCapped has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 2 (5 pts), boolean chains 3, loops 2, 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.
rebar.cleanFooting (cognitive 19) app/rebar.js:83— rebar.cleanFooting has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, ternaries 1 (3 pts), 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.
frame-solve.eigSym3 (cognitive 19) app/frame/frame-solve.js:316— frame-solve.eigSym3 has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 2 (5 pts), boolean chains 2 (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.
plate-mesh.gridMesh (cognitive 19) app/frame/plate-mesh.js:82— plate-mesh.gridMesh has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (7 pts), boolean chains 2, ternaries 2 (nesting depth added 5). Of this number, 11 points are the body's own statements and 8 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.
ui-util.el (cognitive 19) app/ui-util.js:8— ui-util.el has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 1 (3 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-concrete.problemsOf (cognitive 19) app/frame/frame-concrete.js:256— frame-concrete.problemsOf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-weld.perimeterSegments (cognitive 19) app/frame/frame-weld.js:258— frame-weld.perimeterSegments has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (8 pts), if/else 5 (7 pts), ternaries 3, boolean chains 1 (nesting depth added 7). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
breakit.partFindings (cognitive 19) app/study/breakit.js:108— breakit.partFindings has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 7, if/else 3 (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
standards.lineTypesFor (cognitive 19) app/bundle/standards.js:40— standards.lineTypesFor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 6). Of this number, 16 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.
anchorage.develop (cognitive 19) app/rc/anchorage.js:86— anchorage.develop has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 4, if/else 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loose.cleanLoose (cognitive 19) app/rc/loose.js:221— loose.cleanLoose has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 6, ternaries 2. 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, 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.
Model.projectUnits (cognitive 19) app/ids/access.js:275— Model.projectUnits has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (4 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.
check.propertyCheck (cognitive 19) app/ids/check.js:103— check.propertyCheck has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, ternaries 2 (nesting depth added 1). Of this number, 15 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
check.candidates::typed2x3 (cognitive 19) app/ids/check.js:169— check.candidates::typed2x3 has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 6, loops 2 (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. This shape REPEATS in the file: one other method here (check.candidates) 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.
ids-ui.mountIds.body (cognitive 19) REDACTED:22— ids-ui.mountIds.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 1 (3 pts) (nesting depth added 9). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
winsel.selectionItems (cognitive 19) app/winsel.js:28— winsel.selectionItems has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 4 (6 pts), boolean chains 4, loops 2 (nesting depth added 6). Of this number, 15 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
supply-ui.mountSupply.panel (cognitive 19) app/supply-ui.js:62— supply-ui.mountSupply.panel has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 5, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 80, 71, 74). 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.
interfaces-detailcraft.dcInterfaceInput (cognitive 19) app/interfaces-detailcraft.js:19— interfaces-detailcraft.dcInterfaceInput has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 2 (4 pts), ternaries 2 (4 pts), loops 2 (nesting depth added 4). Of this number, 13 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
nc1.readNc1 (cognitive 19) app/nc1.js:172— nc1.readNc1 has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 2 (nesting depth added 6). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.scalarOrTuple (cognitive 19) app/usd/usda-read.js:481— Parser.scalarOrTuple has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 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.
step.statementEnd (cognitive 19) app/ifc/step.js:69— step.statementEnd has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (7 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.
IfcFile.inverseAsync (cognitive 19) app/ifc/model.js:193— IfcFile.inverseAsync has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 5). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geo-bool.halfSpaceCut (cognitive 19) app/ifc/geo-bool.js:267— geo-bool.halfSpaceCut has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). Of this number, 13 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live.joinFromPage (cognitive 19) app/live.js:367— live.joinFromPage has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), error handling 2 (4 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
unit-table.format (cognitive 19) app/unit-table.js:300— unit-table.format has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 3 (5 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.
unit-prefs.read (cognitive 19) app/unit-prefs.js:28— unit-prefs.read has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 2 (4 pts), error handling 2, 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.
AddonsAccount.constructor (cognitive 19) devshell/site/assets/js/app-addons-account.js:140— AddonsAccount.constructor has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 15, error handling 1 (2 pts), if/else 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
app-tools-ui.h (cognitive 19) devshell/site/assets/js/app-tools-ui.js:9— app-tools-ui.h has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (6 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-cmdline.suggest (cognitive 19) devshell/site/assets/js/app-cmdline.js:42— app-cmdline.suggest has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts), loops 1 (nesting depth added 2). 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, 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.
app-devices-ui.mountSettings::el (cognitive 19) devshell/site/assets/js/app-devices-ui.js:307— app-devices-ui.mountSettings::el has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-panels.tabStrip (cognitive 19) devshell/site/assets/js/app-panels.js:924— app-panels.tabStrip has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, ternaries 2 (nesting depth added 1). None of this is in the body itself: all 19 points belong to 4 function literals inside it that branch (lines 925, 947, 937, …). 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.
teamwork.createTeamwork::call (cognitive 19) devshell/site/assets/js/teamwork.js:58— teamwork.createTeamwork::call has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, error handling 2, if/else 2, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (teamwork.createTeamwork) 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.
app-workspace-edit.layoutEditor.contextmenu (cognitive 19) devshell/site/assets/js/app-workspace-edit.js:97— app-workspace-edit.layoutEditor.contextmenu has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 6, boolean chains 4 (nesting depth added 3). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
app-workspace-extras.myTools.pick (cognitive 19) devshell/site/assets/js/app-workspace-extras.js:113— app-workspace-extras.myTools.pick has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (4 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 5). Of this number, 14 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-workspace-input.fromInput.ribbon (cognitive 19) devshell/site/assets/js/app-workspace-input.js:47— app-workspace-input.fromInput.ribbon has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (nesting depth added 7). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 49, 47, 58). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
tagmap.planReads (cognitive 19) devshell/site/assets/js/engines/live/tagmap.js:122— tagmap.planReads has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 1 (4 pts), loops 2 (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.
bind.scenePlant (cognitive 19) devshell/site/assets/js/engines/plc/bind.js:55— bind.scenePlant has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.file (cognitive 19) devshell/site/assets/js/engines/plc/st.js:93— Parser.file has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), boolean chains 3, error handling 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.
ladder.rung::build (cognitive 19) devshell/site/assets/js/engines/plc/ladder.js:15— ladder.rung::build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ladder.execLadder (cognitive 19) devshell/site/assets/js/engines/plc/ladder.js:38— ladder.execLadder has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 2). None of this is in the body itself: all 19 points belong to 2 function literals inside it that branch (lines 42, 40). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
io.crossCheckIO (cognitive 19) devshell/site/assets/js/engines/plc/io.js:7— io.crossCheckIO has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
simulate.simulate (cognitive 19) devshell/site/assets/js/engines/schedule/simulate.js:10— simulate.simulate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 3 (5 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 7). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 16, corr). 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.
plans.cablePlan (cognitive 19) devshell/site/assets/js/engines/schematic/plans.js:58— plans.cablePlan has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (8 pts), loops 2 (nesting depth added 4). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
createControlRelay.noteClient (cognitive 19) REDACTED:1760— createControlRelay.noteClient has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 4, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
textData (cognitive 19) app/dwg/objects-read.js:289— textData has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 4 (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.
framePanel.breakBlock (cognitive 19) app/frame/frame-panel.js:515— framePanel.breakBlock has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 6, if/else 5 (nesting depth added 2). Of this number, 12 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: 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.
VIEW (cognitive 19) app/dwg/objects-write.js:366— VIEW has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 6, boolean chains 2, other 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.
addBatches (cognitive 19) app/view3d.js:410— addBatches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 6 (8 pts), ternaries 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.
loadSet (cognitive 19) app/frame/frame-solve.js:345— loadSet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (7 pts), ternaries 1 (3 pts), other 1 (nesting depth added 11). Of this number, 16 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.
writeCellStyle (cognitive 19) app/dwg/table-write.js:157— writeCellStyle has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 5, ternaries 3 (5 pts), if/else 3, loops 2 (3 pts), other 3 (nesting depth added 3). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
designTables (cognitive 19) app/frame/frame-design.js:385— designTables has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (9 pts), if/else 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 3). Of this number, 10 points are the body's own statements and 9 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.
clash.solids (cognitive 18) app/clash.js:35— clash.solids has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, ternaries 2 (5 pts), if/else 2 (4 pts), loops 2 (nesting depth added 5). 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.
LiveClient.track (cognitive 18) REDACTED:744— LiveClient.track has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loads-asce7.floorCase (cognitive 18) app/frame/loads-asce7.js:87— loads-asce7.floorCase has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-concrete.rcOf (cognitive 18) app/frame/frame-concrete.js:91— frame-concrete.rcOf has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 2 (4 pts), boolean chains 2, 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.
frame-members.jointWelds (cognitive 18) app/frame/frame-members.js:156— frame-members.jointWelds has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (6 pts), if/else 2 (5 pts), boolean chains 4, 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.
frame-panel.framePanel.breakBlock (cognitive 18) app/frame/frame-panel.js:515— frame-panel.framePanel.breakBlock has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (7 pts), boolean chains 6, if/else 5 (nesting depth added 2). Of this number, 12 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: 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.
analysis-ui.breakConnections (cognitive 18) app/analysis-ui.js:27— analysis-ui.breakConnections has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
supply.readSupply (cognitive 18) app/lib-supply/supply.js:113— supply.readSupply has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 5, if/else 3 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
values.paramText (cognitive 18) app/ids/values.js:104— values.paramText has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, ternaries 2 (4 pts), boolean chains 3 (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.
geom.valueAt (cognitive 18) app/usd/geom.js:82— geom.valueAt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 5, loops 2 (3 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.
solid-read.acisBlock (cognitive 18) app/dwg/solid-read.js:26— solid-read.acisBlock has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solid-read.attachDataStorage (cognitive 18) app/dwg/solid-read.js:156— solid-read.attachDataStorage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ifc-import.convert::bodySolid::walk (cognitive 18) app/ifc-import.js:149— ifc-import.convert::bodySolid::walk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
step.findToken (cognitive 18) app/ifc/step.js:90— step.findToken has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 5, 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.
step.formatValue (cognitive 18) app/ifc/step.js:409— step.formatValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, ternaries 3 (7 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.
geo-profile.profileShapes (cognitive 18) app/ifc/geo-profile.js:18— geo-profile.profileShapes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live-presence.boxRect (cognitive 18) app/live-presence.js:106— live-presence.boxRect has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 3 (4 pts), loops 2 (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.
study.expandVariants (cognitive 18) app/study/study.js:90— study.expandVariants has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). Of this number, 17 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sw.self.addEventListener("fetch") (cognitive 18) devshell/edition/sw.js:38— sw.self.addEventListener("fetch") has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 6). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 58, 44). 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.
knowledge-pack.checkKnowledge (cognitive 18) devshell/site/assets/js/knowledge-pack.js:30— knowledge-pack.checkKnowledge has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 3 (nesting depth added 1). 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: 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.
app-cmdline.node (cognitive 18) devshell/site/assets/js/app-cmdline.js:77— app-cmdline.node has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calc.parse::atom (cognitive 18) devshell/site/assets/js/calc.js:126— calc.parse::atom has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (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.
app-import-units.el (cognitive 18) devshell/site/assets/js/app-import-units.js:26— app-import-units.el has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-phone.barFit (cognitive 18) devshell/site/assets/js/app-phone.js:399— app-phone.barFit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, loops 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (crowded). 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.
Node.pick (cognitive 18) devshell/site/assets/js/engines/des/engine.js:63— Node.pick 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). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PacketReader.push (cognitive 18) devshell/site/assets/js/engines/live/mqtt.js:63— PacketReader.push has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 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.
LiveStore.markers (cognitive 18) devshell/site/assets/js/engines/live/store.js:68— LiveStore.markers has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (17 pts), boolean chains 1 (nesting depth added 10). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 69). 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.
tagmap.applyCsvReadings (cognitive 18) devshell/site/assets/js/engines/live/tagmap.js:143— tagmap.applyCsvReadings has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 3 (6 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drc.overlapArea (cognitive 18) devshell/site/assets/js/engines/pcb/drc.js:86— drc.overlapArea has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 4, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftPLC.cycle (cognitive 18) devshell/site/assets/js/engines/plc/sim.js:23— SoftPLC.cycle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (7 pts), ternaries 1 (2 pts) (nesting depth added 8). Of this number, 13 points are the body's own statements and 5 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.
matrix.riskFile.rows (cognitive 18) devshell/site/assets/js/engines/risk/matrix.js:25— matrix.riskFile.rows has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 2, loops 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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.
Schematic.validate (cognitive 18) devshell/site/assets/js/engines/schematic/model.js:58— Schematic.validate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 5 (7 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.
plc-channels.plcChannels (cognitive 18) devshell/site/assets/js/engines/schematic/plc-channels.js:5— plc-channels.plcChannels has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plant.bom (cognitive 18) REDACTED:173— plant.bom has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 5, ternaries 2 (5 pts), if/else 2 (4 pts), loops 4 (nesting depth added 5). Of this number, 16 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mountAssistantIndicator (cognitive 18) REDACTED:1584— mountAssistantIndicator has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 4, ternaries 4. 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 (render, a function literal at line 1595, (anonymous)::(anonymous)::off, …). 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.
addons.findPanel (cognitive 17) REDACTED:723— addons.findPanel has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 5, if/else 3 (5 pts), ternaries 3 (5 pts), loops 1 (2 pts) (nesting depth added 5). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plate-mesh.nodeFinder.find (cognitive 17) app/frame/plate-mesh.js:193— plate-mesh.nodeFinder.find has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (11 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.
host.createControlRelay.listTools (cognitive 17) REDACTED:1743— host.createControlRelay.listTools has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (6 pts), if/else 2 (4 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 5). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
host.createControlRelay.noteClient (cognitive 17) REDACTED:1760— host.createControlRelay.noteClient has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 4, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
frame-report.reportTables (cognitive 17) app/frame/frame-report.js:63— frame-report.reportTables has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (6 pts), boolean chains 4, if/else 3 (4 pts), loops 2 (3 pts) (nesting depth added 4). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (ratio, a function literal at line 73, a function literal at line 80, …). 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.
frame-pdf.lit (cognitive 17) app/frame/frame-pdf.js:26— frame-pdf.lit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frame-weld.segmentChecks (cognitive 17) app/frame/frame-weld.js:122— frame-weld.segmentChecks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 6). Of this number, 16 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.
Coo.toCsr (cognitive 17) app/fem/linalg.js:28— Coo.toCsr has cognitive complexity 17 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 2 (4 pts), boolean chains 2 (nesting depth added 6). 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.
supply.matchRow (cognitive 17) app/lib-supply/supply.js:130— supply.matchRow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clipboard.readClip (cognitive 17) app/clipboard.js:59— clipboard.readClip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 5, error handling 1 (2 pts) (nesting depth added 1). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
shell-mount.detailHost (cognitive 17) app/shell-mount.js:90— shell-mount.detailHost has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, ternaries 4, error handling 1, loops 1 (nesting depth added 1). None of this is in the body itself: all 17 points belong to 10 function literals inside it that branch (lines 100, 111, 131, …). 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.
kiss.kissFile::labor (cognitive 17) app/kiss.js:91— kiss.kissFile::labor has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (13 pts), loops 3, 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. This shape REPEATS in the file: one other method here (kiss.kissFile) 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.
lz4.lz4Compress (cognitive 17) app/usd/lz4.js:42— lz4.lz4Compress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 5). Of this number, 13 points are the body's own statements and 4 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.
Composer.open (cognitive 17) app/usd/stage.js:142— Composer.open has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 6 (7 pts), boolean chains 1 (nesting depth added 5). Of this number, 12 points are the body's own statements and 5 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.
mleader-write.encodeMleaderStyle (cognitive 17) app/dwg/mleader-write.js:161— mleader-write.encodeMleaderStyle has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 5, boolean chains 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.
ifc-import.materialMap::nameOf (cognitive 17) app/ifc-import.js:566— ifc-import.materialMap::nameOf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. 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.
geo-curve.offsetPolyline (cognitive 17) app/ifc/geo-curve.js:273— geo-curve.offsetPolyline has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 7, if/else 1, loops 1 (nesting depth added 4). Of this number, 16 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.
geo-solid.sweptArea (cognitive 17) app/ifc/geo-solid.js:220— geo-solid.sweptArea has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workspace-detailcraft.el (cognitive 17) app/workspace-detailcraft.js:37— workspace-detailcraft.el has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (6 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ai-principles.createLedger (cognitive 17) devshell/site/assets/js/ai-principles.js:86— ai-principles.createLedger has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, loops 2 (nesting depth added 1). 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, 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.
app-block-core.el (cognitive 17) devshell/site/assets/js/app-block-core.js:18— app-block-core.el has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (6 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-workspace-icons.wireAppGlyphs (cognitive 17) devshell/site/assets/js/app-workspace-icons.js:1977— app-workspace-icons.wireAppGlyphs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 7). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (draw). 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.
app-devices-ui.boot (cognitive 17) devshell/site/assets/js/app-devices-ui.js:42— app-devices-ui.boot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 79 (115 pts), boolean chains 64, ternaries 15 (19 pts), loops 10 (16 pts), error handling 6 (7 pts) (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (app-devices-ui.boot::viewAt, app-devices-ui.boot::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.
app-input.eventCombo (cognitive 17) devshell/site/assets/js/app-input.js:116— app-input.eventCombo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-phone.penAndTouch::setPref (cognitive 17) devshell/site/assets/js/app-phone.js:649— app-phone.penAndTouch::setPref has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-workspace.el (cognitive 17) devshell/site/assets/js/app-workspace.js:56— app-workspace.el has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (6 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Graph.from (cognitive 17) devshell/site/assets/js/engines/des/agv.js:20— Graph.from has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 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.
shortcircuit.buildZbus (cognitive 17) devshell/site/assets/js/engines/network/shortcircuit.js:23— shortcircuit.buildZbus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 2, ternaries 2 (nesting depth added 4). Of this number, 12 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.
plcopen.writePlcopen (cognitive 17) REDACTED:63— plcopen.writePlcopen has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (6 pts), loops 2, ternaries 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
help-panel.el (cognitive 17) devshell/site/assets/js/help-panel.js:55— help-panel.el has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, ternaries 1 (3 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
makeLive.assistant (cognitive 17) REDACTED:1945— makeLive.assistant has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 3 (4 pts) (nesting depth added 1). Of this number, 13 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
movedNotice (cognitive 17) REDACTED:2024— movedNotice has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (4 pts), ternaries 3, loops 1 (nesting depth added 1). Of this number, 16 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
framePanel.endsBlock (cognitive 17) app/frame/frame-panel.js:407— framePanel.endsBlock has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (6 pts), boolean chains 3 (nesting depth added 5). Of this number, 11 points are the body's own statements and 6 belong to 14 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.
bsplineSurface (cognitive 17) app/ifc/geo-nurbs.js:234— bsplineSurface has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, ternaries 4, loops 2 (3 pts), if/else 2, other 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 2 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.
dynamicsPanel.tables (cognitive 17) app/frame/frame-dynamics-panel.js:343— dynamicsPanel.tables has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 5). Of this number, 16 points are the body's own statements and 1 belongs to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tableWriter::convert (cognitive 17) app/dwg/table-write.js:571— tableWriter::convert has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), loops 2 (3 pts), other 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rename (cognitive 17) app/app-autosave.js:511— rename has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (6 pts), boolean chains 2 (nesting depth added 8). Of this number, 14 points are the body's own statements and 3 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.
plate-model.cleanPlates (cognitive 16) app/frame/plate-model.js:27— plate-model.cleanPlates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (4 pts), boolean chains 3, 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.
foundation.solve3 (cognitive 16) app/foundation.js:103— foundation.solve3 has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 2 (5 pts) (nesting depth added 8). 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.
LiveClient.flushLinked (cognitive 16) REDACTED:1032— LiveClient.flushLinked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 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.
host.makeLive.assistant (cognitive 16) REDACTED:1945— host.makeLive.assistant has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 2. Of this number, 12 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
frame-members.solve3 (cognitive 16) app/frame/frame-members.js:142— frame-members.solve3 has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 2 (5 pts) (nesting depth added 8). 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.
standards.layersFor (cognitive 16) app/bundle/standards.js:19— standards.layersFor has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 3 (5 pts), if/else 2 (3 pts), 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.
supply.parseLead (cognitive 16) app/lib-supply/supply.js:67— supply.parseLead has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 4, boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
elements.startersBelow (cognitive 16) app/rc/elements.js:627— elements.startersBelow has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kiss.readKiss (cognitive 16) app/kiss.js:140— kiss.readKiss has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7 (nesting depth added 1). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 145, 151). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Parser.fail (cognitive 16) app/usd/usda-read.js:190— Parser.fail has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (15 pts), boolean chains 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.
usda-read.readUsda (cognitive 16) app/usd/usda-read.js:163— usda-read.readUsda has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 3, if/else 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
usda-write.listItemText (cognitive 16) app/usd/usda-write.js:162— usda-write.listItemText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 6). 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.
usda-write.num (cognitive 16) app/usd/usda-write.js:230— usda-write.num has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 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.
table-read.insertPart (cognitive 16) app/dwg/table-read.js:176— table-read.insertPart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 1 (3 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, 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.
geo-tri.triangulate (cognitive 16) app/ifc/geo-tri.js:15— geo-tri.triangulate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (6 pts), ternaries 1 (2 pts) (nesting depth added 5). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
geo-nurbs.faceLoops (cognitive 16) app/ifc/geo-nurbs.js:107— geo-nurbs.faceLoops has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (7 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.
live-follow.threeFollow.apply (cognitive 16) app/live-follow.js:103— live-follow.threeFollow.apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 4, error handling 2 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
live-presence.pointsBox::walk (cognitive 16) app/live-presence.js:91— live-presence.pointsBox::walk has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (5 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live.stateCore.item (cognitive 16) app/live.js:84— live.stateCore.item has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 1 (3 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live.createLive::item (cognitive 16) app/live.js:251— live.createLive::item has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (live.createLive) 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.
ai-activity.kindOf (cognitive 16) devshell/site/assets/js/ai-activity.js:75— ai-activity.kindOf has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 4 (5 pts), boolean chains 4, 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.
knowledge-pack.knowledgeTools (cognitive 16) devshell/site/assets/js/knowledge-pack.js:74— knowledge-pack.knowledgeTools has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 2, error handling 1. None of this is in the body itself: all 16 points belong to 5 function items inside it that branch (a function literal at line 91, a function literal at line 98, get, …). 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.
app-ai-suggest.boot::render (cognitive 16) devshell/site/assets/js/app-ai-suggest.js:111— app-ai-suggest.boot::render has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 2 (5 pts), boolean chains 3, 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.
app-workspace-popout.popout::open (cognitive 16) devshell/site/assets/js/app-workspace-popout.js:78— app-workspace-popout.popout::open has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), loops 2, error handling 1, ternaries 1 (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-dock.dockManager.startDrag (cognitive 16) devshell/site/assets/js/app-dock.js:234— app-dock.dockManager.startDrag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (move, up). 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.
KeyMatcher.press (cognitive 16) devshell/site/assets/js/app-input.js:471— KeyMatcher.press has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 1 (2 pts) (nesting depth added 1). Of this number, 9 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
app-newhere.h (cognitive 16) devshell/site/assets/js/app-newhere.js:28— app-newhere.h has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 30, add). 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.
app-panels.tabFor (cognitive 16) devshell/site/assets/js/app-panels.js:1022— app-panels.tabFor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4 (nesting depth added 5). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 1034, 1031, 1033, …). 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.
app-panels.closeWindow (cognitive 16) devshell/site/assets/js/app-panels.js:1637— app-panels.closeWindow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 5). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-shell.popOut (cognitive 16) devshell/site/assets/js/app-shell.js:433— app-shell.popOut has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (6 pts), boolean chains 5, if/else 5 (nesting depth added 2). Of this number, 13 points are the body's own statements and 3 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.
app-tabs-scroll.add (cognitive 16) devshell/site/assets/js/app-tabs-scroll.js:69— app-tabs-scroll.add has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 4, ternaries 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 85, 76, 81, …). 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.
app-tooltips.hover::move (cognitive 16) devshell/site/assets/js/app-tooltips.js:207— app-tooltips.hover::move has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, error handling 1 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app-workspace-arrange.arrangeDialog.open (cognitive 16) devshell/site/assets/js/app-workspace-arrange.js:73— app-workspace-arrange.arrangeDialog.open has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 6 (7 pts), boolean chains 2 (nesting depth added 1). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 113, 91). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
rng.sample (cognitive 16) devshell/site/assets/js/engines/des/rng.js:42— rng.sample has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), ternaries 1 (2 pts), 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.
Circuit._newton (cognitive 16) devshell/site/assets/js/engines/em/circuit.js:169— Circuit._newton has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 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.
bacnet.parseReadAck (cognitive 16) devshell/site/assets/js/engines/live/bacnet.js:99— bacnet.parseReadAck has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
loops.sweep (cognitive 16) devshell/site/assets/js/engines/motion/loops.js:154— loops.sweep has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bind.desPlant (cognitive 16) devshell/site/assets/js/engines/plc/bind.js:32— bind.desPlant has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (nesting depth added 4). Of this number, 13 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.
Parser.caseLabelAhead (cognitive 16) devshell/site/assets/js/engines/plc/st.js:187— Parser.caseLabelAhead has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Runtime.eval (cognitive 16) devshell/site/assets/js/engines/plc/runtime.js:197— Runtime.eval has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
turnaround.fitToShutdowns (cognitive 16) devshell/site/assets/js/engines/schedule/turnaround.js:73— turnaround.fitToShutdowns has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), boolean chains 4, if/else 2 (4 pts), loops 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plant.toSvg (cognitive 16) REDACTED:345— plant.toSvg has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (5 pts), ternaries 2 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solve.floatingNodes (cognitive 16) devshell/site/assets/js/engines/sys/solve.js:62— solve.floatingNodes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (4 pts), ternaries 3 (4 pts), boolean chains 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
modelica.evalExpr (cognitive 16) devshell/site/assets/js/engines/sys/modelica.js:18— modelica.evalExpr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, loops 2 (nesting depth added 1). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (prim, mul, add, …). 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.
checks.cycles (cognitive 16) devshell/site/assets/js/engines/trace/checks.js:70— checks.cycles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4, boolean chains 2 (nesting depth added 4). Of this number, 10 points are the body's own statements and 6 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.
checks.impact (cognitive 16) devshell/site/assets/js/engines/trace/checks.js:85— checks.impact has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 5, loops 4 (5 pts) (nesting depth added 4). Of this number, 12 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lang.readFile (cognitive 16) devshell/site/core/classes/Lang.php:250— Lang.readFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createControlRelay.listTools (cognitive 16) REDACTED:1743— createControlRelay.listTools has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (5 pts), if/else 2 (4 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 4). Of this number, 13 points are the body's own statements and 3 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
outline (cognitive 16) app/shapes/sections.js:2597— outline has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (3 pts), other 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: 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· opened (cognitive 16) · ×1
opened (cognitive 16) REDACTED:384— opened has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
liveness (cognitive 16) REDACTED:527— liveness has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. 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.
LAYER (cognitive 16) app/dwg/objects-write.js:281— LAYER has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, boolean chains 5, if/else 2, other 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.
imageEntity (cognitive 16) app/dwg/objects-write.js:911— imageEntity has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 4, ternaries 3 (4 pts), if/else 3, other 3, loops 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.
checkWireOps (cognitive 16) app/live-classroom.js:144— checkWireOps has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
invAt (cognitive 16) app/ifc/geo-nurbs.js:582— invAt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 6). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 16) app/dwg/nongraphic-write.js:101— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, if/else 4, ternaries 2 (4 pts), loops 3 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
readValue (cognitive 16) app/dwg/table-read.js:45— readValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clean (cognitive 16) app/steelstair/steelstair.js:104— clean has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 2, other 1. Of this number, 14 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClassTooLong: View3D app/view3d.js:52— ClassTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 302 over it, 1.76× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) devshell/site/tools/lang/help-locales.php:96— devshell/site/tools/lang/help-locales.php:96-119 | devshell/site/tools/lang/help-locales.php:265-288 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (6 lines × 2) devshell/site/tools/lang/help-locales.php:104— devshell/site/tools/lang/help-locales.php:104-109 | devshell/site/tools/lang/help-locales.php:273-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devshell/site/tools/lang/help-locales.php:104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) devshell/site/tools/lang/help-locales.php:113— devshell/site/tools/lang/help-locales.php:113-119 | devshell/site/tools/lang/help-locales.php:282-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
No structured logging — No logging call was found in the 452 Python, JavaScript/TypeScript, PHP production file(s) this check read across 3 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; PHP: PSR-3 loggers (Monolog), Laravel's Log facade, error_log()) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
Forked directory tree (89 identical files, ~8348 lines × 2 trees) devshell/site/assets/js/engines/des/engine.js:1— devshell/site/assets/js/engines/ and tests/lib/ are near-verbatim copies of each other: 89 files are byte-identical under the same relative paths (~8348 lines; the trees hold 101 and 1406 files). That is one structural fact, not 89 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
Duplication concentrated across 6 sibling directories (7 clone groups) app/frame/plate-mesh.js:32— 7 duplicated blocks under app/ have copies in at least two of the sibling directories dwg, fem, frame, ids, ifc, usd — 6 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication· Duplicated block with local edits (53 matched lines × 2 locations) · ×1
Duplicated block with local edits (53 matched lines × 2 locations) app/frame/frame-design.js:148— app/frame/frame-design.js:148 · app/frame/frame-design.js:243 — the two spans are one implementation copied and then locally edited — 1050 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 (20 lines × 2 locations) app/ifc/geo-solid.js:157— app/ifc/geo-solid.js:157 · app/ifc/geo-solid.js:254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2 locations) REDACTED:196— REDACTED:196 · REDACTED:243 — 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.
R10 · Code Duplication· Duplicated block with local edits (16 matched lines × 2 locations) · ×1
Duplicated block with local edits (16 matched lines × 2 locations) app/dwg/objects-write.js:181— app/dwg/objects-write.js:181 · app/dwg/passthrough.js:148 — the two spans are one implementation copied and then locally edited — 273 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 (11 matched lines × 2 locations) · ×1
Duplicated block with local edits (11 matched lines × 2 locations) app/issuelog/panel.js:27— app/issuelog/panel.js:27 · app/ui-util.js:8 — the two spans are one implementation copied and then locally edited — 134 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 (10 matched lines × 2 locations) · ×1
Duplicated block with local edits (10 matched lines × 2 locations) app/csv.js:20— app/csv.js:20 · app/lib-supply/supply.js:31 — the two spans are one implementation copied and then locally edited — 133 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 (10 lines × 2 locations) app/usd-detailcraft.js:67— app/usd-detailcraft.js:67 · app/view3d.js:922 — 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.
R10 · Code Duplication· Duplicated block with local edits (8 matched lines × 2 locations) · ×1
Duplicated block with local edits (8 matched lines × 2 locations) app/ifc/model.js:173— app/ifc/model.js:173 · app/ifc/model.js:193 — the two spans are one implementation copied and then locally edited — 151 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.
Complex function resMode (cyclomatic 442, cognitive 398) tests/tools/bimcraft-test/res-test.mjs:12— resMode has cyclomatic complexity 442 and cognitive complexity 398; 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 run (cyclomatic 408, cognitive 341) · ×1
Complex function run (cyclomatic 408, cognitive 341) tests/tools/modelcraft-test/mesh.mjs:28— run has cyclomatic complexity 408 and cognitive complexity 341; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function draw06Mode (cyclomatic 401, cognitive 358) tests/tools/bimcraft-test/draw06-test.mjs:13— draw06Mode has cyclomatic complexity 401 and cognitive complexity 358; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function famMoreMode (cyclomatic 299, cognitive 195) tests/tools/bimcraft-test/families-more-test.mjs:9— famMoreMode has cyclomatic complexity 299 and cognitive complexity 195; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function pipeSpecsMode (cyclomatic 247, cognitive 183) tests/tools/bimcraft-test/pipespecs-test.mjs:14— pipeSpecsMode has cyclomatic complexity 247 and cognitive complexity 183; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function toolsAMode (cyclomatic 243, cognitive 178) tests/tools/bimcraft-test/tools-a-test.mjs:13— toolsAMode has cyclomatic complexity 243 and cognitive complexity 178; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function typeSwapMode (cyclomatic 235, cognitive 133) tests/tools/bimcraft-test/wall-typeswap-test.mjs:10— typeSwapMode has cyclomatic complexity 235 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function runIllustrateTests (cyclomatic 234, cognitive 176) tests/tools/partcraft-test/test-illustrate.mjs:21— runIllustrateTests has cyclomatic complexity 234 and cognitive complexity 176; 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 run (cyclomatic 230, cognitive 253) · ×1
Complex function run (cyclomatic 230, cognitive 253) tests/tools/modelcraft-test/formats.mjs:16— run has cyclomatic complexity 230 and cognitive complexity 253; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function comfortsMode (cyclomatic 230, cognitive 208) tests/tools/bimcraft-test/comforts-test.mjs:20— comfortsMode has cyclomatic complexity 230 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function modelMode (cyclomatic 221, cognitive 184) tests/tools/bimcraft-test/model-test.mjs:12— modelMode has cyclomatic complexity 221 and cognitive complexity 184; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function familiesMode (cyclomatic 220, cognitive 217) tests/tools/bimcraft-test/families-test.mjs:17— familiesMode has cyclomatic complexity 220 and cognitive complexity 217; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function runDwgSaveChecks (cyclomatic 212, cognitive 194) tests/tools/cadcraft-test/dwg-save-check.mjs:26— runDwgSaveChecks has cyclomatic complexity 212 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function regsMode (cyclomatic 210, cognitive 141) tests/tools/bimcraft-test/regs-test.mjs:11— regsMode has cyclomatic complexity 210 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function views09Mode (cyclomatic 203, cognitive 127) tests/tools/bimcraft-test/views09-test.mjs:18— views09Mode has cyclomatic complexity 203 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function carbonMode (cyclomatic 202, cognitive 128) tests/tools/bimcraft-test/eg-carbon-test.mjs:11— carbonMode has cyclomatic complexity 202 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function mep07Mode (cyclomatic 193, cognitive 207) tests/tools/bimcraft-test/mep07-test.mjs:13— mep07Mode has cyclomatic complexity 193 and cognitive complexity 207; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function views2Mode (cyclomatic 191, cognitive 170) tests/tools/bimcraft-test/views2-test.mjs:17— views2Mode has cyclomatic complexity 191 and cognitive complexity 170; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function runCamTests (cyclomatic 188, cognitive 236) tests/tools/partcraft-test/test-cam.mjs:26— runCamTests has cyclomatic complexity 188 and cognitive complexity 236; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function runCraftscriptBTests (cyclomatic 183, cognitive 213) tests/tools/partcraft-test/test-craftscript-b.mjs:27— runCraftscriptBTests has cyclomatic complexity 183 and cognitive complexity 213; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function buildModelParts (cyclomatic 182, cognitive 294) tests/lib/dwg/read.js:331— buildModelParts has cyclomatic complexity 182 and cognitive complexity 294; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function toolsBMode (cyclomatic 180, cognitive 114) tests/tools/bimcraft-test/tools-b-test.mjs:12— toolsBMode has cyclomatic complexity 180 and cognitive complexity 114; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function schedulesMode (cyclomatic 180, cognitive 78) tests/tools/bimcraft-test/schedules-test.mjs:12— schedulesMode has cyclomatic complexity 180 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readOasis (cyclomatic 177, cognitive 388) tests/lib/chip/fmt/oasis.js:89— readOasis has cyclomatic complexity 177 and cognitive complexity 388; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function egMode (cyclomatic 165, cognitive 137) tests/tools/bimcraft-test/eg-mep-test.mjs:11— egMode has cyclomatic complexity 165 and cognitive complexity 137; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function stagesMode (cyclomatic 162, cognitive 88) tests/tools/bimcraft-test/stages-test.mjs:13— stagesMode has cyclomatic complexity 162 and cognitive complexity 88; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function validate (cyclomatic 156, cognitive 240) tests/tools/dwg-test/structure.mjs:41— validate has cyclomatic complexity 156 and cognitive complexity 240; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function bidiClass (cyclomatic 153, cognitive 136) tests/lib/report/bidi.js:116— bidiClass has cyclomatic complexity 153 and cognitive complexity 136; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function measureMode (cyclomatic 152, cognitive 130) tests/tools/bimcraft-test/measure-test.mjs:45— measureMode has cyclomatic complexity 152 and cognitive complexity 130; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function checkJob (cyclomatic 148, cognitive 274) tests/lib/cabinetcraft/lib/checks.js:26— checkJob has cyclomatic complexity 148 and cognitive complexity 274; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function layoutProject (cyclomatic 144, cognitive 342) tests/lib/cabinetcraft/lib/project.js:206— layoutProject has cyclomatic complexity 144 and cognitive complexity 342; 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 run (cyclomatic 143, cognitive 167) · ×1
Complex function run (cyclomatic 143, cognitive 167) tests/tools/modelcraft-test/gltf.mjs:101— run has cyclomatic complexity 143 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.
Complex function writeOasis (cyclomatic 137, cognitive 373) tests/lib/chip/fmt/oasis.js:284— writeOasis has cyclomatic complexity 137 and cognitive complexity 373; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function cmpSpecial (cyclomatic 135, cognitive 168) tests/tools/dwg-test/reader-compare.mjs:221— cmpSpecial has cyclomatic complexity 135 and cognitive complexity 168; 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.
app/shapes/sections.js: 2624 lines of code app/shapes/sections.js:1— app/shapes/sections.js has 2624 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: 1975 lines of code REDACTED:1— REDACTED has 1975 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/detailcraft.js: 1900 lines of code app/detailcraft.js:1— app/detailcraft.js has 1900 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/dwg/objects-read.js: 1370 lines of code app/dwg/objects-read.js:1— app/dwg/objects-read.js has 1370 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: 1136 lines of code REDACTED:1— REDACTED has 1136 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/dwg/objects-write.js: 1117 lines of code app/dwg/objects-write.js:1— app/dwg/objects-write.js has 1117 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: 1107 lines of code REDACTED:1— REDACTED has 1107 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/drawings.js: 1012 lines of code app/drawings.js:1— app/drawings.js has 1012 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/view3d.js: 938 lines of code app/view3d.js:1— app/view3d.js has 938 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/dwg/write.js: 874 lines of code app/dwg/write.js:1— app/dwg/write.js has 874 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/connections.js: 871 lines of code app/connections.js:1— app/connections.js has 871 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/viewcube.js: 811 lines of code app/viewcube.js:1— app/viewcube.js has 811 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/live-classroom.js: 794 lines of code app/live-classroom.js:1— app/live-classroom.js has 794 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/ifc/geo-nurbs.js: 754 lines of code app/ifc/geo-nurbs.js:1— app/ifc/geo-nurbs.js has 754 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/model.js: 741 lines of code app/model.js:1— app/model.js has 741 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/dwg/table-read.js: 733 lines of code app/dwg/table-read.js:1— app/dwg/table-read.js has 733 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/frame/frame-panel.js: 711 lines of code app/frame/frame-panel.js:1— app/frame/frame-panel.js has 711 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/frame/frame-solve.js: 671 lines of code app/frame/frame-solve.js:1— app/frame/frame-solve.js has 671 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/addons/regs/lib/ui.js: 652 lines of code app/addons/regs/lib/ui.js:1— app/addons/regs/lib/ui.js has 652 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/rc/elements.js: 616 lines of code app/rc/elements.js:1— app/rc/elements.js has 616 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/dwg/table-write.js: 596 lines of code app/dwg/table-write.js:1— app/dwg/table-write.js has 596 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/ifc-import.js: 589 lines of code app/ifc-import.js:1— app/ifc-import.js has 589 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/usd/usda-read.js: 587 lines of code app/usd/usda-read.js:1— app/usd/usda-read.js has 587 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/app-autosave.js: 582 lines of code app/app-autosave.js:1— app/app-autosave.js has 582 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/foundation.js: 558 lines of code app/foundation.js:1— app/foundation.js has 558 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· app/dwg/nongraphic-write.js · ×1
app/dwg/nongraphic-write.js: 546 lines of code app/dwg/nongraphic-write.js:1— app/dwg/nongraphic-write.js has 546 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/ifc/api.js: 501 lines of code app/ifc/api.js:1— app/ifc/api.js has 501 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/ifc/ifc43.js: 482 lines of code app/ifc/ifc43.js:1— app/ifc/ifc43.js has 482 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/dwg/r2007-write.js: 445 lines of code app/dwg/r2007-write.js:1— app/dwg/r2007-write.js has 445 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/ids/access.js: 419 lines of code app/ids/access.js:1— app/ids/access.js has 419 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/usd/usdc-read.js: 417 lines of code app/usd/usdc-read.js:1— app/usd/usdc-read.js has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/frame/plate-solve.js: 415 lines of code app/frame/plate-solve.js:1— app/frame/plate-solve.js has 415 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/fem/frame-push.js: 411 lines of code app/fem/frame-push.js:1— app/fem/frame-push.js has 411 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/frame/frame-design.js: 406 lines of code app/frame/frame-design.js:1— app/frame/frame-design.js has 406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/dwg/container-write.js: 405 lines of code app/dwg/container-write.js:1— app/dwg/container-write.js has 405 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· The declared test suite includes a file that cannot be loaded · ×1
The declared test suite includes a file that cannot be loaded tests/lib/cabinetcraft/hosts/bim.js:14— This repository declares test tooling, and the ✓ above records that declaration — but tests/lib/cabinetcraft/hosts/bim.js and 81 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
Dead file (~2081 LoC) REDACTED— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (REDACTED, app/detailcraft.js, app/shell-mount.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
Dead file (~1950 LoC) app/detailcraft.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~1424 LoC) app/dwg/objects-read.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/dwg/objects-write.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
Dead file (~1159 LoC) app/dwg/objects-write.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 7 in-repo import(s) from 7 other file(s) do name it (app/dwg/mleader-write.js, app/dwg/nongraphic-write.js, app/dwg/passthrough.js and 4 more) — 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
Dead file (~1152 LoC) REDACTED— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~1056 LoC) app/drawings.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (app/drawings-ui.js, app/kiss.js, app/rc-ui.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
Dead file (~900 LoC) app/dwg/write.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/drawings-ui.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
Dead file (~786 LoC) app/ifc/geo-nurbs.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/ifc/geo-brep.js, app/ifc/geometry.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
Dead file (~761 LoC) app/dwg/table-read.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/dwg/objects-read.js, app/dwg/table-write.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
Dead file (~616 LoC) app/dwg/table-write.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/dwg/write.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
Dead file (~609 LoC) app/ifc-import.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/ifc-import-ui.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
Dead file (~606 LoC) app/usd/usda-read.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/usd/index.js, app/usd/stage.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
Dead file (~570 LoC) app/ifc/api.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/ifc-import-ui.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
Dead file (~557 LoC) app/dwg/nongraphic-write.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/dwg/table-write.js, app/dwg/write.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
Dead file (~510 LoC) app/ifc/ifc43.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~457 LoC) app/dwg/r2007-write.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/dwg/write.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
Dead file (~439 LoC) app/ids/access.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/ids/check.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
Dead file (~422 LoC) app/fem/frame-push.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/fem/frame-dyn.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
Dead file (~387 LoC) app/live-crypto.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 1 other file(s) do name it (REDACTED) — 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
Dead file (~378 LoC) REDACTED— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/detailcraft.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
Dead file (~353 LoC) app/dwg/bits-read.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (app/dwg/nongraphic-write.js, app/dwg/objects-read.js, app/dwg/passthrough.js and 1 more) — 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
Dead file (~347 LoC) REDACTED— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (app/issuelog/host.js, app/issuelog/panel.js, app/issues-detail.js and 1 more) — 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
Dead file (~339 LoC) app/unit-table.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/unit-prefs.js, app/unit-settings.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
Dead file (~335 LoC) app/usd/stage.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/usd/index.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
Dead file (~326 LoC) app/usd/usdc-write.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/usd/build.js, app/usd/index.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
Dead file (~310 LoC) app/ifc/geo-bool.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/ifc/api.js, app/ifc/geometry.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
Dead file (~307 LoC) app/ifc/geo-solid.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (app/ifc/geo-bool.js, app/ifc/geo-brep.js, app/ifc/geometry.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
Dead file (~299 LoC) app/usd/build.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (app/usd/index.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
Dead file (~296 LoC) app/usd/geom.js— no import path from any entry point (128 application, 822 tooling, 2349 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (app/usd/index.js, app/usd/scene.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
Unused dependency '@modelcontextprotocol/inspector' tests/tools/mcp/test/package.json:9— Declared in tests/tools/mcp/test/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.
Swallowed exception (caught, then discarded) REDACTED:95— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Duplicated predicate devshell/site/assets/js/app-devices.js:66— `!!v && typeof v === 'object' && !Array.isArray(v)` appears character-identically in 3 files — devshell/site/assets/js/app-devices.js, devshell/site/assets/js/app-state.js, devshell/site/assets/js/app-workspace-format.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 app/clipboard.js:67— `!Number.isFinite(n) || Math.abs(n) > 1e7` appears character-identically in 2 files — app/clipboard.js, app/model.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 app/ifc-import.js:387— `!Number.isFinite(v) || Math.abs(v) > 1e7` appears character-identically in 2 files — app/ifc-import.js, app/rc/loose.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 app/clipboard.js:63— `!Number.isInteger(j.version) || j.version < 1` appears character-identically in 3 files — app/clipboard.js, app/frame/frame-model.js, app/model.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 app/i18n.js:55— `!data || typeof data !== 'object' || typeof data.strings !== 'object'` appears character-identically in 2 files — app/i18n.js, devshell/site/assets/js/i18n.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 devshell/site/assets/js/engines/ui/live.js:31— `!o || typeof o !== 'object' || Array.isArray(o)` appears character-identically in 2 files — devshell/site/assets/js/engines/ui/live.js, devshell/site/assets/js/engines/ui/risk.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:329— `!o.app || !/^[a-z0-9-]{1,40}$/.test(o.app)` appears character-identically in 2 files — REDACTED, app/app-autosave.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 devshell/site/assets/js/app-input.js:323— `!obj || typeof obj !== 'object' || Array.isArray(obj)` appears character-identically in 2 files — devshell/site/assets/js/app-input.js, devshell/site/assets/js/app-workspace-format.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 app/live-classroom.js:266— `!p || p.state === 'gone' || p.state === 'removed' || p.state === 'left'` appears character-identically in 3 files — app/live-classroom.js, app/live-follow.js, app/live-presence.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:110— `!raw || typeof raw !== 'object' || Array.isArray(raw)` appears character-identically in 3 files — REDACTED, app/addons/regs/lib/regs.js, app/study/study.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 app/frame/frame-concrete-panel.js:55— `!ui.result() || ui.result().error || ui.stale()` appears character-identically in 2 files — app/frame/frame-concrete-panel.js, app/frame/frame-loads-panel.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:88— `!v || typeof v !== 'object' || Array.isArray(v)` appears character-identically in 3 files — REDACTED, app/addons/regs/lib/regs.js, devshell/site/assets/js/app-input.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 app/frame/plate-mesh.js:36— `(a[1] > pt[1]) !== (b[1] > pt[1]) && pt[0] < (b[0] - a[0]) * (pt[1] - a[1]) / (b[1] - a[1]) + a[0]` appears character-identically in 2 files — app/frame/plate-mesh.js, app/ifc/geo-bool.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 devshell/site/assets/js/app-block-statusx.js:24— `Array.isArray(layoutList) && layoutList.length` appears character-identically in 2 files — devshell/site/assets/js/app-block-statusx.js, devshell/site/assets/js/app-block-titlebar.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 app/ifc/geo-nurbs.js:360— `Math.abs(a[0] - b[0]) < 1e-9 && Math.abs(a[1] - b[1]) < 1e-9` appears character-identically in 2 files — app/ifc/geo-nurbs.js, app/ifc/geo-profile.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 app/erection.js:63— `Number.isFinite(n) && n >= lo && n <= hi` appears character-identically in 9 files — app/erection.js, app/foundation.js, app/frame/frame-model.js, app/frame/frame-panel.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 app/frame/frame-chart.js:22— `Number.isFinite(p[0]) && Number.isFinite(p[1])` appears character-identically in 2 files — app/frame/frame-chart.js, app/frame/plate-mesh.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 app/i18n.js:95— `Object.prototype.hasOwnProperty.call(vars, name) && vars[name] !== undefined && vars[name] !== null` appears character-identically in 2 files — app/i18n.js, devshell/site/assets/js/i18n.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 app/live.js:43— `a === b || JSON.stringify(a) === JSON.stringify(b)` appears character-identically in 2 files — app/live.js, app/usd/sdf.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 devshell/site/assets/js/app-ai-activity.js:111— `adapter.control && typeof adapter.control.on === 'function'` appears character-identically in 2 files — devshell/site/assets/js/app-ai-activity.js, devshell/site/assets/js/app-ai-suggest.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 devshell/site/assets/js/app-input-ui.js:118— `b.getAttribute('title') || T('shell.input.why.off')` appears character-identically in 2 files — devshell/site/assets/js/app-input-ui.js, devshell/site/assets/js/app-workspace-input.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:678— `c !== null && c !== undefined && c !== false` appears character-identically in 10 files — REDACTED, app/app-autosave.js, app/ui-util.js, app/workspace-detailcraft.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 app/frame/frame-breakit.js:80— `c.limit === 'strength' && sol.results['combo:' + c.id]` appears character-identically in 4 files — app/frame/frame-breakit.js, app/frame/frame-design.js, app/frame/frame-weld.js, app/frame/rc-design.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 app/frame/frame-model.js:166— `c.limit === 'strength' || c.limit === 'service'` appears character-identically in 2 files — app/frame/frame-model.js, app/frame/frame-panel.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 app/connections.js:119— `c.type === 'splice' || c.type === 'mitre'` appears character-identically in 2 files — app/connections.js, app/erection.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.
Silent fallback default in catch REDACTED:747— `readJson` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch REDACTED:269— `sameEntry` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch REDACTED:306— `list` (in `makeRecent`) swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch REDACTED:1315— `makeAssistantFiles.exists` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch app/frame/frame-dynamics-panel.js:88— `dynamicsPanel.spectrumPts` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch app/app-autosave.js:73— `sizeOf` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch app/dwg/nongraphic-write.js:299— `want` (in `extendWriter`) swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch app/ifc/api.js:107— `OpenModel` swallows every exception into `return -1` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch app/live-classroom.js:162— `sizeOfOps` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/ai-activity.js:272— `load` (in `createActivityLog`) swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-cmdline.js:93— `dockedCommandLine` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-ai-assist.js:81— `workspace` (in `mountAssist`) swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-ai-assist.js:91— `tool` (in `mountAssist`) swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-ai-assist.js:94— `stage` (in `mountAssist`) swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-workspace-icons.js:2011— `read` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-workspace-popout.js:27— `memRead` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-workspace-popout.js:122— `title` (in `popout`) swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-devices-studio.js:118— `blocked` (in `studioHid`) swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-devices-studio.js:120— `rule` (in `studioHid`) swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-docinfo.js:34— `who` (in `boot`) swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/engines.js:37— `cell` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/import-units.js:43— `read` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/lessons.js:49— `createLessons` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-panels.js:112— `readAll` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch devshell/site/assets/js/app-phone.js:99— `q` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
redundant comment app/dwg/mleader-write.js:74— "entityCommon + the proxy graphics" repeats the code it sits on: 4 of its 4 words (entity, common, proxy, graphics) are already in `rawEntityCommon(w, rec, e.proxyGraphics ? { gfx: e.proxyGraphics } : null);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment app/xf-ui.js:57— "mirror in a grid line" repeats the code it sits on: 3 of its 3 words (mirror, grid, line) are already in `const linesO = [...s.grids.y.map((g) => ['y:' + g.label, tr('xf.mirror.grid', { label: g.label })]), ...s.grids.x.map((g …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/lib/dwg/mleader-write.js:74— "entityCommon + the proxy graphics" repeats the code it sits on: 4 of its 4 words (entity, common, proxy, graphics) are already in `rawEntityCommon(w, rec, e.proxyGraphics ? { gfx: e.proxyGraphics } : null);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/lib/sitelines/test/test.mjs:81— "the line ends inside the wall" repeats the code it sits on: 4 of its 4 words (line, ends, inside, wall) are already in `ok(S.crossesPath(wall([10000, 3000], [10000, 9000], 400), [[0, 5000], [10000, 5000]]), 'a line that ends inside the wall …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/lib/walls/test/test.mjs:255— "square off: the through wall ends square where B's far face reaches its side: x = 173.205081 for both faces" repeats the code it sits on: 10 of its 10 words (square, wall, ends, far, face, reaches, side, 173, 205081, faces) are already in `ok(c.style === 'square' && nearP(c.a.left, [173.205081, -100], 1e-5) && nearP(c.a.right, [173.205081, 100], 1e-5) && nea …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/bimcraft-test/browser-eltypes.mjs:117— "15 + 50 + 50 + 200 = 315" repeats the code it sits on: 4 of its 4 words (15, 50, 200, 315) are already in `ok(d.floors[0].thickness === 315 && d.floors[0].guid === f0.guid, 'the concrete layer made 200 and saved: the floor is 3 …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/bimcraft-test/eg-carbon-test.mjs:82— "brick 5 m³ × 1800 × 0.24 = 2160; mineral wool 1 × 40 × 1.2 = 48" repeats the code it sits on: 8 of its 8 words (brick, 1800, 24, 2160, mineral, wool, 40, 48) are already in `ok(near(r.byMaterial.find((g) => g.key === 'brick').total, 2160, 1e-9) && near(r.byMaterial.find((g) => g.key === 'miner …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/bimcraft-test/extra2-daylight.mjs:91— "behind the window: no effect" repeats the code it sits on: 4 of its 4 words (behind, window, no, effect) are already in `ok(D.sectionTheta(o, n, quad([-20, 10, -2], [20, 10, -2], [20, 10, 8], [-20, 10, 8])).theta === 90, 'a wall behind the w …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/bimcraft-test/schedule-test.mjs:33— "SS / FF / SF with lags, by hand" repeats the code it sits on: 4 of its 5 words (ss, ff, sf, lags) are already in `const x = S.plan([T('a', 'a', 0, 10), T('b', 'b', 0, 4, [{ uid: 'a', type: 'SS', lag: 3 }]), T('c', 'c', 0, 2, [{ uid: ' …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/bimcraft-test/tools-a-test.mjs:54— "two 10 x 10 squares offset by (5, 5) share a 5 x 5 square = 25" repeats the code it sits on: 7 of its 7 words (two, 10, squares, offset, share, square, 25) are already in `ok(near(G.overlapArea(rect(0, 0, 10, 10), rect(5, 5, 15, 15)), 25, 1e-9), 'overlapArea: two 10 x 10 squares offset by 5 …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/bimcraft-test/tools-a-test.mjs:270— "net volume 20.870064 x 0.3 = 6.261019 m3" repeats the code it sits on: 5 of its 5 words (net, volume, 20, 870064, 261019) are already in `ok(s2.openings.length === 4 && o2 && o2.key !== k0 && near(q.NetArea, 20.870064, 1e-5) && near(q.NetVolume, 6.261019, 1e …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/cadcraft-test/browser-tabs-sweep.mjs:45— "--scales 1.75: one scale" repeats the code it sits on: 3 of its 3 words (scales, 75, scale) are already in `const SCALES = opt('--scales') ? opt('--scales').split(',').map(Number) : QUICK ? [1, 1.5] : [1, 1.25, 1.5, 1.75];`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/cadcraft-test/publish-set.mjs:47— "DWG + PDF, a subset" repeats the code it sits on: 3 of its 3 words (dwg, pdf, subset) are already in `const both = await PS.publishSetDwg(set, ro, { readDwg: syncRead, subset: 'plans', pdf: true });`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/detailcraft-test/test-erection-app.mjs:43— "connection autopilot tool" repeats the code it sits on: 3 of its 3 words (connection, autopilot, tool) are already in `const ap = tools.connection_autopilot;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/partcraft-cli/partcraft.mjs:550— "parameter errors and cycles" repeats the code it sits on: 3 of its 3 words (parameter, errors, cycles) are already in `for (const [name, msg] of ev.errors) add('error', /each other|itself/.test(msg) ? 'cycle' : 'parameter', name, msg);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/partcraft-test/test-form.mjs:111— "outward orientation: the limit mesh of each closed primitive has positive volume" repeats the code it sits on: 7 of its 8 words (outward, limit, mesh, closed, primitive, positive, volume) are already in `ok([bx, cy, to, sp].every((f) => meshVolume(FM.limitMesh(f, 2)) > 0), 'closed primitives face outward (positive enclosed …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/shell-test/browser-wheel-pad-bimcad.mjs:121— "(c) pinch: ctrlKey" repeats the code it sits on: 3 of its 3 words (pinch, ctrl, key) are already in `await zoomCheck('synthetic pinch ctrlKey deltaY -9.5', () => synth({ ctrlKey: true, deltaY: -9.5 }), +1); await settle() …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/shell-test/browser-wheel-pad-civil.mjs:100— "(c) pinch: ctrlKey" repeats the code it sits on: 3 of its 3 words (pinch, ctrl, key) are already in `await zoomCheck('synthetic pinch ctrlKey deltaY -9.5', () => synth({ ctrlKey: true, deltaY: -9.5 }), +1); await settle() …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/tools/takeoffcraft-test/signoff-test.mjs:93— "no tool signs" repeats the code it sits on: 3 of its 3 words (no, tool, signs) are already in `ok(!/signOff|sign_off|signoff_set/.test(fs.readFileSync(path.join(TC, 'REDACTED'), 'utf8').replace(/signoffHolds|signof …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D21 · Naming Consistency· `GetMaxExpressID` spells `ID` where 146 names in the project spell it `Id` · ×2
`GetMaxExpressID` spells `ID` where 146 names in the project spell it `Id` app/ifc/api.js:155— 146 of 148 names in project detailcraft spell the token `Id` (146 of 148; unit: names in project detailcraft containing `Id`). Peers: active.activeId (app/addons/regs/lib/active.js:195); report.ruleSource(ruleId) (app/addons/regs/lib/report.js:44); analysis-ui.drawnId (app/analysis-ui.js:41); app-autosave.newId (app/app-autosave.js:58); constructability.bottomEnd(memberById) (app/constructability.js:271). Rename to `GetMaxExpressId`. [rule N6]
`GetMaxExpressID` spells `ID` where 146 names in the project spell it `Id` tests/lib/ifc/api.js:155— 146 of 148 names in project detailcraft spell the token `Id` (146 of 148; unit: names in project detailcraft containing `Id`). Peers: active.activeId (app/addons/regs/lib/active.js:195); report.ruleSource(ruleId) (app/addons/regs/lib/report.js:44); analysis-ui.drawnId (app/analysis-ui.js:41); app-autosave.newId (app/app-autosave.js:58); constructability.bottomEnd(memberById) (app/constructability.js:271). Rename to `GetMaxExpressId`. [rule N6]
D21 · Naming Consistency· `CreateIFCGloballyUniqueId` spells `IFC` where 133 names in the project spell it `Ifc` · ×2
`CreateIFCGloballyUniqueId` spells `IFC` where 133 names in the project spell it `Ifc` app/ifc/api.js:210— 133 of 136 names in project detailcraft spell the token `Ifc` (133 of 136; unit: names in project detailcraft containing `Ifc`). Peers: ifc-import-ui.mountIfcImport (app/ifc-import-ui.js:12); ifc-import.importIfc (app/ifc-import.js:60); ifc.writeIfc (app/ifc.js:90); IfcAPI.IsIfcElement (app/ifc/api.js:147); IfcAPI.CreateIfcEntity (app/ifc/api.js:194). Rename to `CreateIfcGloballyUniqueId`. [rule N6]
`CreateIFCGloballyUniqueId` spells `IFC` where 133 names in the project spell it `Ifc` tests/lib/ifc/api.js:210— 133 of 136 names in project detailcraft spell the token `Ifc` (133 of 136; unit: names in project detailcraft containing `Ifc`). Peers: ifc-import-ui.mountIfcImport (app/ifc-import-ui.js:12); ifc-import.importIfc (app/ifc-import.js:60); ifc.writeIfc (app/ifc.js:90); IfcAPI.IsIfcElement (app/ifc/api.js:147); IfcAPI.CreateIfcEntity (app/ifc/api.js:194). Rename to `CreateIfcGloballyUniqueId`. [rule N6]
Silent fallback default on parse failure tests/lib/3dm-link/rhino/cadcraft_link.py:146— `load_config` returns `{}` when `(IOError, OSError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure tests/tools/dwg-test/surfaces-compare.py:251— `same` returns `False` when `(TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
No ADRs found package.json:6— 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 6).
D21 · Naming Consistency· `WebIFC` spells `IFC` where 133 names in the project spell it `Ifc` · ×1
`WebIFC` spells `IFC` where 133 names in the project spell it `Ifc` app/ifc-import.js:60— 133 of 136 names in project detailcraft spell the token `Ifc` (133 of 136; unit: names in project detailcraft containing `Ifc`). Peers: ifc-import-ui.mountIfcImport (app/ifc-import-ui.js:12); ifc-import.importIfc (app/ifc-import.js:60); ifc.writeIfc (app/ifc.js:90); IfcAPI.IsIfcElement (app/ifc/api.js:147); IfcAPI.CreateIfcEntity (app/ifc/api.js:194). Rename to `WebIfc`. [rule N6]
D21 · Naming Consistency· `gravityMM` spells `MM` where 24 names in the project spell it `Mm` · ×1
`gravityMM` spells `MM` where 24 names in the project spell it `Mm` tests/lib/env/env.js:71— 24 of 25 names in project detailcraft spell the token `Mm` (24 of 25; unit: names in project detailcraft containing `Mm`). Peers: areaclip.sizeMm (app/areaclip.js:98); picture.pictureSizeMm (app/picture.js:76); import-units.rememberSize(widthMm) (devshell/site/assets/js/import-units.js:73); annoscale.paperMm (tests/lib/annoscale/annoscale.js:62); annoscale.modelOf(paperMm) (tests/lib/annoscale/annoscale.js:69). Rename to `gravityMm`. [rule N6]
D21 · Naming Consistency· `tubeSheetSVG` spells `SVG` where 33 names in the project spell it `Svg` · ×1
`tubeSheetSVG` spells `SVG` where 33 names in the project spell it `Svg` tests/lib/process/equip/exchanger.js:109— 33 of 34 names in project detailcraft spell the token `Svg` (33 of 34; unit: names in project detailcraft containing `Svg`). Peers: framing.panelSvg (app/framing.js:202); study.chartSvg (app/study/study.js:193); plant.valveSvg (REDACTED:316); plant.balloonSvg (REDACTED:328); plant.equipSvg (REDACTED:333). Rename to `tubeSheetSvg`. [rule N6]
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No SAST REDACTED:6— No static application security testing detected. For this repository's stack, add phpstan or psalm (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation tests/tools/bimcraft-test/package.json:5— `tests/tools/bimcraft-test/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`.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
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.)
No app-layer HTTPS enforcement detected devshell/serve.mjs:133— `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 0/6 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types· PHP static analysis does not check null everywhere · ×1
PHP static analysis does not check null everywhere — This repository commits no PHPStan or Psalm configuration (`phpstan.neon[.dist]`, `phpstan.dist.neon`, `psalm.xml[.dist]`, or one a composer.json script names with `--configuration`), so nothing checks null: a `?Customer` reaches `->name()` silently and throws `Error: Call to a member function name() on null` the first time it is null. If the build passes a level on a command line instead, put it in a committed configuration — this check reads configuration, and configuration is all it can read.
Hand-rolled JSON/XML parsing via regex devshell/site/assets/js/engines/ui/plc.js:126— 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.
Outdated: monstertruck-io — `monstertruck-io` is locked at 0.4.1 but 0.4.2 is the current stable release on crates.io, and it already satisfies the `"0.4.1"` requirement declared in tests/tools/partcraft-test/k1-spike/monstertruck/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p monstertruck-io` and commit the updated Cargo.lock.
Outdated: monstertruck-meshing — `monstertruck-meshing` is locked at 0.4.1 but 0.4.2 is the current stable release on crates.io, and it already satisfies the `"0.4.1"` requirement declared in tests/tools/partcraft-test/k1-spike/monstertruck/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p monstertruck-meshing` and commit the updated Cargo.lock.
Outdated: monstertruck-modeling — `monstertruck-modeling` is locked at 0.4.1 but 0.4.2 is the current stable release on crates.io, and it already satisfies the `"0.4.1"` requirement declared in tests/tools/partcraft-test/k1-spike/monstertruck/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p monstertruck-modeling` and commit the updated Cargo.lock.
Outdated: monstertruck-solid — `monstertruck-solid` is locked at 0.4.1 but 0.4.2 is the current stable release on crates.io, and it already satisfies the `"0.4.1"` requirement declared in tests/tools/partcraft-test/k1-spike/monstertruck/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p monstertruck-solid` and commit the updated Cargo.lock.
Outdated: monstertruck-topology — `monstertruck-topology` is locked at 0.4.1 but 0.4.2 is the current stable release on crates.io, and it already satisfies the `"0.4.1"` requirement declared in tests/tools/partcraft-test/k1-spike/monstertruck/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p monstertruck-topology` and commit the updated Cargo.lock.
doc comments repeat the names tests/tools/library/detail/r5-earthmoving.mjs:892— 0 of 0 documented parameters and 7 of 1395 summaries in `cadcraft-library-converter` only repeat the member or parameter name (e.g. "thumb" for `thumb`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names app/dwg/lz-r2004-write.js:125— 1 of 49 documented parameters and 6 of 5975 summaries in `detailcraft` only repeat the member or parameter name (e.g. "Literal Length (≥ 4)." for `literalLength`). Delete the restating tags, or add what the name does not say.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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 2 file(s) — `app/frame/frame-design.js`, `devshell/site/assets/js/engines/motion/urdf.js` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1e800-c704-7057-a0c4-5a9e6a891382 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 32 · Warnings: 2587 · Recommendations: 118 · Info: 7 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 05:35 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.